section07.tex 15.3 KB
Newer Older
xiaotong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
% !Mode:: "TeX:UTF-8"
% !TEX encoding = UTF-8 Unicode

\def\CTeXPreproc{Created by ctex v0.2.13, don't edit!}
\documentclass[cjk,t,compress,12pt]{beamer}
\usepackage{pstricks}
\usepackage{etex}
\usepackage{eso-pic,graphicx}
\usepackage{fancybox}
\usepackage{amsmath,amssymb}
\usepackage{setspace}
\usepackage{xcolor}
\usepackage{array,multirow}
\usepackage{CJK}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{hyperref}
\usepackage{changepage}
\usepackage{pgfplots}
\usepackage{subfigure}
\usepackage{tikz-3dplot}
\usepackage{esvect}
\usepackage{CJKulem}
\usepackage{booktabs}
\usepackage{amsmath}

\usepackage{tcolorbox}
\tcbuselibrary{skins}

\usetikzlibrary{calc,intersections}
\usetikzlibrary{matrix}
\usetikzlibrary{patterns}
\usetikzlibrary{arrows,decorations.pathreplacing}
\usetikzlibrary{shadows}
\usetikzlibrary{shadows.blur}
\usepgflibrary{arrows}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations}
\usetikzlibrary{arrows,shapes}

\usetikzlibrary{positioning,fit,calc}

\usetikzlibrary{mindmap,backgrounds}

\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

\setbeamertemplate{items}[ball]
\usefonttheme[onlymath]{serif}

\definecolor{ugreen}{rgb}{0,0.5,0}
\definecolor{lgreen}{rgb}{0.9,1,0.8}
\definecolor{xtgreen1}{rgb}{0.824,0.898,0.8}
\definecolor{xtgreen}{rgb}{0.914,0.945,0.902}
\definecolor{lightgray}{gray}{0.85}

\setbeamercolor{uppercol}{fg=white,bg=ugreen}
\setbeamercolor{lowercol}{fg=black,bg=xtgreen}

\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\setbeamercolor{uppercolblue}{fg=white,bg=ublue}
\setbeamercolor{lowercolblue}{fg=black,bg=blue!10}


%\usetheme{default}
%\usetheme{Darmstadt}
%\usetheme{Madrid}
%\usetheme{Frankfurt}
%\usetheme{Dresden}
%\usetheme{Boadilla}
%\usecolortheme{dolphin}

% not compatible with [scale=?]
\newdimen\XCoord
\newdimen\YCoord
\newdimen\TMP
\newcommand*{\ExtractCoordinate}[1]{\path (#1); \pgfgetlastxy{\XCoord}{\YCoord};}%
\newcommand*{\ExtractX}[1]{\path (#1); \pgfgetlastxy{\XCoord}{\TMP};}%
\newcommand*{\ExtractY}[1]{\path (#1); \pgfgetlastxy{\TMP}{\YCoord};}%
\newcommand{\specialcell}[3][c]{%
  \begin{tabular}[#1]{@{}#2@{}}#3\end{tabular}}

\newcounter{mycount1}
\newcounter{mycount2}
\newcounter{mycount3}
\newcounter{mycount4}
\newlength{\mystep}
\newlength{\base}
\newlength{\wseg}
\newlength{\hseg}
\newlength{\wnode}
\newlength{\hnode}


\usefonttheme[onlylarge]{structurebold}

\IfFileExists{C:/WINDOWS/win.ini}
{\newcommand{\mycfont}{you}}
{\newcommand{\mycfont}{gbsn}}

\begin{CJK}{UTF8}{\mycfont}
\end{CJK}

\setbeamerfont*{frametitle}{size=\large,series=\bfseries}
\setbeamertemplate{navigation symbols}{\begin{CJK}{UTF8}{\mycfont} 第六章 神经机器翻译 \hspace*{2em} 肖桐\&朱靖波 \end{CJK} \hspace*{2em} \today \hspace*{2em} \insertframenumber{}/\inserttotalframenumber}

\setbeamertemplate{itemize items}[circle] % if you want a circle
\setbeamertemplate{itemize subitem}[triangle] % if you wnat a triangle
\setbeamertemplate{itemize subsubitem}[ball] % if you want a ball

\begin{document}

\begin{CJK}{UTF8}{\mycfont}

\title{\Large{神经机器翻译实战 - 参加一次比赛}}
\author{\large{\textbf{肖桐\ \ 朱靖波}}}
\institute{
\blue{\url{xiaotong@mail.neu.edu.cn}} \black{} \\
\blue{\url{zhujingbo@mail.neu.edu.cn}} \black{} \\
\vspace{1.0em}
东北大学 自然语言处理实验室 \\
\blue{\underline{\url{http://www.nlplab.com}}} \black{} \\
\vspace{0.2cm}
\hspace{0.1cm} \includegraphics[scale=0.1]{../Figures/logo.pdf}
}
\date{}

\maketitle

\setlength{\leftmargini}{1em}
\setlength{\leftmarginii}{1em}

%%%------------------------------------------------------------------------------------------------------------
\section{神经机器翻译并不简单}

%%%------------------------------------------------------------------------------------------------------------
xiaotong committed
137 138 139 140
%%% 如何入门?
\begin{frame}{小白入门(神经)机器翻译}
\begin{itemize}
\item 一个小白入门神经机器翻译的经历
xiaotong committed
141

xiaotong committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
\begin{center}
\begin{tikzpicture}

\draw [very thick,->] (-2em,0) -- (21em,0);

\visible<2->{
\node [anchor=south] (xiaobai) at (-2em,0.3em) {\footnotesize{\textbf{小白}}};
\node [anchor=south] (xiaobaibai) at (21em,0.3em) {\footnotesize{\textbf{小白白}}};
}

\node [circle,fill=ublue,minimum size=0.4em,inner sep=0] (point1) at (1em,0) {};
\node [anchor=north,text width=6em,align=left] (box1) at ([yshift=-1em]point1.south) {\scriptsize{我喜欢NLP和MT,尝试下}};

\node [circle,fill=ublue,minimum size=0.4em,inner sep=0] (point2) at (6em,0) {};
\node [anchor=south,text width=6em,align=left] (box2) at ([yshift=1em]point2.north) {\scriptsize{上网看视频,找博客,阅读一些书籍}};

\node [circle,fill=ublue,minimum size=0.4em,inner sep=0] (point3) at (11em,0) {};
\node [anchor=north,text width=6em,align=left] (box3) at ([yshift=-1em]point3.south) {\scriptsize{学各种深度学习开源框架,阅读开源NMT系统代码}};

\node [circle,fill=ublue,minimum size=0.4em,inner sep=0] (point4) at (16em,0) {};
\node [anchor=south,text width=8em,align=left] (box4) at ([yshift=1em]point4.north) {\scriptsize{找一些数据,跑一下系统,有结果!耶!}};

\end{tikzpicture}
\end{center}

\item<3-> 小白白还想成为大白,甚至大白白、大大白,还是使用同样的套路。\visible<4->{\alert{但是},只是变得更白了,离大白还很远!}

\begin{center}
\begin{tikzpicture}

\draw [very thick,->] (-2em,0) -- (21em,0);

\visible<4->{
\node [anchor=south] (xiaobai) at (-2em,0.3em) {\footnotesize{\textbf{小白白}}};
\node [anchor=south] (xiaobaibai) at (21em,0.3em) {\footnotesize{\textbf{小白白白}}};
}

\node [anchor=north,align=center] (box1) at (9em,-0.5em) {\footnotesize{(博客、书、实验)$\times 10$}};

\end{tikzpicture}
\end{center}

\end{itemize}
姜雨帆 committed
185
\end{frame}
xiaotong committed
186 187

%%%------------------------------------------------------------------------------------------------------------
xiaotong committed
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
%%% 为什么成为机器翻译高手还很难
\begin{frame}{为什么小白没成为高手?}

\begin{itemize}

\item 实力表

\begin{center}
\begin{tikzpicture}

\draw [very thick,->] (0em,0) -- (20em,0);

\node [anchor=south,minimum width=2em,minimum height=0.6em,fill=red!20] (player1) at (2em,0.05em) {};
\node [anchor=north] (label1) at (player1.south) {\scriptsize{小白}};

\node [anchor=south,minimum width=2em,minimum height=0.9em,fill=red!20] (player2) at (5em,0.05em) {};
\node [anchor=north] (label2) at (player2.south) {\scriptsize{小白白}};

\node [anchor=south,minimum width=2em,minimum height=1.0em,fill=red!20] (player3) at (8em,0.05em) {};
\node [anchor=north] (label3) at (player3.south) {\scriptsize{小白白白}};

\visible<2->{
\node [anchor=south,minimum width=2em,minimum height=3em,fill=blue!20] (player4) at (12em,0.05em) {};
\node [anchor=north] (label4) at (player4.south) {\scriptsize{大白}};
}

\visible<3->{
\node [anchor=south,minimum width=2em,minimum height=6em,fill=green!20] (player5) at (16em,0.05em) {};
\node [anchor=north] (label5) at (player5.south) {\scriptsize{超级赛亚人}};
}

\end{tikzpicture}
\end{center}

\item<4-> 搞了半天,还是个入门选手,当遇到很多问题时还是无从下手
    \begin{itemize}
    \item 论文写不出来,没有idea
    \item 实验一弄就不好使,性能就是不涨
    \item 自己搭的系统还很挫,离谷歌翻译还很遥远
    \end{itemize}
\item<5-> 原因很简单:我们使用的系统还很初级,离state-of-the-art有距离,导致视野也会受限。\\
- 怎么办?\alert{参加一次比赛吧}

\end{itemize}

姜雨帆 committed
233 234 235
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
xiaotong committed
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
%%% 影响机器翻译系统性能的因素
\begin{frame}{Towards State-of-the-Art}

\begin{itemize}
\item 注意,机器翻译终究是面向应用的研究领域。因此,研发高性能的系统是我们追求的目标。一般来说,影响机器翻译系统性能有几个因素
    \begin{enumerate}
    \item \textbf{数据}:大规模、高质量的数据是前提
    \item \textbf{技术}:算法和模型要足够先进
    \item \textbf{打磨}:需要对各个模块进行细致的打磨,说白了,下功夫不到有数据和技术也是白搭
    \end{enumerate}
\vspace{0.5em}
\item<2-> 参加一次机器翻译的评测比赛是实现上述目标的一个很好的方法,比如,WMT News Translation Track
    \begin{enumerate}
    \item 评测提供数据,规模和质量都能保证,因此可以在相对公平的数据基础上进行技术对比
    \item 评测系统都会有技术报告,因此可以相对容易的复现以前的结果,而且很容易了解最新的动态
    \item 评测本身就是驱动力(大家都希望取得好成绩),因此会不断打磨细节
    \end{enumerate}
\end{itemize}

姜雨帆 committed
255 256 257
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
xiaotong committed
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
%%% 参加比赛的流程
\begin{frame}{基本流程}

\begin{itemize}
\item 机器翻译比赛现在已经非常友好了(如WMT、CCMT等),有些比赛甚至都不需要提前报名,注册个账户就可以刷榜
    \begin{enumerate}
    \item 从官方网站了解比赛计划
    \item 发放训练数据
    \item 数据初级及加工
    \item 选型,搭建第一个初级版本
    \item 和自己较劲(如果能够对比以前的参赛系统就更好了),改进系统,尝试各种技术
    \item 发放测试数据,运行系统提交最终结果
    \item 公布结果
    \item 撰写评测报告
    \item 参加评测研讨会,学习交流
    \end{enumerate}
    
\item<2-> 当然,这里并不是要描述整个机器翻译的流程。我们重点还是关注有哪些技术可以使神经机器翻译变得更强,为相关研究提供\alert{合理的基线系统}
\end{itemize}
姜雨帆 committed
277

xiaotong committed
278
\end{frame}
姜雨帆 committed
279

xiaotong committed
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
%%%------------------------------------------------------------------------------------------------------------
%%% 选型
\begin{frame}{必要的准备 - 选型}

\begin{itemize}
\item 这里我们以WMT、CCMT的汉英新闻翻译任务为例,介绍如何搭建一套性能更加强劲的神经机器翻译系统
    \begin{itemize}
    \item 翻译品质为评价指标(如BLEU),翻译速度等暂不考虑
    \item 假设设备是充分的
    \item 假设开发系统和模型训练时间也是充分的
    \end{itemize}
\item<2-> 面临的一个问题是选择什么样的系统架构。当然,这个问题可以边做表调整,不过这里我们选择Transformer作为基本框架(见第六章)。因为,
    \begin{itemize}
    \item Transformer已经被证明是当今性能最好的NMT模型之一
    \item 在WMT2019和CCMT2019的评测中,Transformer已经成为了各个参赛队伍的标配
    \item Transformer是很多benchmark上的优胜者
    \end{itemize}
\item<3-> 当然,后面讨论的内容绝大多数与神经机器翻译架构无关,这些可以被推广到其它类型的系统上
    \begin{itemize}
    \item \textbf{基础技术}:确保可以得到一个不太差的系统
    \item \textbf{进阶技术}:接近甚至达到State-of-the-art
    \end{itemize}
\end{itemize}
姜雨帆 committed
303 304 305

\end{frame}

xiaotong committed
306

姜雨帆 committed
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
%%%------------------------------------------------------------------------------------------------------------
%%% 本章的内容
\begin{frame}{Outline}

 \begin{tcolorbox}[enhanced,size=normal,left=2mm,right=1mm,colback=red!5!white,colframe=red!75!black,drop fuzzy shadow]
{\normalsize
\textbf{基础技术} \vspace{-0.2em}\\
\small{1. 数据处理} \vspace{-0.2em}\\
\small{2. 翻译单元切分} \vspace{-0.2em}\\
\small{3. 正则化} \vspace{-0.2em}\\
\small{4. 多模型集成} \vspace{-0.2em}\\
\small{5. 自左向右解码 vs. 自右向左解码} \vspace{-0.2em}\\
\small{6. 翻译长度控制} \vspace{-0.2em}\\
\small{7. 大模型和大批量训练}
}
\end{tcolorbox}

\vspace{0em}

 \begin{tcolorbox}[enhanced,size=normal,left=2mm,right=1mm,colback=red!5!white,colframe=red!75!black,drop fuzzy shadow]
{\normalsize
\textbf{进阶技术} \vspace{-0.2em}\\
\small{1. 深层模型} \vspace{-0.2em}\\
\small{2. 单语数据的使用} \vspace{-0.2em}\\
\small{3. 知识精炼} \vspace{-0.2em}\\
\small{4. 双向训练} \vspace{-0.2em}\\
\small{5. 统计机器翻译的使用}
}
\end{tcolorbox}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\section{基础技术}

%%%------------------------------------------------------------------------------------------------------------
%%% 数据处理(也可以提一下不同blue脚本对tokenization的要求)
\begin{frame}{数据筛选、过滤}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 翻译单元切分
\begin{frame}{BPE}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 正则化(dropout、label smoothing)
\begin{frame}{dropout}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 正则化(dropout、label smoothing)
\begin{frame}{label smoothing}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 多模型集成(如何生成多样的模型、如何集成)
\begin{frame}{ensemble}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 自左向右解码 vs. 自右向左解码
\begin{frame}{L2R}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 自左向右解码 vs. 自右向左解码
\begin{frame}{R2L}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 翻译长度控制
\begin{frame}{翻译长度控制}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 大模型和大批量训练
\begin{frame}{大模型和大批量训练}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 实验分析
\begin{frame}{实验分析}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\section{进阶技术}

%%%------------------------------------------------------------------------------------------------------------
%%% 深层模型
\begin{frame}{深层模型}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 单语数据的使用(反向翻译、预训练)
\begin{frame}{反向翻译}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 知识精炼
\begin{frame}{知识精炼}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 双向训练
\begin{frame}{双向训练}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 统计机器翻译的使用
\begin{frame}{统计机器翻译的使用}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\section{小结及深入阅读}
xiaotong committed
422 423 424

\end{CJK}
\end{document}