Commit e0392d26 by 曹润柘

合并分支 'caorunzhe' 到 'master'

Caorunzhe

查看合并请求 !652
parents fe64968e 4a458dc0
......@@ -333,15 +333,6 @@
\parinterval 无监督对偶学习为我们提供了一个思路\upcite{qin2020dual}。假设目前有两个比较弱的翻译模型,一个原始任务模型$f$将源语言句子$\seq{x}$翻译成目标语言句子$\seq{y}$,一个对偶任务模型$g$将目标语言句子$\seq{y}$翻译成源语言句子$\seq{x}$。翻译模型可由有限的双语训练或者使用无监督机器翻译的方法得到。如图\ref{fig:16-10}所示,无监督对偶学习的做法是,先通过原始任务模型$f$将一个源语言单语句子$x$翻译为目标语言句子$y$,由于没有参考译文,我们无法判断$y$的正确性。但通过语言模型,可以判断这个句子是否通顺、符合语法规范,这些信息可用来评估翻译模型$f$的翻译流畅性。随后,再通过对偶任务模型$g$将目标语言句子$y$再翻译为源语言句子$x^{'}$。如果模型$f$$g$的翻译性能较好,那么$x^{'}$$x$会十分相似。通过计算二者的{\small\bfnew{重构损失}}\index{重构损失}(Reconstruction Loss)\index{Reconstruction Loss},就可以优化模型$f$$g$的参数。这个过程可以多次迭代,从大量的无标注单语数据上不断提升性能。
\parinterval 从统计建模的角度看,如果在有监督对偶学习对联合分布$\funp{P}(y|x)$建模的基础上把$y$看作一个隐变量,那么可以得到边缘分布$\funp{P}(x)$,也就是关于$x$的语言模型:
\begin{eqnarray}
\funp{P}(\seq{x}) &=& \sum_{\seq{y}}\funp{P}(\seq{x},\seq{y}) \nonumber \\
& \ge & \sum_{\seq{y}}\funp{P}(\seq{x}|\seq{y})\funp{P}(\seq{y}|\seq{x})
\label{eq:16-6}
\end{eqnarray}
\parinterval 公式\eqref{eq:16-6}使用了$\funp{P}(\seq{x}|\seq{x},\seq{y}) \ge \funp{P}(\seq{x}|\seq{y})$。这样,$\sum_{\seq{y}}\funp{P}(\seq{x}|\seq{y})\funp{P}(\seq{y}|\seq{x})$描述了$\funp{P}(\seq{x})$的一个下界。因此,如果直接优化(最大化)公式\eqref{eq:16-6}右端,相当于对$\funp{P}(\seq{x}|\seq{y})$$\funp{P}(\seq{y}|\seq{x})$施加了{\small\sffamily\bfnew{循环一致性}}\index{循环一致性}(Circle Consistency)\index{Circle Consistency}的约束\upcite{DBLP:conf/iccv/ZhuPIE17},也就是对于一个句子$\seq{x}$,通过$\funp{P}(\seq{y}|\seq{x})$把它翻译成$\seq{y}$后,根据$\funp{P}(\seq{x}|\seq{y})$应该能重新翻译出$\seq{x}$,如图\ref{fig:16-10}所示。公式\eqref{eq:16-6}给出了同时优化$\funp{P}(\seq{x}|\seq{y})$$\funp{P}(\seq{y}|\seq{x})$的一个目标函数形式。这个目标函数的一个额外的好处是它本质上是在学习一个由$\funp{P}(\seq{x}|\seq{y})$$\funp{P}(\seq{y}|\seq{x})$组成的语言模型$\funp{P}(\seq{x})$,而$\funp{P}(\seq{x})$的学习依赖于单语数据,这意味着这个目标函数可以很自然地直接使用大量单语数据来同时训练两个翻译模型。相同的结论可以推广到$\funp{P}(\seq{y})$\upcite{DBLP:conf/nips/HeXQWYLM16}
%----------------------------------------------
\begin{figure}[htp]
\centering
......@@ -351,17 +342,7 @@
\end{figure}
%----------------------------------------------
\parinterval 但是直接使用公式\eqref{eq:16-6}作为目标函数需要解决两个问题:
\begin{itemize}
\vspace{0.5em}
\item 计算公式\eqref{eq:16-6}要枚举所有可能的隐变量$\seq{y}$的取值,也就是所有可能产生的目标语言句子,而这是不可能的,因此一般会通过平均多个随机产生的$\seq{y}$对应的损失来近似真正的目标函数值;
\vspace{0.5em}
\item 从公式\eqref{eq:16-6}可以看到,在$\funp{P}(\seq{x})$上计算完目标函数值后,得到的梯度首先传递给$\funp{P}(\seq{x}|\seq{y})$,然后通过$\funp{P}(\seq{x}|\seq{y})$传递给$\funp{P}(\seq{y}|\seq{x})$。由于$\funp{P}(\seq{x}|\seq{y})$的输入$\seq{y}$是由$\funp{P}(\seq{y}|\seq{x})$采样得到,而采样操作不可导,这会导致梯度的传播在$\funp{P}(\seq{y}|\seq{x})$的输出处断开了,因此$\funp{P}(\seq{y}|\seq{x})$接收不到任何梯度来进行更新。常见的解决方案是使用策略梯度\upcite{DBLP:conf/nips/SuttonMSM99}。策略梯度的基本思想如下:如果在执行某个动作之后,获得了一个不错的反馈,那么可以调整策略来增加这个状态下执行该动作的概率;反之,如果采取某个动作后获得了一个负反馈,就需要调整策略来降低这个状态下执行该动作的概率。在算法的实现上,首先对两个翻译模型求梯度,然后在策略调整时选择将梯度加到模型上(获得正反馈)或者减去该梯度(获得负反馈)。
\vspace{0.5em}
\end{itemize}
\parinterval 这个过程与强化学习的流程非常相似。在训练过程中,模型无法知道某个状态下正确的行为是什么,只能通过这种试错-反馈的机制来反复调整。训练这两个模型可以用已有的强化学习算法来训练,比如策略梯度方法\upcite{DBLP:conf/nips/SuttonMSM99}。策略梯度的基本思想如下:如果我们在执行某个动作之后,获得了一个不错的反馈,那么我们会调整策略来增加这个状态下执行该动作的概率;反之,如果采取某个动作后获得了一个负反馈,就需要调整策略来降低这个状态下执行该动作的概率。在算法的实现上,首先对两个翻译模型求梯度,然后在策略调整时选择将梯度加到模型上(获得正反馈)或者减去该梯度(获得负反馈)。
%----------------------------------------------------------------------------------------
% NEW SECTION
......
\tikzstyle{process} = [rectangle,very thick,rounded corners,minimum width=4.7cm,minimum height=2.5cm,text centered,draw=black!70,fill=red!20]
\tikzstyle{cir} = [circle,thick,rounded corners,minimum width=0.7cm,text centered,draw=black,fill=green!25]
\begin{tikzpicture}[node distance = 0,scale = 0.7]
\tikzstyle{every node}=[scale=0.7]
\node(voice)[scale=1.0]{声波};
\node(microphone)[rectangle,right of = voice,xshift=1.4cm,yshift=-1cm,minimum width=0.32cm,minimum height=0.35cm,fill=black!85,draw=black!85]{};
\draw[black!85,line width=1.8]([yshift=0.38cm,xshift=-0.4cm]microphone.north)arc(180:360:0.4cm);
\node(microphone_1)[rectangle,minimum width=0.4cm,minimum height=0.8cm,rounded corners=3pt,above of =microphone,yshift=0.75cm,draw=black!85,line width=2.5]{};
\draw[-,black!85,very thick]([yshift=0.4cm,xshift=-0.2cm]microphone.north)--([yshift=0.4cm,xshift=-0cm]microphone.north);
\draw[-,black!85,very thick]([yshift=0.5cm,xshift=-0.2cm]microphone.north)--([yshift=0.5cm,xshift=-0cm]microphone.north);
\draw[-,black!85,very thick]([yshift=0.6cm,xshift=-0.2cm]microphone.north)--([yshift=0.6cm,xshift=-0cm]microphone.north);
\draw[-,black!85,line width=1.8]([yshift=0.6cm,xshift=-0.4cm]microphone.north)--([yshift=0.37cm,xshift=-0.4cm]microphone.north);
\draw[-,black!85,line width=1.8]([yshift=0.6cm,xshift=0.4cm]microphone.north)--([yshift=0.37cm,xshift=0.4cm]microphone.north);
\draw[black!85,line width=1]([yshift=0.8cm,xshift=-0.8cm]microphone.north)arc(-45:45:0.3cm);
\draw[black!85,line width=1]([yshift=0.75cm,xshift=-0.7cm]microphone.north)arc(-45:45:0.4cm);
\draw[black!85,line width=1]([yshift=0.7cm,xshift=-0.6cm]microphone.north)arc(-45:45:0.5cm);
\node(process_1)[process,right of = microphone,xshift=4.7cm,yshift=0.5cm]{};
\node(text_1)[below of = process_1,yshift=-2cm,scale=1.3]{采样};
\draw [very thick,rounded corners=10pt]([xshift=-2.2cm,yshift=-1cm]process_1.center)--([xshift=-1.8cm,yshift=1cm]process_1.center)--([xshift=-1.4cm,yshift=0cm]process_1.center)--([xshift=-1.1cm,yshift=0.8cm]process_1.center)--([xshift=-0.8cm,yshift=-0.4cm]process_1.center)--([xshift=-0.5cm,yshift=0.4cm]process_1.center);
\draw [->,very thick]([xshift=-0.3cm]process_1.center)to([xshift=0.3cm]process_1.center);
\draw [very thick,rounded corners=10pt,densely dotted]([xshift=0.5cm,yshift=-1cm]process_1.center)--([xshift=0.9cm,yshift=1cm]process_1.center)--([xshift=1.3cm,yshift=0cm]process_1.center)--([xshift=1.6cm,yshift=0.8cm]process_1.center)--([xshift=1.9cm,yshift=-0.4cm]process_1.center)--([xshift=2.2cm,yshift=0.4cm]process_1.center);
\node(process_2)[process,right of = process_1,xshift=6.6cm]{};
\node(text_2)[below of = process_2,yshift=-2cm,scale=1.3]{量化};
\draw [very thick,rounded corners=10pt,densely dotted]([xshift=-2.2cm,yshift=-1cm]process_2.center)--([xshift=-1.8cm,yshift=1cm]process_2.center)--([xshift=-1.4cm,yshift=0cm]process_2.center)--([xshift=-1.1cm,yshift=0.8cm]process_2.center)--([xshift=-0.8cm,yshift=-0.4cm]process_2.center)--([xshift=-0.5cm,yshift=0.4cm]process_2.center);
\draw [->,very thick]([xshift=-0.3cm]process_2.center)to([xshift=0.3cm]process_2.center);
\draw [very thick,]([xshift=0.5cm,yshift=-0.8cm]process_2.center)--([xshift=0.5cm,yshift=0.3cm]process_2.center)--([xshift=0.7cm,yshift=0.3cm]process_2.center)--([xshift=0.7cm,yshift=0.8cm]process_2.center)--([xshift=1cm,yshift=0.8cm]process_2.center)--([xshift=1cm,yshift=0.2cm]process_2.center)--([xshift=1.3cm,yshift=0.2cm]process_2.center)--([xshift=1.3cm,yshift=0.6cm]process_2.center)--([xshift=1.6cm,yshift=0.6cm]process_2.center)--([xshift=1.6cm,yshift=-0.3cm]process_2.center)--([xshift=1.8cm,yshift=-0.3cm]process_2.center)--([xshift=1.8cm,yshift=0.3cm]process_2.center)--([xshift=2cm,yshift=0.3cm]process_2.center);
\node(text1)[left of = process_1,xshift=-3.2cm,yshift=-0.5cm,align=center]{模拟\\语音信号};
\node(text2)[right of = process_1,xshift=3.3cm,yshift=-0.5cm,align=center]{离散\\时间信号};
\node(text3)[right of = process_2,xshift=3.2cm,yshift=-0.5cm,align=center]{数字离散\\时间信号};
\draw[->,very thick](process_1.east)to(process_2.west);
\draw[->,very thick]([xshift=-1.8cm]process_1.west)to(process_1.west);
\draw[->,very thick](process_2.east)to([xshift=1.8cm]process_2.east);
%%%%音频
\node(signal)[right of = process_2,xshift=5.5cm]{};
\draw[-,thick,]([xshift=-1.2cm]signal.center)--([xshift=1.2cm]signal.center);
\draw[-,thick]([xshift=-1cm,yshift=-0.8cm]signal.center)--([xshift=-0.9cm,yshift=0.4cm]signal.center)--([xshift=-0.8cm,yshift=-0.3cm]signal.center)--([xshift=-0.7cm,yshift=0.7cm]signal.center)--([xshift=-0.6cm,yshift=-0.1cm]signal.center)--([xshift=-0.5cm,yshift=0.3cm]signal.center)--([xshift=-0.4cm,yshift=-0.5cm]signal.center)--([xshift=-0.3cm,yshift=0.7cm]signal.center)--([xshift=-0.2cm,yshift=-0.2cm]signal.center)--([xshift=-0.1cm,yshift=0.4cm]signal.center)--([xshift=0cm,yshift=-0.9cm]signal.center)--([xshift=0.1cm,yshift=0.5cm]signal.center)--([xshift=0.2cm,yshift=-0.4cm]signal.center)--([xshift=0.3cm,yshift=0.3cm]signal.center)--([xshift=0.4cm,yshift=-0.2cm]signal.center)--([xshift=0.5cm,yshift=0.1cm]signal.center)--([xshift=0.6cm,yshift=-0.8cm]signal.center)--([xshift=0.7cm,yshift=0.4cm]signal.center)--([xshift=0.8cm,yshift=-0.6cm]signal.center)--([xshift=0.9cm,yshift=0.7cm]signal.center)--([xshift=1cm,yshift=-0.2cm]signal.center);
\end{tikzpicture}
\ No newline at end of file
\tikzstyle{process} = [rectangle,very thick,rounded corners,minimum width=3.2cm,minimum height=3cm,text centered,draw=black!70,fill=red!20]
\tikzstyle{cir} = [circle,thick,rounded corners,minimum width=0.7cm,text centered,draw=black,fill=green!25]
\begin{tikzpicture}[node distance = 0,scale = 0.5]
\tikzstyle{every node}=[scale=0.5]
\node(process_1)[process]{};
\draw[-,thick]([xshift=-1.2cm]process_1.center)--([xshift=1.2cm]process_1.center);
\draw[-,thick]([xshift=-1cm,yshift=-0.8cm]process_1.center)--([xshift=-0.9cm,yshift=0.4cm]process_1.center)--([xshift=-0.8cm,yshift=-0.3cm]process_1.center)--([xshift=-0.7cm,yshift=0.7cm]process_1.center)--([xshift=-0.6cm,yshift=-0.1cm]process_1.center)--([xshift=-0.5cm,yshift=0.3cm]process_1.center)--([xshift=-0.4cm,yshift=-0.5cm]process_1.center)--([xshift=-0.3cm,yshift=0.7cm]process_1.center)--([xshift=-0.2cm,yshift=-0.2cm]process_1.center)--([xshift=-0.1cm,yshift=0.4cm]process_1.center)--([xshift=0cm,yshift=-0.9cm]process_1.center)--([xshift=0.1cm,yshift=0.5cm]process_1.center)--([xshift=0.2cm,yshift=-0.4cm]process_1.center)--([xshift=0.3cm,yshift=0.3cm]process_1.center)--([xshift=0.4cm,yshift=-0.2cm]process_1.center)--([xshift=0.5cm,yshift=0.1cm]process_1.center)--([xshift=0.6cm,yshift=-0.8cm]process_1.center)--([xshift=0.7cm,yshift=0.4cm]process_1.center)--([xshift=0.8cm,yshift=-0.6cm]process_1.center)--([xshift=0.9cm,yshift=0.7cm]process_1.center)--([xshift=1cm,yshift=-0.2cm]process_1.center);
\node(text_1)[below of = process_1,yshift=-2cm,scale=1.5]{语音信号};
\node(process_2)[process,right of = process_1,xshift=7.0cm,text width=4cm,align=center]{\baselineskip=4pt\LARGE{[[0.2,...,0.3], \qquad ..., \qquad 0.3,...,0.5]]}\par};
\node(text_2)[below of = process_2,yshift=-2cm,scale=1.5]{语音特征};
\node(process_3)[process,,minimum width=6cm,minimum height=5cm,right of = process_2,xshift=8.2cm,text width=4cm,align=center]{};
\node(text_3)[below of = process_3,yshift=-3cm,scale=1.5]{源语文本及其词格};
\node(cir_s)[cir,very thick, below of = process_3,xshift=-2.2cm,yshift=1.1cm]{\LARGE S};
\node(cir_a)[cir,right of = cir_s,xshift=1cm,yshift=0.8cm]{\LARGE a};
\node(cir_c)[cir,right of = cir_a,xshift=1.2cm,yshift=0cm]{\LARGE c};
\node(cir_f)[cir,right of = cir_c,xshift=1.2cm,yshift=0cm]{\LARGE f};
\node(cir_E)[cir,very thick,right of = cir_f,xshift=1cm,yshift=-0.8cm]{\LARGE E};
\node(cir_b)[cir,right of = cir_s,xshift=1cm,yshift=-0.8cm]{\Large b};
\node(cir_d)[cir,right of = cir_b,xshift=1cm,yshift=0.6cm]{\Large d};
\node(cir_e)[cir, right of = cir_b,xshift=1cm,yshift=-0.8cm]{\LARGE e};
\node(cir_g)[cir,right of = cir_e,xshift=1cm,yshift=0.8cm]{\LARGE g};
\draw[-latex](cir_s)node[above,xshift=0.3cm,yshift=0.4cm]{0.4}to(cir_a);
\draw[-latex](cir_a)node[above,xshift=0.6cm,yshift=0cm]{1}to(cir_c);
\draw[-latex](cir_c)node[above,xshift=0.6cm,yshift=0cm]{1}to(cir_f);
\draw[-latex](cir_f)node[above,xshift=0.6cm,yshift=-0.3cm]{1}to(cir_E);
\draw[-latex](cir_s)node[above,xshift=0.7cm,yshift=-0.4cm]{0.6}to(cir_b);
\draw[-latex](cir_b)node[above,xshift=0.3cm,yshift=0.3cm]{0.8}to(cir_d);
\draw[-latex](cir_b)node[above,xshift=0.7cm,yshift=-0.4cm]{0.2}to(cir_e);
\draw[-latex](cir_e)node[above,xshift=0.3cm,yshift=0.3cm]{1}to(cir_g);
\draw[-latex](cir_d)node[above,xshift=0.7cm,yshift=0cm]{1}to(cir_f);
\draw[-latex](cir_g)node[above,xshift=0.6cm,yshift=0.3cm]{1}--(cir_E);
\node(text)[below of = process_3,yshift=-1.8cm,scale=1.8]{你是谁};
\node(process_4)[process,right of = process_3,xshift=8.2cm,text width=4cm,align=center]{\Large\textbf{Who are you?}};
\node(text_4)[below of = process_4,yshift=-2cm,scale=1.5]{翻译译文};
\draw[->,very thick](process_1.east)to(process_2.west);
\draw[->,very thick](process_2.east)to(process_3.west);
\draw[->,very thick](process_3.east)to(process_4.west);
\node(arrow_text1)[right of = process_1,xshift=3.2cm,yshift=0.7cm,scale=1.4,align=center]{音频\\特征提取};
\node(arrow_text2)[right of = process_2,xshift=3.6cm,yshift=0.7cm,scale=1.4,align=center]{语音\\识别系统};
\node(arrow_text3)[right of = process_3,xshift=4.5cm,yshift=0.4cm,scale=1.4]{翻译系统};
\end{tikzpicture}
\ No newline at end of file
\tikzstyle{process} = [rectangle,very thick,rounded corners,minimum width=5cm,minimum height=2.5cm,text centered,draw=black!70,fill=red!25]
\tikzstyle{cir} = [circle,thick,rounded corners,minimum width=0.7cm,text centered,draw=black,fill=green!25]
\begin{tikzpicture}[node distance = 0,scale = 1]
\tikzstyle{every node}=[scale=1]
\node [anchor=center](ori) at (-0.2,-0.2) {$O$};
\draw[->,thick](-0.5,0)--(5,0)node[below]{$t$};
\draw[->,thick](0,-2)--(0,2)node[left,scale=0.8]{量化值};
\draw[-,thick](0,0)sin(0.7,1.5)cos(1.4,0)sin(2.1,-1.5)cos(2.8,0)sin(3.5,1.5)cos(4.2,0);
\draw[-,thick,dashed](0.5,-1.8)--(0.5,1.8);
\draw[-](1.2,-1.8)--(1.2,1.8);
\draw[-,thick,dashed](1.9,-1.8)--(1.9,1.8);
\draw[<->,thick](0,-1.1)--(1.2,-1.1)node[left,xshift=-0.05cm,yshift=0.15cm,scale=0.6]{帧长};
\draw[<->,thick](0,-1.4)--(0.5,-1.4)node[left,xshift=0.05cm,yshift=-0.25cm,scale=0.6]{帧移};
\draw[<->,thick](0.5,-1.4)--(1.9,-1.4);
\end{tikzpicture}
\ No newline at end of file
\tikzstyle{coder} = [rectangle,thick,rounded corners,minimum width=2.3cm,minimum height=1cm,text centered,draw=black!70,fill=red!25]
\begin{tikzpicture}[node distance = 0,scale = 0.75]
\tikzstyle{every node}=[scale=0.75]
\node(encoder)[coder]{\large{编码器}};
\node(decoder_1)[coder,above of =encoder,xshift=-1.6cm,yshift=2.4cm,fill=blue!20]{\large{解码器}};
\node(decoder_2)[coder,above of =encoder, xshift=1.6cm,yshift=2.4cm,fill=yellow!25]{\large{解码器}};
\node(s)[below of = encoder,yshift=-1.8cm,scale=1.6]{$s$};
\node(y)[above of = decoder_2,yshift=1.8cm,scale=1.6]{$y$};
\draw[->,thick](s.north)to(encoder.south);
\draw[->,thick](decoder_1.east)to(decoder_2.west);
\draw[->,thick](decoder_2.north)to(y.south);
\draw[->,thick](encoder.north)--([yshift=0.6725cm]encoder.north)--([yshift=-0.7cm]decoder_1.south)--(decoder_1.south);
\draw[->,thick](encoder.north)--([yshift=0.6725cm]encoder.north)--([yshift=-0.7cm]decoder_2.south)--(decoder_2.south);
\end{tikzpicture}
\ No newline at end of file
\tikzstyle{coder} = [rectangle,thick,rounded corners,minimum width=2.3cm,minimum height=1cm,text centered,draw=black!70,fill=red!20]
\begin{tikzpicture}[node distance = 0,scale = 0.75]
\tikzstyle{every node}=[scale=0.75]
\node(encoder)[coder]at (0,0){\large{编码器}};
\node(decoder_1)[coder,above of =encoder,xshift=-1.6cm,yshift=2.8cm,fill=blue!20]{\large{解码器}};
\node(decoder_2)[coder,above of =encoder, xshift=1.6cm,yshift=2.8cm,fill=yellow!20]{\large{解码器}};
\node(s)[below of = encoder,yshift=-1.8cm,scale=1.6]{$s$};
\node(x)[above of = decoder_1,yshift=1.8cm,scale=1.6]{$x$};
\node(y)[above of = decoder_2,yshift=1.8cm,scale=1.6]{$y$};
\draw[->,thick](s.north)to(encoder.south);
\draw[->,thick](decoder_1.north)to(x.south);
\draw[->,thick](decoder_2.north)to(y.south);
\draw[->,thick](encoder.north)--([yshift=0.7cm]encoder.north)--([xshift=-4.16em,yshift=0.7cm]encoder.north)--(decoder_1.south);
\draw[->,thick](encoder.north)--([yshift=0.7cm]encoder.north)--([xshift=4.16em,yshift=0.7cm]encoder.north)--(decoder_2.south);
\node [anchor=north](pos1) at (s.south) {(a) 单编码器-双解码器方式};
%%%%%%%%%%%%%%%%%%%%%%%%级联
\node(encoder-2)[coder]at ([xshift=10.0em]encoder.east){\large{编码器}};
\node(decoder_1-2)[coder,above of =encoder-2,yshift=1.4cm,fill=blue!20]{\large{解码器}};
\node(decoder_2-2)[coder,above of =decoder_1-2, yshift=1.4cm,fill=yellow!20]{\large{解码器}};
\node(s-2)[below of = encoder-2,yshift=-1.8cm,scale=1.6]{$s$};
\node(y-2)[above of = decoder_2-2,yshift=1.8cm,scale=1.6]{$y$};
\draw[->,thick](s-2.north)to(encoder-2.south);
\draw[->,thick](encoder-2.north)to(decoder_1-2.south);
\draw[->,thick](decoder_1-2.north)to(decoder_2-2.south);
\draw[->,thick](decoder_2-2.north)to(y-2.south);
\node [anchor=north](pos2) at (s-2.south) {(b) 级联编码器方式};
%%%%%%%%%%%%%%%%%%%%%%%%联合
\node(encoder-3)[coder]at([xshift=10.0em]encoder-2.east){\large{编码器}};
\node(decoder_1-3)[coder,above of =encoder-3,xshift=-1.6cm,yshift=2.8cm,fill=blue!20]{\large{解码器}};
\node(decoder_2-3)[coder,above of =encoder-3, xshift=1.6cm,yshift=2.8cm,fill=yellow!20]{\large{解码器}};
\node(s-3)[below of = encoder-3,yshift=-1.8cm,scale=1.6]{$s$};
\node(y-3)[above of = decoder_2-3,yshift=1.8cm,scale=1.6]{$y$};
\draw[->,thick](s-3.north)to(encoder-3.south);
\draw[->,thick](decoder_1-3.east)to(decoder_2-3.west);
\draw[->,thick](decoder_2-3.north)to(y-3.south);
\draw[->,thick](encoder-3.north)--([yshift=0.7cm]encoder-3.north)--([xshift=-4.16em,yshift=0.7cm]encoder-3.north)--(decoder_1-3.south);
\draw[->,thick](encoder-3.north)--([yshift=0.7cm]encoder-3.north)--([xshift=4.16em,yshift=0.7cm]encoder-3.north)--(decoder_2-3.south);
\node [anchor=north](pos3) at (s-3.south) {(c) 联合编码器方式};
\end{tikzpicture}
\ No newline at end of file
......@@ -56,19 +56,28 @@
\subsection{音频处理}
\parinterval 不同于文本,音频本质上是经过若干信号处理之后的{\small\bfnew{波形}}(Waveform)\index{Waveform}。具体来说,声音是一种空气的震动,因此可以被转换为模拟信号。模拟信号是一段连续的信号,经过采样变为离散数字信号。采样是每隔固定的时间记录一下声音的振幅,采样率表示每秒的采样点数,单位是赫兹(Hz)。采样率越高,结果的损失则越小。通常来说,采样的标准是能够通过离散化的数字信号重现原始语音。我们日常生活中使用的手机和电脑设备的采样率一般为16kHz,表示每秒16000个采样点;而音频CD的采样率可以达到44.1kHz。经过进一步的量化,将采样点的值转换为整型数值保存,从而减少占用的存储空间,通常采用的是16位量化。将采样率和量化位数相乘,就可以得到{\small\bfnew{比特率}}\index{比特率}(Bits Per Second,BPS)\index{Bits Per Second},表示音频每秒占用的位数。16kHz采样率和16位量化的音频,比特率为256kb/s。整体流程如图\ref{fig:17-2-1}所示\upcite{洪青阳2020语音识别原理与应用,陈果果2020语音识别实战}
\parinterval 不同于文本,音频本质上是经过若干信号处理之后的{\small\bfnew{波形}}(Waveform)\index{Waveform}。具体来说,声音是一种空气的震动,因此可以被转换为模拟信号。模拟信号是一段连续的信号,经过采样变为离散数字信号。采样是每隔固定的时间记录一下声音的振幅,采样率表示每秒的采样点数,单位是赫兹(Hz)。采样率越高,结果的损失则越小。通常来说,采样的标准是能够通过离散化的数字信号重现原始语音。我们日常生活中使用的手机和电脑设备的采样率一般为16kHz,表示每秒16000个采样点;而音频CD的采样率可以达到44.1kHz。经过进一步的量化,将采样点的值转换为整型数值保存,从而减少占用的存储空间,通常采用的是16位量化。将采样率和量化位数相乘,就可以得到{\small\bfnew{比特率}}\index{比特率}(Bits Per Second,BPS)\index{Bits Per Second},表示音频每秒占用的位数。16kHz采样率和16位量化的音频,比特率为256kb/s。整体流程如图\ref{fig:17-1}所示\upcite{洪青阳2020语音识别原理与应用,陈果果2020语音识别实战}
%----------------------------------------------------------------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter17/Figures/figure-audio-processing}
\caption{音频处理过程}
\label{fig:17-2-1}
\label{fig:17-1}
\end{figure}
%----------------------------------------------------------------------------------------------------
\parinterval 经过上面的描述,音频的表示实际上是一个非常长的采样点序列,这导致了直接使用现有的深度学习技术处理音频序列较为困难。并且,原始的音频信号中可能包含着较多的噪声、环境声或冗余信息也会对模型产生干扰。因此,一般会对音频序列进行处理来提取声学特征,具体为将长序列的采样点序列转换为短序列的特征向量序列,再用于下游系统模块。虽然已有一些工作不依赖特征提取,直接在原始的采样点序列上进行声学建模和模型训练\upcite{DBLP:conf/interspeech/SainathWSWV15},但目前的主流方法仍然是基于声学特征进行建模\upcite{DBLP:conf/icassp/MohamedHP12}
\parinterval 声学特征提取的第一步是预处理。其流程主要是对音频进行预加重、分帧和加窗。预加重用来提升音频信号中的高频部分,目的是使频谱更加平滑。分帧是基于短时平稳假设,即根据生物学特征,语音信号是一个缓慢变化的过程,10ms~30ms的信号片段是相对平稳的。基于这个假设,一般将每25ms作为一帧来提取特征,这个时间称为{\small\bfnew{帧长}}\index{帧长}(Frame Length)\index{Frame Length}。同时,为了保证不同帧之间的信号平滑性,使每两个相邻帧之间存在一定的重合部分。一般每隔10ms取一帧,这个时长称为{\small\bfnew{帧移}}\index{帧移}(Frame Shift)\index{Frame Shift}。为了缓解分帧带来的频谱泄漏,对每帧的信号进行加窗处理使其幅度在两段渐变到0,一般采用的是{\small\bfnew{汉明窗}}\index{汉明窗}(Hamming)\index{Hamming}
%----------------------------------------------------------------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter17/Figures/figure-framing-schematic}
\caption{分帧原理图}
\label{fig:17-2}
\end{figure}
%----------------------------------------------------------------------------------------------------
\parinterval 经过了上述的预处理操作,可以得到音频对应的帧序列,之后通过不同的操作来提取不同类型的声学特征。常用的声学特征包括{\small\bfnew{Mel频率倒谱系数}}\index{Mel频率倒谱系数}(Mel-Frequency Cepstral Coefficient, MFCC)\index{Mel-Frequency Cepstral Coefficient}{\small\bfnew{感知线性预测系数}}\index{感知线性预测系数}(Perceptual Lienar Predictive, PLP)\index{Perceptual Lienar Predictive}{\small\bfnew{滤波器组}}\index{滤波器组}(Filter-bank, Fbank)\index{Filter-bank}等。MFCC、PLP和Fbank特征都需要对预处理后的音频做{\small\bfnew{短时傅里叶变换}}\index{短时傅里叶变换}(Short-time Fourier Tranform, STFT)\index{Short-time Fourier Tranform},得到具有规律的线性分辨率。之后再经过特定的操作,得到各种声学特征。不同声学特征的特点是不同的,MFCC去相关性较好,PLP抗噪性强,FBank可以保留更多的语音原始特征。在语音翻译中,比较常用的声学特征为FBank或MFCC\upcite{洪青阳2020语音识别原理与应用}
......@@ -80,13 +89,14 @@
\subsection{级联式语音翻译}
\parinterval 实现语音翻译最简单的思路是基于级联的方式,即:先通过{\small\bfnew{自动语音识别}}\index{自动语音识别}(Automatic Speech Recognition,ASR)\index{Automatic Speech Recognition}系统将语音识别为源语言文本,然后利用机器翻译系统将源语言文本翻译为目标语言文本。这种做法的好处在于语音识别和机器翻译模型可以分别进行训练,有很多数据资源以及成熟技术可以分别运用到两个系统中。因此,级联语音翻译是很长时间以来的主流方法,深受工业界的青睐。级联语音翻译主要的流程如图\ref{fig:17-2-2}所示。
\parinterval 实现语音翻译最简单的思路是基于级联的方式,即:先通过{\small\bfnew{自动语音识别}}\index{自动语音识别}(Automatic Speech Recognition,ASR)\index{Automatic Speech Recognition}系统将语音识别为源语言文本,然后利用机器翻译系统将源语言文本翻译为目标语言文本。这种做法的好处在于语音识别和机器翻译模型可以分别进行训练,有很多数据资源以及成熟技术可以分别运用到两个系统中。因此,级联语音翻译是很长时间以来的主流方法,深受工业界的青睐。级联语音翻译主要的流程如图\ref{fig:17-3}所示。
%----------------------------------------------------------------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter17/Figures/figure-cascading-speech-translation}
\caption{级联语音翻译}
\label{fig:17-2-2}
\label{fig:17-3}
\end{figure}
%----------------------------------------------------------------------------------------------------
......@@ -177,9 +187,9 @@
\parinterval 针对这两个问题,研究人员们也提出了很多方法进行缓解,包括多任务学习、迁移学习等,主要思想都是利用语音识别或文本翻译数据来指导语音模型学习。并且,文本翻译中的很多方法和思想都对语音翻译技术的发展提供了思路。如何将其他领域现有的工作在语音翻译任务上验证,并针对语音这一信息载体进行特定的建模适应,是语音翻译任务当前的研究重点\upcite{DBLP:conf/mtsummit/GangiNCDT19}
%----------------------------------------------------------------------------------------------------
\begin{itemize}
\vspace{0.5em}
\item 多任务学习。针对语音翻译模型建模复杂度较高问题,常用的一个方法是进行多任务学习,使模型在训练过程中有更多的监督信息,从而使模型收敛地更加充分。语音语言中多任务学习主要借助语音对应的标注信息,也就是源语言文本。{\small\bfnew{连接时序分类}}\index{连接时序分类}(Connectionist Temporal Classification,CTC)\index{Connectionist Temporal Classification}\upcite{DBLP:conf/icml/GravesFGS06}是语音处理中最简单有效的一种多任务学习方法\upcite{DBLP:journals/jstsp/WatanabeHKHH17,DBLP:conf/icassp/KimHW17},也被广泛应用于文本识别任务中\upcite{DBLP:journals/pami/ShiBY17}。CTC可以将输入序列的每一位置都对应到标注文本中,学习语音和文字之间的软对齐关系。比如,对于下面的音频序列,CTC可以将每个位置分别对应到同一个词。需要注意的是,CTC会额外新增一个词$\epsilon$,类似于一个空白词,表示这个位置没有声音或者没有任何对应的预测结果。然后,将相同且连续的词合并,去除$\epsilon$,就可以得到预测结果,如图\ref{fig:17-2-6}所示。
\noindent{\small\bfnew{1)多任务学习}}
\parinterval 针对语音翻译模型建模复杂度较高问题,常用的一个方法是进行多任务学习,使模型在训练过程中有更多的监督信息,从而使模型收敛地更加充分。语音语言中多任务学习主要借助语音对应的标注信息,也就是源语言文本。{\small\bfnew{连接时序分类}}\index{连接时序分类}(Connectionist Temporal Classification,CTC)\index{Connectionist Temporal Classification}\upcite{DBLP:conf/icml/GravesFGS06}是语音处理中最简单有效的一种多任务学习方法\upcite{DBLP:journals/jstsp/WatanabeHKHH17,DBLP:conf/icassp/KimHW17},也被广泛应用于文本识别任务中\upcite{DBLP:journals/pami/ShiBY17}。CTC可以将输入序列的每一位置都对应到标注文本中,学习语音和文字之间的软对齐关系。比如,对于下面的音频序列,CTC可以将每个位置分别对应到同一个词。需要注意的是,CTC会额外新增一个词$\epsilon$,类似于一个空白词,表示这个位置没有声音或者没有任何对应的预测结果。然后,将相同且连续的词合并,去除$\epsilon$,就可以得到预测结果,如图\ref{fig:17-2-6}所示。
%----------------------------------------------------------------------------------------------------
\begin{figure}[htp]
......@@ -211,21 +221,24 @@
\end{figure}
%----------------------------------------------------------------------------------------------------
\parinterval 另外一种多任务学习的思想是通过两个解码器,分别预测语音对应的源语言句子和目标语言句子,具体有图XXX展示的三种方式\upcite{DBLP:conf/naacl/AnastasopoulosC18,DBLP:conf/asru/BaharBN19}。图\ref{fig:17-2-8}(a)中采用单编码器-双解码器的方式,两个解码器根据编码器的表示,分别预测源语言句子和目标语言句子,从而使编码器训练地更加充分。这种做法的好处在于仅仅增加了训练代价,解码时只需要生成目标语言句子即可。图\ref{fig:17-2-8}(b)则通过使用两个级联的解码器,先利用第一个解码器生成源语言句子,然后再利用第一个解码器的表示,通过第二个解码器生成目标语言句子。这种方法通过增加一个中间输出,降低了模型的训练难度,但同时也会带来额外的解码耗时,因为两个解码器需要串行地进行生成。图\ref{fig:17-2-8}(c)中模型更进一步,第二个编码器联合编码器和第一个解码器的表示进行生成,更充分地利用了已有信息。
\parinterval 另外一种多任务学习的思想是通过两个解码器,分别预测语音对应的源语言句子和目标语言句子,具体有图\ref{fig:17-9}展示的三种方式\upcite{DBLP:conf/naacl/AnastasopoulosC18,DBLP:conf/asru/BaharBN19}。图\ref{fig:17-9}(a)中采用单编码器-双解码器的方式,两个解码器根据编码器的表示,分别预测源语言句子和目标语言句子,从而使编码器训练地更加充分。这种做法的好处在于仅仅增加了训练代价,解码时只需要生成目标语言句子即可。图\ref{fig:17-9}(b)则通过使用两个级联的解码器,先利用第一个解码器生成源语言句子,然后再利用第一个解码器的表示,通过第二个解码器生成目标语言句子。这种方法通过增加一个中间输出,降低了模型的训练难度,但同时也会带来额外的解码耗时,因为两个解码器需要串行地进行生成。图\ref{fig:17-9}(c)中模型更进一步,第二个编码器联合编码器和第一个解码器的表示进行生成,更充分地利用了已有信息。
%----------------------------------------------------------------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter17/Figures/figure-three-ways-of-dual-decoder-speech-translation}
\caption{双解码器语音翻译的三种方式}
\label{fig:17-2-8}
\label{fig:17-9}
\end{figure}
%----------------------------------------------------------------------------------------------------
\vspace{0.5em}
\item 迁移学习。相比语音识别和文本翻译,端到端语音翻译的训练数据量要小很多,因此,如何利用其它数据来增加可用的数据量是语音翻译的一个重要方向。和文本翻译中的方法相似,一种思路是利用迁移学习或预训练,利用其他语言的双语数据预训练模型参数,然后迁移到目标语言任务上\upcite{DBLP:conf/naacl/BansalKLLG19},或者是利用语音识别数据或文本翻译数据,分别预训练编码器和解码器参数,用于初始化语音翻译模型参数\upcite{DBLP:conf/icassp/BerardBKP18}。预训练的编码器对语音翻译模型的学习尤为重要\upcite{DBLP:conf/naacl/BansalKLLG19},相比文本数据,语音数据的复杂性更高,如果仅从小规模语音翻译数据上学习很难学习充分。此外,模型对声学特征的学习与语言并不是强相关的,在其他语种预训练的编码器对模型学习也是有帮助的。
\vspace{0.5em}
\item 数据增强。数据增强是增加训练数据最简单直观的一种方法。但是相比文本翻译中,可以利用回译的方法生成伪数据(见{\chaptersixteen})。语音翻译正向翻译模型通过源语言语音生成目标语言文本,如果直接利用回译的思想,需要通过一个模型,将目标语文本翻译为目标语语音,但实际上这种模型是不能简单得到。因此,一个简单的思路是通过一个反向翻译模型和语音合成模型级联来生成伪数据\upcite{DBLP:conf/icassp/JiaJMWCCALW19}。另外,正向翻译模型生成的伪数据在文本翻译中也被验证了对模型训练有一定的帮助,因此同样可以利用语音识别和文本翻译模型,将源语言语音生成目标语言翻译,得到伪平行语料。
\end{itemize}
\noindent{\small\bfnew{2)迁移学习}}
\parinterval 相比语音识别和文本翻译,端到端语音翻译的训练数据量要小很多,因此,如何利用其它数据来增加可用的数据量是语音翻译的一个重要方向。和文本翻译中的方法相似,一种思路是利用迁移学习或预训练,利用其他语言的双语数据预训练模型参数,然后迁移到目标语言任务上\upcite{DBLP:conf/naacl/BansalKLLG19},或者是利用语音识别数据或文本翻译数据,分别预训练编码器和解码器参数,用于初始化语音翻译模型参数\upcite{DBLP:conf/icassp/BerardBKP18}。预训练的编码器对语音翻译模型的学习尤为重要\upcite{DBLP:conf/naacl/BansalKLLG19},相比文本数据,语音数据的复杂性更高,如果仅从小规模语音翻译数据上学习很难学习充分。此外,模型对声学特征的学习与语言并不是强相关的,在其他语种预训练的编码器对模型学习也是有帮助的。
\noindent{\small\bfnew{3)数据增强}}
\parinterval 数据增强是增加训练数据最简单直观的一种方法。但是相比文本翻译中,可以利用回译的方法生成伪数据(见{\chaptersixteen})。语音翻译正向翻译模型通过源语言语音生成目标语言文本,如果直接利用回译的思想,需要通过一个模型,将目标语文本翻译为目标语语音,但实际上这种模型是不能简单得到。因此,一个简单的思路是通过一个反向翻译模型和语音合成模型级联来生成伪数据\upcite{DBLP:conf/icassp/JiaJMWCCALW19}。另外,正向翻译模型生成的伪数据在文本翻译中也被验证了对模型训练有一定的帮助,因此同样可以利用语音识别和文本翻译模型,将源语言语音生成目标语言翻译,得到伪平行语料。
%----------------------------------------------------------------------------------------------------
\parinterval 此外,研究人员们还探索了很多其他方法来提高语音翻译模型的性能。利用在海量的无标注语音数据上预训练的{\small\bfnew{自监督}}\index{自监督}(Self-supervised)\index{Self-supervised}模型作为一个特征提取器,将从语音中提取的特征作为语音翻译模型的输入,可以有效提高模型的性能\upcite{DBLP:conf/interspeech/WuWPG20}。相比语音翻译模型,文本翻译模型任务更加简单,因此一种思想是利用文本翻译模型来指导语音翻译模型,比如通过知识蒸馏\upcite{DBLP:conf/interspeech/LiuXZHWWZ19}、正则化\upcite{DBLP:conf/emnlp/AlinejadS20}等方法。为了简化语音翻译模型的学习,可以通过课程学习的策略,使模型从语音识别任务,逐渐过渡到语音翻译任务,这种由易到难的训练策略可以使模型训练更加充分\upcite{DBLP:journals/corr/abs-1802-06003,DBLP:conf/acl/WangWLZY20}
......
......@@ -137,27 +137,24 @@
\parinterval 除了对译文进行简单的打分,另一种经典的人工评价方法是{\small\sffamily\bfseries{相对排序}}\index{相对排序}(Relative Ranking,RR)\index{Relative Ranking}\upcite{DBLP:conf/wmt/Callison-BurchF07}。这种方法通过对不同机器翻译的译文质量进行相对排序得到最终的评价结果。举例来说:
\parinterval (1)在每次评价过程中,若干个等待评价的机器翻译系统被分为5个一组,评价者被提供3个连续的源文片段和1组机器翻译系统的相应译文;
\parinterval (2)评价者需要对本组的机器译文根据其质量进行排序,不过评价者并不需要一次性将5个译文排序,而是将其两两进行比较,判出胜负或是平局。在评价过程中,由于排序是两两一组进行的,为了评价的公平性,将采用排列组合的方式进行分组和比较,若共有$n$个机器翻译系统,则会为被分为 $\textrm{C}_n^5$组,组内每个系统都将与其他4个系统进行比较,由于需要针对3个源文片段进行评价对比,则意味着每个系统都需要被比较$\textrm{C}_n^5 \times 4 \times 3$次;
\parinterval (3)最终根据多次比较的结果,对所有参与评价的系统进行总体排名。对于如何获取合理的总体排序,有三种常见的策略:
\begin{itemize}
\vspace{0.5em}
\item {\small\sffamily\bfseries{根据系统胜出的次数进行排序}}\upcite{DBLP:conf/wmt/Callison-BurchK12}。以系统${S}_j$和系统${S}_k$为例,两个系统都被比较了$\textrm{C}_n^5 \times 4 \times 3$ 次,其中系统${S}_j$获胜20次,系统${S}_k$获胜30次,总体排名中系统${S}_k$优于系统${S}_j$
\item 在每次评价过程中,若干个等待评价的机器翻译系统被分为5个一组,评价者被提供3个连续的源文片段和1组机器翻译系统的相应译文;
\vspace{0.5em}
\item {\small\sffamily\bfseries{根据冲突次数进行排序}}\upcite{DBLP:conf/wmt/Lopez12}。第一种排序策略中存在冲突现象:例如在每次两两比较中,系统${S}_j$胜过系统${S}_k$ 的次数比系统${S}_j$不敌系统${S}_k$的次数多,若待评价系统仅有系统${S}_j$${S}_k$,显然系统${S}_j$的排名高于系统${S}_k$。但当待评价系统很多时,可能系统${S}_j$在所有比较中获胜的次数低于系统${S}_k$,此时就出现了总体排序与局部排序不一致的冲突。因此,有研究者提出,能够与局部排序冲突最少的总体排序才是最合理的。令$O$表示一个对若干个系统的排序,该排序所对应的冲突定义为:
\item 评价者需要对本组的机器译文根据其质量进行排序,不过评价者并不需要一次性将5个译文排序,而是将其两两进行比较,判出胜负或是平局。在评价过程中,由于排序是两两一组进行的,为了评价的公平性,将采用排列组合的方式进行分组和比较,若共有$n$个机器翻译系统,则会为被分为 $\textrm{C}_n^5$组,组内每个系统都将与其他4个系统进行比较,由于需要针对3个源文片段进行评价对比,则意味着每个系统都需要被比较$\textrm{C}_n^5 \times 4 \times 3$次;
\vspace{0.5em}
\item 最终根据多次比较的结果,对所有参与评价的系统进行总体排名。对于如何获取合理的总体排序,有三种常见的策略:
\begin{itemize}
\item {\small\sffamily\bfseries{根据系统胜出的次数进行排序}}\upcite{DBLP:conf/wmt/Callison-BurchK12}。以系统${S}_j$和系统${S}_k$为例,两个系统都被比较了$\textrm{C}_n^5 \times 4 \times 3$ 次,其中系统${S}_j$获胜20次,系统${S}_k$获胜30次,总体排名中系统${S}_k$优于系统${S}_j$
\item {\small\sffamily\bfseries{根据冲突次数进行排序}}\upcite{DBLP:conf/wmt/Lopez12}。第一种排序策略中存在冲突现象:例如在每次两两比较中,系统${S}_j$胜过系统${S}_k$ 的次数比系统${S}_j$不敌系统${S}_k$的次数多,若待评价系统仅有系统${S}_j$${S}_k$,显然系统${S}_j$的排名高于系统${S}_k$。但当待评价系统很多时,可能系统${S}_j$在所有比较中获胜的次数低于系统${S}_k$,此时就出现了总体排序与局部排序不一致的冲突。因此,有研究者提出,能够与局部排序冲突最少的总体排序才是最合理的。令$O$表示一个对若干个系统的排序,该排序所对应的冲突定义为:
\begin{eqnarray}
\textrm{conflict}(O) &=& \sum\limits_{{{S}_j} \in O,{{S}_k} \in O,j \ne k} {{\textrm{max}}(0,\textrm{count}_{\textrm{win}}({{S}_j},{{S}_k}) - \textrm{count}_{\textrm{loss}}({{S}_j},{{S}_k}))}
\label{eq:4-1}
\end{eqnarray}
其中,${S}_j$${S}_k$是成对比较的两个系统,$\textrm{count}_{\textrm{win}}({S}_j,{S}_k)$$\textrm{count}_{\textrm{loss}}({S}_j,{S}_k)$分别是${S}_j$${S}_k$进行成对比较时系统${S}_j$ 胜利和失败的次数。而使得$\textrm{conflict}(O)$最低的$O$就是最终的系统排序结果。
\vspace{0.5em}
\item {\small\sffamily\bfseries{根据某系统最终获胜的期望进行排序}}\upcite{DBLP:conf/iwslt/Koehn12}。以系统${S}_j$为例,若共有$n$个待评价的系统,则进行总体排序时系统 ${S}_j$ 的得分为其最终获胜的期望,即:
其中,${S}_j$${S}_k$是成对比较的两个系统,$\textrm{count}_{\textrm{win}}({S}_j,{S}_k)$$\textrm{count}_{\textrm{loss}}({S}_j,{S}_k)$分别是${S}_j$${S}_k$进行成对比较时系统${S}_j$ 胜利和失败的次数。而使得$\textrm{conflict}(O)$最低的$O$就是最终的系统排序结果。
\item {\small\sffamily\bfseries{根据某系统最终获胜的期望进行排序}}\upcite{DBLP:conf/iwslt/Koehn12}。以系统${S}_j$为例,若共有$n$个待评价的系统,则进行总体排序时系统 ${S}_j$ 的得分为其最终获胜的期望,即:
\begin{eqnarray}
\textrm{score}({{S}_j}) &=& \frac{1}{n}\sum\limits_{k,k \ne j} {\frac{\textrm{count}_{\textrm{win}}({{S}_j},{{S}_k})}{{\textrm{count}_{\textrm{win}}({{S}_j},{{S}_k}) + \textrm{count}_{\textrm{loss}}({{S}_j},{{S}_k})}}}
......@@ -165,7 +162,7 @@
\end{eqnarray}
根据公式\eqref{eq:4-2}可以看出,该策略去除了平局的影响。
\end{itemize}
\vspace{0.5em}
\end{itemize}
......@@ -291,11 +288,11 @@
\parinterval 在Meteor方法中,首先在机器译文与参考答案之间建立单词之间的对应关系,再根据其对应关系计算准确率和召回率。
\parinterval (1)单词之间的对应关系在建立过程中主要涉及三个模型,在对齐过程中依次使用这三个模型进行匹配:
\begin{itemize}
\vspace{0.5em}
\item {\small\sffamily\bfseries{“绝对”匹配模型}}\index{“绝对”匹配模型}(Exact Model)\index{Exact Model}。绝对匹配模型在建立单词对应关系时,要求机器译文端的单词与参考答案端的单词完全一致,并且在参考答案端至多有1个单词与机器译文端的单词对应,否则会将其视为多种对应情况。对于实例\ref{eg:4-2},使用“绝对”匹配模型,共有两种匹配结果,如图\ref{fig:4-3}所示。
\item 在机器译文与参考答案之间建立单词之间的对应关系。单词之间的对应关系在建立过程中主要涉及三个模型,在对齐过程中依次使用这三个模型进行匹配:
\begin{itemize}
\item {\small\sffamily\bfseries{“绝对”匹配模型}}\index{“绝对”匹配模型}(Exact Model)\index{Exact Model}。绝对匹配模型在建立单词对应关系时,要求机器译文端的单词与参考答案端的单词完全一致,并且在参考答案端至多有1个单词与机器译文端的单词对应,否则会将其视为多种对应情况。对于实例\ref{eg:4-2},使用“绝对”匹配模型,共有两种匹配结果,如图\ref{fig:4-3}所示。
%----------------------------------------------
\begin{figure}[htp]
......@@ -306,9 +303,7 @@
\label{fig:4-3}
\end{figure}
%----------------------------------------------
\vspace{0.5em}
\item {\small\sffamily\bfseries{“波特词干”匹配模型}}\index{“波特词干”匹配模型}(Porter Stem Model)\index{Porter Stem Model}。该模型在“绝对”匹配结果的基础上,对尚未对齐的单词进行基于词干的匹配,只需机器译文端单词与参考答案端单词的词干相同即可,如上文中的“do”和“did”。对于图\ref{fig:4-3}中显示的词对齐结果,再使用“波特词干” 匹配模型,得到如图\ref{fig:4-4}所示的结果。
\item {\small\sffamily\bfseries{“波特词干”匹配模型}}\index{“波特词干”匹配模型}(Porter Stem Model)\index{Porter Stem Model}。该模型在“绝对”匹配结果的基础上,对尚未对齐的单词进行基于词干的匹配,只需机器译文端单词与参考答案端单词的词干相同即可,如上文中的“do”和“did”。对于图\ref{fig:4-3}中显示的词对齐结果,再使用“波特词干” 匹配模型,得到如图\ref{fig:4-4}所示的结果。
%----------------------------------------------
\begin{figure}[htp]
......@@ -318,9 +313,7 @@
\label{fig:4-4}
\end{figure}
%----------------------------------------------
\vspace{0.5em}
\item {\small\sffamily\bfseries{“同义词”匹配模型}}\index{“同义词”匹配模型}(WN Synonymy Model)\index{WN Synonymy Model}。该模型在前两个模型匹配结果的基础上,对尚未对齐的单词进行同义词的匹配,即基于WordNet词典匹配机器译文与参考答案中的同义词。如实例\ref{eg:4-2}中的“eat”和“have”。图\ref{fig:4-5}给出了一个真实的例子。
\item {\small\sffamily\bfseries{“同义词”匹配模型}}\index{“同义词”匹配模型}(WN Synonymy Model)\index{WN Synonymy Model}。该模型在前两个模型匹配结果的基础上,对尚未对齐的单词进行同义词的匹配,即基于WordNet词典匹配机器译文与参考答案中的同义词。如实例\ref{eg:4-2}中的“eat”和“have”。图\ref{fig:4-5}给出了一个真实的例子。
%----------------------------------------------
\begin{figure}[htp]
......@@ -330,11 +323,8 @@
\label{fig:4-5}
\end{figure}
%----------------------------------------------
\vspace{0.5em}
\end{itemize}
\parinterval 经过上面的处理,可以得到机器译文与参考答案之间的单词对齐关系。下一步需要从中确定一个拥有最大的子集的对齐关系,即机器译文中被对齐的单词个数最多的对齐关系。但是在上例中的两种对齐关系子集基数相同,这种情况下,需要选择一个对齐关系中交叉现象出现最少的对齐关系。于是,最终的对齐关系如图\ref{fig:4-6}所示。
\end{itemize}
经过上面的处理,可以得到机器译文与参考答案之间的单词对齐关系。下一步需要从中确定一个拥有最大的子集的对齐关系,即机器译文中被对齐的单词个数最多的对齐关系。但是在上例中的两种对齐关系子集基数相同,这种情况下,需要选择一个对齐关系中交叉现象出现最少的对齐关系。于是,最终的对齐关系如图\ref{fig:4-6}所示。
%----------------------------------------------
\begin{figure}[htp]
......@@ -344,26 +334,29 @@
\label{fig:4-6}
\end{figure}
%----------------------------------------------
\vspace{0.5em}
\item 在得到机器译文与参考答案的对齐关系后,需要基于对齐关系计算准确率和召回率。
\parinterval (2)在得到机器译文与参考答案的对齐关系后,需要基于对齐关系计算准确率和召回率。
\parinterval 准确率:机器译文中命中单词数与机器译文单词总数的比值。即:
准确率:机器译文中命中单词数与机器译文单词总数的比值。即:
\begin{eqnarray}
\funp{P} &=& \frac {\textrm{count}_{\textrm{hit}}}{\textrm{count}_{\textrm{candidate}}}
\label{eq:4-8}
\end{eqnarray}
\parinterval 召回率:机器译文中命中单词数与参考答案单词总数的比值。即:
召回率:机器译文中命中单词数与参考答案单词总数的比值。即:
\begin{eqnarray}
\funp{R} &=& \frac {\textrm{count}_{\textrm{hit}}}{\textrm{count}_{\textrm{reference}}}
\label{eq:4-9}
\end{eqnarray}
\parinterval 接下来,计算机器译文的得分。利用{\small\sffamily\bfseries{调和均值}}\index{调和均值}(Harmonic-mean)\index{Harmonic-mean}将准确率和召回率结合起来,并加大召回率的重要性将其权重调大,例如将召回率的权重设置为9:
\vspace{0.5em}
\item 最后,计算机器译文的得分。利用{\small\sffamily\bfseries{调和均值}}\index{调和均值}(Harmonic-mean)\index{Harmonic-mean}将准确率和召回率结合起来,并加大召回率的重要性将其权重调大,例如将召回率的权重设置为9:
\begin{eqnarray}
{F_{\textrm mean}} &=& \frac {10\funp{PR}}{\funp{R+9P}}
\label{eq:4-10}
\end{eqnarray}
\vspace{0.5em}
\end{itemize}
\parinterval 在上文提到的评价指标中,无论是准确率、召回率还是$\textrm F_{mean}$,都是基于单个词汇信息衡量译文质量,而忽略了语序问题。为了将语序问题考虑进来,Meteor会考虑更长的匹配:将机器译文按照最长匹配长度分块,并对“块数”较多的机器译文给予惩罚。例如图\ref{fig:4-6}显示的最终词对齐结果中,机器译文被分为了三个“块”——“Can I have it”、“like he”、“?”在这种情况下,看起来上例中的准确率、召回率都还不错,但最终会受到很严重的惩罚。这种罚分机制能够识别出机器译文中的词序问题,因为当待测译文词序与参考答案相差较大时,机器译文将会被分割得比较零散,这种惩罚机制的计算公式如式\eqref{eq:4-11},其中$\textrm {count}_{\textrm{chunks}}$表示匹配的块数。
\begin{eqnarray}
......
......@@ -69,13 +69,13 @@
\parinterval 虽然第一代神经网络受到了打击,但是在20世纪80年代,第二代人工神经网络开始萌发新的生机。在这个发展阶段,生物属性已经不再是神经网络的唯一灵感来源,在{\small\bfnew{连接主义}}\index{连接主义}(Connectionism)\index{Connectionism}和分布式表示两种思潮的影响下,神经网络方法再次走入了人们的视线。
\vspace{0.3em}
\parinterval 1)符号主义与连接主义
\parinterval 1)符号主义与连接主义
\vspace{0.3em}
\parinterval 人工智能领域始终存在着符号主义和连接主义之争。早期的人工智能研究在认知学中被称为{\small\bfnew{符号主义}}\index{符号主义}(Symbolicism)\index{Symbolicism},符号主义认为人工智能源于数理逻辑,希望将世界万物的所有运转方式归纳成像文法一样符合逻辑规律的推导过程。符号主义的支持者们坚信基于物理符号系统(即符号操作系统)假设和有限合理性原理,就能通过逻辑推理来模拟智能。但被他们忽略的一点是,模拟智能的推理过程需要大量的先验知识支持,哪怕是在现代,生物学界也很难准确解释大脑中神经元的工作原理,因此也很难用符号系统刻画人脑逻辑。另一方面,连接主义则侧重于利用人工神经网络中神经元的连接去探索并模拟输入与输出之间存在的某种关系,这个过程不需要任何先验知识,其核心思想是“大量简单的计算单元连接到一起可以实现智能行为”,这种思想也推动了反向传播等多种神经网络方法的应用,并发展了包括长短时记忆模型在内的经典建模方法。2019年3月27日,ACM 正式宣布将图灵奖授予 Yoshua Bengio, Geoffrey Hinton 和 Yann LeCun,以表彰他们提出的概念和工作使得深度学习神经网络有了重大突破,这三位获奖人均是人工智能连接主义学派的主要代表,从这件事中也可以看出连接主义对当代人工智能和深度学习的巨大影响。
\vspace{0.3em}
\parinterval 2)分布式表示
\parinterval 2)分布式表示
\vspace{0.3em}
\parinterval 分布式表示的主要思想是“一个复杂系统的任何部分的输入都应该是多个特征共同表示的结果”,这种思想在自然语言处理领域的影响尤其深刻,它改变了刻画语言世界的角度,将语言文字从离散空间映射到多维连续空间。例如,在现实世界中,“张三”这个代号就代表着一个人。如果想要知道这个人亲属都有谁,因为有“如果A和B姓氏相同且在同一个家谱中,那么A和B是本家”这个先验知识在,在知道代号“张三”的情况下,可以得知“张三”的亲属是谁。但是如果不依靠这个先验知识,就无法得知“张三”的亲属是谁。但在分布式表示中,可以用一个实数向量,如$ (0.1,0.3,0.4) $来表示“张三”这个人,这个人的所有特征信息都包含在这个实数向量中,通过在向量空间中的一些操作(如计算距离等),哪怕没有任何先验知识的存在,也完全可以找到这个人的所有亲属。在自然语言处理中,一个单词也用一个实数向量(词向量或词嵌入)表示,通过这种方式将语义空间重新刻画,将这个离散空间转化成了一个连续空间,这时单词就不再是一个简单的词条,而是由成百上千个特征共同描述出来的,其中每个特征分别代表这个词的某个“ 方面”。
......@@ -516,7 +516,7 @@ l_p({\mathbi{x}}) & = & {\Vert{\mathbi{x}}\Vert}_p \nonumber \\
\vspace{0.5em}
\parinterval 感知机是人工神经元的一种实例,在上世纪50-60年代被提出后,对神经网络研究产生了深远的影响。感知机模型如图\ref {fig:9-5}所示,其输入是一个$n$维二值向量$ {\mathbi{x}}=(x_1,x_2,\dots,x_n) $,其中$ x_i=0 $$ 1 $。权重${\mathbi{w}}=(w_1,w_2,\dots,w_n) $,每个输入变量对应一个权重$ w_i $。偏置$ b $是一个实数变量($ -\sigma $)。输出也是一个二值结果,即$ y=0 $$ 1 $$ y $值的判定由输入的加权和是否大于(或小于)一个阈值$ \sigma $决定(公式\eqref{eq:9-19}):
\begin{eqnarray}
y=\begin{cases} 0 & \sum_{i}{x_i\cdot w_i}-\sigma <0\\1 & \sum_{i}{x_i\cdot w_i}-\sigma \geqslant 0\end{cases}
y&=&\begin{cases} 0 & \sum_{i}{x_i\cdot w_i}-\sigma <0\\1 & \sum_{i}{x_i\cdot w_i}-\sigma \geqslant 0\end{cases}
\label{eq:9-19}
\end{eqnarray}
......@@ -675,7 +675,7 @@ x_1\cdot w_1+x_2\cdot w_2+x_3\cdot w_3 & = & 0\cdot 1+0\cdot 1+1\cdot 1 \nonumbe
\parinterval 举个简单的例子,预报天气时,往往需要预测温度、湿度和风力,这就意味着如果使用单层神经网络进行预测,需要设置3个神经元。如图\ref{fig:9-10}所示,此时权重矩阵如公式\eqref{eq:9-105}所示:
\begin{eqnarray}
{\mathbi{W}}=\begin{pmatrix} w_{11} & w_{12} & w_{13}\\ w_{21} & w_{22} & w_{23}\end{pmatrix}
{\mathbi{W}}&=&\begin{pmatrix} w_{11} & w_{12} & w_{13}\\ w_{21} & w_{22} & w_{23}\end{pmatrix}
\label{eq:9-105}
\end{eqnarray}
......@@ -710,7 +710,7 @@ x_1\cdot w_1+x_2\cdot w_2+x_3\cdot w_3 & = & 0\cdot 1+0\cdot 1+1\cdot 1 \nonumbe
\item 从几何角度看,公式中的${\mathbi{x}}\cdot {\mathbi{W}}+{\mathbi{b}}$${\mathbi{x}}$右乘${\mathbi{W}}$相当于对$ {\mathbi{x}} $进行旋转变换。例如,对三个点$ (0,0) $$ (0,1) $$ (1,0) $及其围成的矩形区域右乘公式\eqref{eq:9-106}所示矩阵:
\begin{eqnarray}
{\mathbi{W}}=\begin{pmatrix} 1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & 1\end{pmatrix}
{\mathbi{W}}&=&\begin{pmatrix} 1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & 1\end{pmatrix}
\label{eq:9-106}
\end{eqnarray}
......@@ -945,7 +945,7 @@ x_1\cdot w_1+x_2\cdot w_2+x_3\cdot w_3 & = & 0\cdot 1+0\cdot 1+1\cdot 1 \nonumbe
\parinterval 将矩阵乘法扩展到高阶张量中:一个张量${\mathbi{x}}$若要与矩阵$ {\mathbi{W}}$做矩阵乘法,则$ {\mathbi{x}} $的最后一维度需要与${\mathbi{W}}$的行数大小相等,即:若张量${\mathbi{x}} $的形状为$ \cdot \times n $${\mathbi{W}} $须为$ n\times \cdot $的矩阵。公式\eqref{eq:9-25}是一个例子:
\begin{eqnarray}
{\mathbi{x}}(1:4,1:4,{\red{1:4}})\times {{\mathbi{W}}({\red{1:4}},1:2)}={\mathbi{s}}(1:4,1:4,1:2)
{\mathbi{x}}(1:4,1:4,{\red{1:4}})\;\;\times\;\; {{\mathbi{W}}({\red{1:4}},1:2)}&=&{\mathbi{s}}(1:4,1:4,1:2)
\label{eq:9-25}
\end{eqnarray}
......@@ -984,7 +984,7 @@ x_1\cdot w_1+x_2\cdot w_2+x_3\cdot w_3 & = & 0\cdot 1+0\cdot 1+1\cdot 1 \nonumbe
\vspace{0.5em}
\item 除了单位加之外,张量之间也可以使用减法操作、乘法操作。此外也可以对张量作激活操作,这里将其称作为函数的{\small\bfnew{向量化}}\index{向量化}(Vectorization)\index{Vectorization}。例如,对向量(1阶张量)作ReLU激活,公式\eqref{eq:9-26}为ReLU激活函数:
\begin{eqnarray}
f(x)=\begin{cases} 0 & x\le 0 \\x & x>0\end{cases}
f(x)&=&\begin{cases} 0 & x\le 0 \\x & x>0\end{cases}
\label{eq:9-26}
\end{eqnarray}
\vspace{-0.5em}
......@@ -1215,7 +1215,7 @@ y&=&{\textrm{Sigmoid}}({\textrm{Tanh}}({\mathbi{x}}\cdot {\mathbi{W}}^{[1]}+{\ma
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{1)批量梯度下降\index{批量梯度下降}(Batch Gradient Descent)\index{Batch Gradient Descent}}}
\noindent {\small\sffamily\bfseries{1)批量梯度下降\index{批量梯度下降}(Batch Gradient Descent)\index{Batch Gradient Descent}}}
\vspace{0.5em}
\parinterval 批量梯度下降是梯度下降方法中最原始的形式,这种梯度下降方法在每一次迭代时使用所有的样本进行参数更新。参数优化的目标函数如公式\eqref{eq:9-30}所示:
......@@ -1233,7 +1233,7 @@ J({\bm \theta})&=&\frac{1}{n}\sum_{i=1}^{n}{L({\mathbi{x}}_i,\widetilde{\mathbi{
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{2)随机梯度下降\index{随机梯度下降}(Stochastic Gradient Descent)\index{Stochastic Gradient Descent}}}
\noindent {\small\sffamily\bfseries{2)随机梯度下降\index{随机梯度下降}(Stochastic Gradient Descent)\index{Stochastic Gradient Descent}}}
\vspace{0.5em}
\parinterval 随机梯度下降(简称SGD)不同于批量梯度下降,每次迭代只使用一个样本对参数进行更新。SGD的目标函数如公式\eqref{eq:9-31}所示
......@@ -1251,7 +1251,7 @@ J({\bm \theta})&=&L({\mathbi{x}}_i,\widetilde{\mathbi{y}}_i;{\bm \theta})
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{3)小批量梯度下降\index{小批量梯度下降}(Mini-batch Gradient Descent)\index{Mini-batch Gradient Descent}}}
\noindent {\small\sffamily\bfseries{3)小批量梯度下降\index{小批量梯度下降}(Mini-batch Gradient Descent)\index{Mini-batch Gradient Descent}}}
\vspace{0.5em}
\parinterval 为了综合批量梯度下降和随机梯度下降的优缺点,在实际应用中一般采用这两个算法的折中\ \dash \ 小批量梯度下降。其思想是:每次迭代计算一小部分训练数据的损失函数,并对参数进行更新。这一小部分数据被称为一个批次(mini-batch或者batch)。小批量梯度下降的参数优化的目标函数如公式\eqref{eq:9-32}所示:
......@@ -1275,7 +1275,7 @@ J({\bm \theta})&=&\frac{1}{m}\sum_{i=j}^{j+m-1}{L({\mathbi{x}}_i,\widetilde{\mat
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{1)数值微分\index{数值微分}(Numerical Differentiation)\index{Numerical Differentiation}}}
\noindent {\small\sffamily\bfseries{1)数值微分\index{数值微分}(Numerical Differentiation)\index{Numerical Differentiation}}}
\vspace{0.5em}
\parinterval 数学上,梯度的求解其实就是求函数偏导的问题。导数是用极限来定义的,如公式\eqref{eq:9-33}所示:
......@@ -1298,7 +1298,7 @@ J({\bm \theta})&=&\frac{1}{m}\sum_{i=j}^{j+m-1}{L({\mathbi{x}}_i,\widetilde{\mat
%
%----------------------------------------------------------------------------------------
\noindent {\small\sffamily\bfseries{2)符号微分\index{符号微分}(Symbolic Differentiation)\index{Symbolic Differentiation}}}
\noindent {\small\sffamily\bfseries{2)符号微分\index{符号微分}(Symbolic Differentiation)\index{Symbolic Differentiation}}}
\vspace{0.5em}
\parinterval 顾名思义,符号微分就是通过建立符号表达式求解微分的方法:借助符号表达式和求导公式,推导出目标函数关于自变量的微分表达式,最后再带入具体数值得到微分结果。例如,对于表达式$ L({\bm \theta})={\mathbi{x}}\cdot {\bm \theta}+2{\bm \theta}^2 $,可以手动推导出微分表达式$ \frac{\partial L({\bm \theta})}{\partial {\bm \theta}}=\mathbi{x}+4{\bm \theta} $,最后将具体数值$ \mathbi{x} = {(\begin{array}{cc} 2 & -3\end{array})} $$ {\bm \theta} = {(\begin{array}{cc} -1 & 1\end{array})} $带入后,得到微分结果$\frac{\partial L({\bm \theta})}{\partial {\bm \theta}}= {(\begin{array}{cc} 2 & -3\end{array})}+4{(\begin{array}{cc} -1 & 1\end{array})}= {(\begin{array}{cc} -2 & 1\end{array})}$
......@@ -1334,7 +1334,7 @@ $+2x^2+x+1)$ & \ \ $(x^4+2x^3+2x^2+x+1)$ & $+6x+1$ \\
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{3)自动微分\index{自动微分}(Automatic Differentiation)\index{Automatic Differentiation}}}
\noindent {\small\sffamily\bfseries{3)自动微分\index{自动微分}(Automatic Differentiation)\index{Automatic Differentiation}}}
\vspace{0.5em}
\parinterval 自动微分是一种介于数值微分和符号微分的方法:将符号微分应用于最基本的算子,如常数、幂函数、指数函数、对数函数、三角函数等,然后代入数值,保留中间结果,最后再应用于整个函数。通过这种方式,将复杂的微分变成了简单的步骤,这些步骤完全自动化,而且容易进行存储和计算。
......@@ -1344,7 +1344,7 @@ $+2x^2+x+1)$ & \ \ $(x^4+2x^3+2x^2+x+1)$ & $+6x+1$ \\
\parinterval 自动微分可以用一种{\small\sffamily\bfseries{反向模式}}\index{反向模式}(Reverse Mode\index{Reverse Mode}/Backward Mode\index{Backward Mode})即反向传播思想进行描述\upcite{baydin2017automatic}。令${\mathbi{h}}_i$是神经网络的计算图中第$i$个节点的输出。反向模式的自动微分是要计算:
\begin{eqnarray}
\bar{{\mathbi{h}}_i} = \frac{\partial L}{\partial {\mathbi{h}}_i} \label{eq:reverse-mode-v}
\bar{{\mathbi{h}}_i} &=& \frac{\partial L}{\partial {\mathbi{h}}_i} \label{eq:reverse-mode-v}
\end{eqnarray}
\noindent 这里,$\bar{{\mathbi{h}}_i}$表示损失函数$L$相对于${\mathbi{h}}_i$的梯度信息,它会被保存在节点$i$处。为了计算$\bar{{\mathbi{h}}_i}$,需要从网络的输出反向计算每一个节点处的梯度。具体实现时,这个过程由一个包括前向计算和反向计算的两阶段方法实现。
......@@ -1404,7 +1404,7 @@ $+2x^2+x+1)$ & \ \ $(x^4+2x^3+2x^2+x+1)$ & $+6x+1$ \\
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{1)Momentum \index{Momentum}}}
\noindent {\small\sffamily\bfseries{1)Momentum \index{Momentum}}}
\vspace{0.5em}
\parinterval Momentum梯度下降算法的参数更新方式如公式\eqref{eq:9-34}\eqref{eq:9-35}所示\footnote{在梯度下降算法的几种改进方法的公式中,其更新对象是某个具体参数而非参数矩阵,因此不再使用加粗样式。}
......@@ -1434,7 +1434,7 @@ v_t&=&\beta v_{t-1}+(1-\beta)\frac{\partial J}{\partial \theta_t}
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{2)AdaGrad \index{AdaGrad}}}
\noindent {\small\sffamily\bfseries{2)AdaGrad \index{AdaGrad}}}
\vspace{0.5em}
\parinterval 在神经网络的学习中,学习率的设置很重要。学习率过小, 会导致学习花费过多时间;反过来,学习率过大,则会导致学习发散,甚至造成模型的“跑偏”。在深度学习实现过程中,有一种被称为学习率{\small\bfnew{衰减}}\index{衰减}(Decay)\index{Decay}的方法,即最初设置较大的学习率,随着学习的进行,使学习率逐渐减小,这种方法相当于将“全体”参数的学习率值一起降低。AdaGrad梯度下降算法进一步发展了这个思想\upcite{duchi2011adaptive}
......@@ -1454,7 +1454,7 @@ z_t&=&z_{t-1}+\frac{\partial J}{\partial {\theta}_t} \cdot \frac{\partial J}{\pa
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{3)RMSProp \index{RMSProp}}}
\noindent {\small\sffamily\bfseries{3)RMSProp \index{RMSProp}}}
\vspace{0.5em}
\parinterval RMSProp算法是一种自适应学习率的方法\upcite{tieleman2012rmsprop},它是对AdaGrad算法的一种改进,可以避免AdaGrad算法中学习率不断单调下降以至于过早衰减的缺点。
......@@ -1476,7 +1476,7 @@ z_t&=&\gamma z_{t-1}+(1-\gamma) \frac{\partial J}{\partial {\theta}_t} \cdot \f
%----------------------------------------------------------------------------------------
\vspace{0.5em}
\noindent {\small\sffamily\bfseries{4)Adam \index{Adam} }}
\noindent {\small\sffamily\bfseries{4)Adam \index{Adam} }}
\vspace{0.5em}
\parinterval Adam梯度下降算法是在RMSProp算法的基础上进行改进的,可以将其看成是带有动量项的RMSProp算法\upcite{kingma2014adam}。该算法在自然语言处理领域非常流行。Adam 算法的参数更新方式如公式\eqref{eq:9-40}\eqref{eq:9-41}\eqref{eq:9-42}所示:
......@@ -1637,16 +1637,16 @@ z_t&=&\gamma z_{t-1}+(1-\gamma) \frac{\partial J}{\partial {\theta}_t} \cdot \f
\item $ h_i^k $:第$ k $层第$ i $个神经元的输出;
\vspace{0.5em}
\item $ {\mathbi{h}}^k $:第$ k $层的输出。若第$ k $层有$ n $个神经元,则:
\begin{equation}
{\mathbi{h}}^k=(h_1^k,h_2^k,\dots,h_n^k)
\end{equation}
\begin{eqnarray}
{\mathbi{h}}^k&=&(h_1^k,h_2^k,\dots,h_n^k)
\end{eqnarray}
\vspace{0.5em}
\item $ w_{j,i}^k $:第$ k-1 $层神经元$ j $与第$ k $层神经元$ i $的连接权重;
\vspace{0.5em}
\item $ {\mathbi{W}}^k $:第$ k-1 $层与第$ k $层的连接权重。若第$ k-1 $层有$ m $个神经元,第$ k $层有$ n $个神经元,则:
\begin{equation}
{\mathbi{W}}^k = \begin{pmatrix} w_{1,1}^k & w_{1,2}^k & \dots & w_{1,n}^k\\w_{2,1}^k & \dots & \dots & \dots\\ \dots & \dots & \dots & \dots\\w_{m,1}^k & \dots & \dots & w_{m,n}^k\end{pmatrix}
\end{equation}
\begin{eqnarray}
{\mathbi{W}}^k &=& \begin{pmatrix} w_{1,1}^k & w_{1,2}^k & \dots & w_{1,n}^k\\w_{2,1}^k & \dots & \dots & \dots\\ \dots & \dots & \dots & \dots\\w_{m,1}^k & \dots & \dots & w_{m,n}^k\end{pmatrix}
\end{eqnarray}
\vspace{0.5em}
\item $ {\mathbi{h}}^K $:整个网络的输出;
\vspace{0.5em}
......@@ -1942,7 +1942,7 @@ z_t&=&\gamma z_{t-1}+(1-\gamma) \frac{\partial J}{\partial {\theta}_t} \cdot \f
\parinterval Softmax($\cdot$)的作用是根据输入的$|V|$维向量(即${\mathbi{h}}_0{\mathbi{U}}$),得到一个$|V|$维的分布。令${\bm \tau}$表示Softmax($\cdot$)的输入向量,Softmax函数可以被定义为公式\eqref{eq:9-120}
\begin{eqnarray}
\textrm{Softmax}(\tau_i)=\frac{\textrm{exp}(\tau_i)} {\sum_{i'=1}^{|V|} \textrm{exp}(\tau_{i'})}
\textrm{Softmax}(\tau_i)&=&\frac{\textrm{exp}(\tau_i)} {\sum_{i'=1}^{|V|} \textrm{exp}(\tau_{i'})}
\label{eq:9-120}
\end{eqnarray}
......
......@@ -6336,7 +6336,7 @@ author = {Yoshua Bengio and
Adri{\`{a}} de Gispert and
Bill Byrne},
pages = {504--512},
publisher = {Annual Meeting of the Association for Computational Linguistics},
journal = {Annual Meeting of the Association for Computational Linguistics},
year = {2018}
}
......@@ -6359,7 +6359,7 @@ author = {Yoshua Bengio and
Shiyue Zhang and
Dong Wang and
Thomas Fang Zheng},
publisher={IEEE Asia-Pacific Services Computing Conference},
journal={IEEE Asia-Pacific Services Computing Conference},
year={2017},
pages={1583-1587}
}
......@@ -6387,7 +6387,7 @@ author = {Yoshua Bengio and
title={Deterministic Non-Autoregressive Neural Sequence Modeling by Iterative Refinement},
author={Jason Lee and Elman Mansimov and Kyunghyun Cho},
pages = {1173--1182},
publisher = {Conference on Empirical Methods in Natural Language Processing},
journal = {Conference on Empirical Methods in Natural Language Processing},
year = {2018}
}
......@@ -6411,7 +6411,7 @@ author = {Yoshua Bengio and
title={An Operation Sequence Model for Explainable Neural Machine Translation},
author={Felix Stahlberg and Danielle Saunders and Bill Byrne},
pages = {175--186},
publisher = {Conference on Empirical Methods in Natural Language Processing},
journal = {Conference on Empirical Methods in Natural Language Processing},
year = {2018}
}
......@@ -6439,7 +6439,7 @@ author = {Yoshua Bengio and
Hiroya Takamura and
Manabu Okumura},
pages = {1328--1338},
publisher = {Conference on Empirical Methods in Natural Language Processing},
journal = {Conference on Empirical Methods in Natural Language Processing},
year = {2016}
}
......@@ -6464,7 +6464,7 @@ author = {Yoshua Bengio and
title={Length bias in Encoder Decoder Models and a Case for Global Conditioning},
author={Pavel Sountsov and Sunita Sarawagi},
pages = {1516--1525},
publisher = {Conference on Empirical Methods in Natural Language Processing},
journal = {Conference on Empirical Methods in Natural Language Processing},
year = {2016}
}
......@@ -6540,7 +6540,7 @@ author = {Yoshua Bengio and
Renjie Zheng and
Liang Huang},
pages = {1884--1889},
publisher = { Annual Conference of the North American Chapter of the Association for Computational Linguistics},
journal = { Annual Conference of the North American Chapter of the Association for Computational Linguistics},
year = {2019}
}
......@@ -6644,7 +6644,7 @@ author = {Yoshua Bengio and
title={Mixture Models for Diverse Machine Translation: Tricks of the Trade},
author={Tianxiao Shen and Myle Ott and Michael Auli and Marc'Aurelio Ranzato},
pages = {5719--5728},
publisher = {International Conference on Machine Learning},
journal = {International Conference on Machine Learning},
year = {2019},
}
......@@ -6652,7 +6652,7 @@ author = {Yoshua Bengio and
title={Generating Diverse Translation from Model Distribution with Dropout},
author={Xuanfu Wu and Yang Feng and Chenze Shao},
pages={1088--1097},
publisher={Annual Meeting of the Association for Computational Linguistics},
journal={Annual Meeting of the Association for Computational Linguistics},
year={2020}
}
......@@ -6730,7 +6730,7 @@ author = {Yoshua Bengio and
Sumit Chopra and
Michael Auli and
Wojciech Zaremba},
publisher={International Conference on Learning Representations},
journal={International Conference on Learning Representations},
year={2016}
}
......@@ -6740,7 +6740,7 @@ author = {Yoshua Bengio and
Oriol Vinyals and
Navdeep Jaitly and
Noam Shazeer},
booktitle = {Conference and Workshop on Neural Information Processing Systems},
journal = {Conference and Workshop on Neural Information Processing Systems},
pages = {1171--1179},
year = {2015}
}
......@@ -6749,7 +6749,7 @@ author = {Yoshua Bengio and
title={Bridging the Gap between Training and Inference for Neural Machine Translation},
author={Wen Zhang and Yang Feng and Fandong Meng and Di You and Qun Liu},
pages = {4334--4343},
publisher = {Annual Meeting of the Association for Computational Linguistics},
journal = {Annual Meeting of the Association for Computational Linguistics},
year = {2019}
}
......@@ -6831,7 +6831,7 @@ author = {Yoshua Bengio and
Omer Levy and
Graham Neubig},
title = {Are Sixteen Heads Really Better than One?},
publisher = {Conference and Workshop on Neural Information Processing Systems},
journal = {Conference and Workshop on Neural Information Processing Systems},
pages = {14014--14024},
year = {2019}
}
......@@ -6873,7 +6873,7 @@ author = {Yoshua Bengio and
number ={4},
pages ={1--29},
year ={2011},
publisher ={ACM Transactions on Asian Language Information Processing (TALIP)}
journal ={ACM Transactions on Asian Language Information Processing (TALIP)}
}
@inproceedings{Li2009VariationalDF,
......@@ -6901,7 +6901,7 @@ author = {Yoshua Bengio and
title={Generative Neural Machine Translation},
author={Harshil Shah and
David Barber},
publisher={Conference and Workshop on Neural Information Processing Systems},
journal={Conference and Workshop on Neural Information Processing Systems},
pages={1353--1362},
year={2018}
}
......@@ -6909,7 +6909,7 @@ author = {Yoshua Bengio and
@article{Su2018VariationalRN,
title={Variational Recurrent Neural Machine Translation},
author={Jinsong Su and Shan Wu and Deyi Xiong and Yaojie Lu and Xianpei Han and Biao Zhang},
publisher={AAAI Conference on Artificial Intelligence},
journal={AAAI Conference on Artificial Intelligence},
pages={5488--5495},
year={2018}
}
......@@ -6952,7 +6952,7 @@ author = {Yoshua Bengio and
title={Syntactically Supervised Transformers for Faster Neural Machine Translation},
author={Nader Akoury and Kalpesh Krishna and Mohit Iyyer},
pages = {1269--1281},
publisher = {Annual Meeting of the Association for Computational Linguistics},
journal = {Annual Meeting of the Association for Computational Linguistics},
year = {2019},
}
......@@ -6965,7 +6965,7 @@ author = {Yoshua Bengio and
Enhong Chen and
Tie-Yan Liu},
pages = {7839--7846},
publisher = {AAAI Conference on Artificial Intelligence},
journal = {AAAI Conference on Artificial Intelligence},
year = {2020}
}
......@@ -6986,7 +6986,7 @@ author = {Yoshua Bengio and
Haotang Deng and
Qi Ju},
pages = {6035--6044},
publisher = {Annual Meeting of the Association for Computational Linguistics},
journal = {Annual Meeting of the Association for Computational Linguistics},
year = {2020}
}
......@@ -6997,7 +6997,7 @@ author = {Yoshua Bengio and
Jiatao Gu and
Edouard Grave and
Michael Auli},
publisher={International Conference on Learning Representations},
journal={International Conference on Learning Representations},
year={2020}
}
......@@ -7024,14 +7024,14 @@ author = {Yoshua Bengio and
Thalaiyasingam Ajanthan and
Philip H. S. Torr},
title = {Snip: single-Shot Network Pruning based on Connection sensitivity},
publisher = {International Conference on Learning Representations},
journal = {International Conference on Learning Representations},
year = {2019},
}
@article{Frankle2019TheLT,
title={The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks},
author={Jonathan Frankle and Michael Carbin},
publisher={International Conference on Learning Representations},
journal={International Conference on Learning Representations},
year={2019}
}
......@@ -7042,7 +7042,7 @@ author = {Yoshua Bengio and
title = {Successfully Applying the Stabilized Lottery Ticket Hypothesis to
the Transformer Architecture},
pages = {3909--3915},
publisher = {Annual Meeting of the Association for Computational Linguistics},
journal = {Annual Meeting of the Association for Computational Linguistics},
year = {2020},
}
......@@ -7067,7 +7067,7 @@ author = {Zhuang Liu and
Changshui Zhang},
title = {Learning Efficient Convolutional Networks through Network Slimming},
pages = {2755--2763},
publisher = {{IEEE} International Conference on Computer Vision},
journal = {{IEEE} International Conference on Computer Vision},
year = {2017}
}
......@@ -7104,7 +7104,7 @@ author = {Zhuang Liu and
@article{Munim2019SequencelevelKD,
title={Sequence-level Knowledge Distillation for Model Compression of Attention-based Sequence-to-sequence Speech Recognition},
author={Raden Mu'az Mun'im and Nakamasa Inoue and Koichi Shinoda},
publisher={{IEEE} International Conference on Acoustics, Speech and Signal Processing},
journal={{IEEE} International Conference on Acoustics, Speech and Signal Processing},
year={2019},
pages={6151-6155}
}
......@@ -7251,7 +7251,7 @@ author = {Zhuang Liu and
title={ENGINE: Energy-Based Inference Networks for Non-Autoregressive Machine Translation},
author={Lifu Tu and Richard Yuanzhe Pang and Sam Wiseman and Kevin Gimpel},
pages={2819--2826},
publisher={Annual Meeting of the Association for Computational Linguistics},
journal={Annual Meeting of the Association for Computational Linguistics},
year={2020}
}
......@@ -7667,7 +7667,7 @@ author = {Zhuang Liu and
@article{xiao2013bagging,
title ={Bagging and boosting statistical machine translation systems},
author ={Tong Xiao and Jingbo Zhu and Tongran Liu },
publisher ={Artificial Intelligence},
journal ={Artificial Intelligence},
volume ={195},
pages ={496--527},
year ={2013}
......@@ -7750,7 +7750,7 @@ author = {Zhuang Liu and
Furu Wei and
Ming Zhou},
title = {BERT-of-Theseus: Compressing {BERT} by Progressive Module Replacing},
publisher = {Conference on Empirical Methods in Natural Language Processing},
journal = {Conference on Empirical Methods in Natural Language Processing},
year = {2020}
}
......@@ -7902,7 +7902,7 @@ author = {Zhuang Liu and
Zhongjun He and
Hua Wu and
Haifeng Wang},
publisher={arXiv preprint arXiv:1909.01101},
journal={arXiv preprint arXiv:1909.01101},
year={2019}
}
......@@ -7985,6 +7985,41 @@ author = {Zhuang Liu and
volume={59},
pages={99-106}
}
@inproceedings{zhang-EtAl:2020:WMT,
author = {Zhang, Yuhao and
Wang, Ziyang and
Cao, Runzhe and
Wei, Binghao and
Shan, Weiqiao and
Zhou, Shuhan and
Reheman, Abudurexiti and
Zhou, Tao and
Zeng, Xin and
Wang, Laohu and
Mu, Yongyu and
Zhang, Jingnan and
Liu, Xiaoqian and
Zhou, Xuanjun and
Li, Yinqiao and
Li, Bei and
Xiao, Tong and
Zhu, Jingbo},
title = {The NiuTrans Machine Translation Systems for WMT20},
month = {November},
year = {2020},
publisher = {Annual Meeting of the Association for Computational Linguistics},
pages = {336--343}
}
@inproceedings{DBLP:conf/nips/MehriS18,
author = {Shikib Mehri and
Leonid Sigal},
title = {Middle-Out Decoding},
publisher = {Conference on Neural Information Processing Systems},
pages = {5523--5534},
year = {2018}
}
%%%%% chapter 14------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论