每日论文|将基于梯度的学习应用于文档识别(Gradient-Based Learning Applied to Document Recognition, 1998)


This is the third piece in the Daily Paper series, following the 1986 letter on back-propagation and yesterday’s 1997 article on long short-term memory. Isolated characters are only one step in a real document reader. This 1998 invited paper in Proceedings of the IEEE shows how convolutional networks can learn features directly from pixels, and how graph transformer networks can train a whole recognition pipeline with a single global criterion. Only the abstract is translated in full; the rest is a bilingual reading guide, not a line-by-line translation of the paper. The article is copyright IEEE (0018-9219/98$10.00 © 1998 IEEE) and is not released under an open licence that permits free adaptation.

这是「每日论文」的第 3 篇,接在 1986 年反向传播短文和昨天的 1997 年长短期记忆长文之后。孤立字符识别只是真正文档阅读系统中的一步。1998 年这篇 Proceedings of the IEEE 特约长文说明:卷积网络可以直接从像素学习特征,图变换网络(graph transformer networks)则能用同一个全局准则训练整条识别流水线。下面只对摘要做完整的中英对照,其余是导读,不逐段翻译全文。本文版权属于 IEEE(0018-9219/98$10.00 © 1998 IEEE),不是允许自由改编的开放许可。

Bibliographic details 论文信息

  • Title 标题:Gradient-Based Learning Applied to Document Recognition
  • Authors 作者:Yann LeCun、Léon Bottou、Yoshua Bengio、Patrick Haffner
  • Affiliations 单位:Speech and Image Processing Services Research Laboratory, AT and T Labs-Research, Red Bank, NJ 07701 USA(LeCun、Bottou 与 Haffner);Département d’Informatique et de Recherche Opérationelle, Université de Montréal, Montréal, Québec H3C 3J7 Canada(Bengio)
  • Journal 期刊:Proceedings of the IEEE Vol. 86 第 86 卷,No. 11 第 11 期,pp. 2278–2324 第 2278–2324 页
  • Type 类型:Invited Paper 特约论文
  • Dates 日期:Manuscript received 收稿 1 November 1997 1997 年 11 月 1 日;revised 修订 17 April 1998 1998 年 4 月 17 日;published 发表 November 1998 1998 年 11 月
  • Publisher Item Identifier 出版标识:S 0018-9219(98)07863-3
  • DOI:10.1109/5.726791

The bibliographic details above were checked against the authors’ publication list on Yann LeCun’s site (the official 46-page, 955 KB PDF) and the IEEE typeset article. The author’s site lists the paper as Y. LeCun, L. Bottou, Y. Bengio and P. Haffner, Proceedings of the IEEE, 86(11):2278-2324, November 1998. At the time this guide was prepared, the live PDF link on lecun.com returned a server error; the file was retrieved from an Internet Archive snapshot of that same official URL and matched the listed file size.

以上著录已对照杨立昆(Yann LeCun)个人主页上的论文列表(官方 46 页、955 KB 的 PDF)以及 IEEE 正式排印文本核对。作者站点的著录为:Y. LeCun, L. Bottou, Y. Bengio and P. Haffner, Proceedings of the IEEE, 86(11):2278-2324, November 1998。撰写本导读时,lecun.com 上的 PDF 链接返回服务器错误;文件取自该官方地址的互联网档案馆快照,体积与作者列出的 955 KB 一致。

Abstract 摘要

The English text below is the published abstract, quoted after checking the official IEEE PDF. Line-end hyphenation has been removed so the wording can be read as continuous prose; no other wording has been changed. The Chinese that follows is a complete translation.

下面的英文是正式刊出摘要,已对照官方 IEEE PDF 核对后引出。为便于阅读,只去掉了行末断词连字符,其余措辞未改。中文为对应全译。

Multilayer neural networks trained with the back-propagation algorithm constitute the best example of a successful gradient-based learning technique. Given an appropriate network architecture, gradient-based learning algorithms can be used to synthesize a complex decision surface that can classify high-dimensional patterns, such as handwritten characters, with minimal preprocessing. This paper reviews various methods applied to handwritten character recognition and compares them on a standard handwritten digit recognition task. Convolutional neural networks, which are specifically designed to deal with the variability of two dimensional (2-D) shapes, are shown to outperform all other techniques.

Real-life document recognition systems are composed of multiple modules including field extraction, segmentation, recognition, and language modeling. A new learning paradigm, called graph transformer networks (GTN’s), allows such multimodule systems to be trained globally using gradient-based methods so as to minimize an overall performance measure.

Two systems for online handwriting recognition are described. Experiments demonstrate the advantage of global training, and the flexibility of graph transformer networks.

A graph transformer network for reading a bank check is also described. It uses convolutional neural network character recognizers combined with global training techniques to provide record accuracy on business and personal checks. It is deployed commercially and reads several million checks per day.

用反向传播算法训练的多层神经网络,是基于梯度的学习技术取得成功的最好例证。只要网络结构选择得当,基于梯度的学习算法就可以合成复杂的决策面,从而在预处理极少的情况下,对高维模式(例如手写字符)进行分类。本文回顾了手写字符识别中的多种方法,并在一个标准的手写数字识别任务上加以比较。结果表明,专门用来处理二维形状变化的卷积神经网络优于所有其他技术。

真实的文档识别系统由多个模块组成,包括字段提取、切分、识别和语言建模。一种新的学习范式,称为图变换网络(graph transformer networks,GTN),允许用基于梯度的方法对这类多模块系统做全局训练,以最小化一个总体性能指标。

文中描述了两套联机手写识别系统。实验表明了全局训练的好处,以及图变换网络的灵活性。

文中还描述了一个用于阅读银行支票的图变换网络。它把卷积神经网络字符识别器与全局训练技术结合起来,在商业支票和个人支票上达到了创纪录的准确率。该系统已投入商业部署,每天阅读数百万张支票。

Background 背景

The authors’ main message is that better pattern recognition systems can be built by relying more on automatic learning and less on hand-designed heuristics. The traditional pipeline, drawn in their Fig. 1, splits the work into a largely hand-crafted feature extractor and a trainable classifier. Accuracy then depends on the designer’s ability to invent a good feature set, and the work has to be redone for each new problem. Three changes, they argue, have made a more learning-centred approach practical: cheaper machines with fast arithmetic, large data sets for commercially important tasks such as handwriting, and learning methods that can take high-dimensional inputs and form intricate decision functions.

作者的核心主张是:更好的模式识别系统应当更多地依靠自动学习,更少地依靠手工设计的启发式规则。他们在图 1 中画出的传统流水线,把工作拆成一个大体上手工构造的特征提取器,再加一个可训练的分类器。识别精度于是取决于设计者能否发明一套好特征,而且每个新问题都往往要重做一遍。他们认为,有三个变化使「更以学习为中心」的路线变得可行:带有快速运算单元的廉价计算机、面向手写识别这类有市场的任务的大规模数据,以及能够处理高维输入并形成复杂决策函数的学习方法。

The paper develops this claim with two case studies. For isolated characters, a carefully designed learning machine can operate directly on pixel images and replace most of the hand-crafted feature extraction. For words, sentences, and full documents, separately designed modules can be replaced by a single principled framework—graph transformer networks—in which every module is trained to improve one global performance measure. No learning method, they add, can succeed without a minimal amount of prior knowledge about the task; in a multilayer network, a good way to put that knowledge in is to tailor the architecture. Convolutional networks are their example of such a specialised design.

本文用两个案例展开这一主张。对孤立字符,精心设计的学习机器可以直接在像素图像上工作,从而取代大部分手工特征提取。对词、句和完整文档,分别设计的模块可以被一个原则清晰的框架——图变换网络——所替代,其中每个模块都为同一个全局性能指标而训练。作者同时指出:任何学习方法若完全没有关于任务的先验知识都难以成功;在多层网络里,把这种知识放进去的一个好办法,就是按任务裁剪结构。卷积网络正是他们给出的这种专门结构的例子。

The standard digit task used later in the paper is the Modified NIST, or MNIST, data set, built from NIST Special Database 3 and Special Database 1. NIST had treated SD-3 as a training set and SD-1 as a test set, but SD-3 (collected among Census Bureau employees) is much cleaner and easier than SD-1 (collected among high-school students). The authors therefore mixed the two sources. SD-1 contains 58,527 digit images by 500 writers; the first 250 writers went into the new training set and the remaining 250 into the new test set, giving nearly 30,000 examples each. Each half was then completed with enough SD-3 examples to make 60,000 training patterns and 60,000 test patterns. In the experiments reported here they used the full 60,000 training samples but only a subset of 10,000 test images (5,000 from SD-1 and 5,000 from SD-3). Original bilevel images were size-normalised to fit in a 20×20 box while preserving aspect ratio, which introduces grey levels through antialiasing. In the regular version, images are centred by centre of mass in a 28×28 field, sometimes extended to 32×32; a deslanted 20×20 version and an early 16×16 version are also used.

后文用作标准数字任务的,是由 NIST 特别数据库 3 和特别数据库 1 构造的 Modified NIST,也就是 MNIST。NIST 原本把 SD-3 当训练集、SD-1 当测试集,但 SD-3(人口普查局雇员书写)比 SD-1(高中生书写)干净得多、也容易得多。作者因此把两个来源混合:SD-1 含 500 位书写者的 58,527 张数字图像,前 250 位进入新训练集,后 250 位进入新测试集,大约各 30,000 例;再各自用足够的 SD-3 样本补足,得到 60,000 个训练样本和 60,000 个测试样本。本文报告的实验使用了全部 60,000 个训练样本,但测试只用其中 10,000 张(SD-1 与 SD-3 各 5,000 张)。原始二值图像在保持纵横比的前提下被尺寸归一化到 20×20 的框内,抗混叠会引入灰度。常规版本按质心把图像放进 28×28 的视场(有时再扩到 32×32);另外还有去倾斜的 20×20 版本,以及早期实验用的 16×16 版本。

Core method 核心方法

Convolutional networks 卷积网络

Convolutional networks combine three architectural ideas to obtain some degree of shift, scale, and distortion invariance: local receptive fields, shared weights (weight replication), and spatial or temporal subsampling. Local fields let units extract elementary features such as edges and corners; sharing the same weights across a plane—called a feature map—detects the same feature at every location and cuts the number of free parameters; a subsampling layer then averages a small neighbourhood, lowers spatial resolution, and makes the representation less sensitive to exact position. Alternating convolution and subsampling builds a “bipyramid”: more feature maps, coarser spatial resolution. If the input is shifted, a feature map shifts with it but is otherwise unchanged. Because all weights are learned by back-propagation, the network synthesises its own feature extractor. The authors trace the combination of convolution and subsampling to Hubel and Wiesel’s simple and complex cells, and to Fukushima’s Neocognitron, which did not yet have a globally supervised procedure such as back-propagation.

卷积网络把三种结构想法结合起来,以获得一定程度的平移、尺度和变形不变性:局部感受野、共享权重(权重复制),以及空间或时间上的子采样。局部感受野让单元提取边缘、角点这类初级特征;同一平面内共享权重——这个平面称为特征图(feature map)——可以在每个位置检测同一特征,并减少自由参数;子采样层再对小邻域取平均、降低空间分辨率,使表征对精确位置不那么敏感。卷积与子采样交替,形成作者所说的「双金字塔」:特征图增多,空间分辨率变粗。输入平移时,特征图随之平移,除此之外保持不变。由于全部权重都用反向传播学习,网络等于在自己合成特征提取器。作者把这种卷积/子采样组合追溯到 Hubel 与 Wiesel 的简单细胞和复杂细胞,以及 Fukushima 的神经认知机(Neocognitron);后者当时还没有反向传播这类全局监督学习程序。

Architecture of LeNet-5 LeNet-5 的结构

LeNet-5 has seven layers, not counting the input, and all of them contain trainable parameters. The input is a 32×32 image, larger than the largest character in the database (at most 20×20, centred in a 28×28 field), so that distinctive features such as endpoints can sit at the centre of the highest-level receptive fields. The centres of the last convolutional layer’s receptive fields form a 20×20 area in the middle of the 32×32 input. Pixel values are normalised so that the mean input is roughly zero and the variance roughly one; the paper sets the foreground (black) to 1.175 in order to accelerate learning. Convolutional, subsampling, and fully connected layers are labelled Cx, Sx, and Fx.

LeNet-5 不含输入层共有七层,每一层都含有可训练参数。输入是 32×32 的图像,比数据库里最大的字符(至多 20×20,放在 28×28 视场中央)更大,这样笔画端点一类有判别力的特征就可以落在最高层感受野的中心。最后一层卷积的感受野中心,在 32×32 输入的中央构成一块 20×20 的区域。像素被归一化,使输入均值大致为零、方差大致为一;文中把前景(黑)设为 1.175,以加快学习。卷积层、子采样层和全连接层分别记为 Cx、Sx 和 Fx。

C1 has six feature maps. Each unit is connected to a 5×5 neighbourhood on the input, and the maps are 28×28 so that connections do not fall off the boundary. C1 has 156 trainable parameters and 122,304 connections. S2 has six 14×14 maps; each unit averages a non-overlapping 2×2 patch from the corresponding C1 map, multiplies by a trainable coefficient, adds a bias, and applies a sigmoid. S2 has 12 trainable parameters and 5,880 connections. C3 has 16 maps, each taking 5×5 neighbourhoods from only a subset of the S2 maps (the assignment is given in the paper’s Table 1). The incomplete connection scheme limits the number of connections and, more importantly, breaks symmetry so that different maps are pushed to extract complementary features. C3 has 1,516 trainable parameters and 156,000 connections. S4 has 16 maps of size 5×5, 32 trainable parameters, and 2,000 connections. C5 has 120 feature maps; each unit is connected to a 5×5 neighbourhood on all 16 S4 maps. Because S4 is also 5×5, each C5 map is 1×1, which amounts to a full connection; it is still called convolutional, because a larger input would make those maps larger than 1×1. C5 has 48,120 trainable connections. F6 has 84 units, fully connected to C5, and 10,164 trainable parameters. The network in Fig. 2 contains 345,308 connections but only 60,000 trainable free parameters because of weight sharing.

C1 有 6 张特征图。每个单元连接输入上 5×5 的邻域,特征图大小为 28×28,以免连接落到边界之外。C1 有 156 个可训练参数和 122,304 个连接。S2 有 6 张 14×14 的特征图;每个单元对相应 C1 图上互不重叠的 2×2 块求和(文中写的是对四个输入相加),乘以可训练系数,加上偏置,再经过 sigmoid。S2 有 12 个可训练参数和 5,880 个连接。C3 有 16 张特征图,每张只从 S2 的一个子集在相同位置取 5×5 邻域(具体组合见原文表 1)。这种非完全连接既把连接数控制在合理范围,更重要的是打破对称,迫使不同特征图提取互补的特征。C3 有 1,516 个可训练参数和 156,000 个连接。S4 有 16 张 5×5 的特征图、32 个可训练参数和 2,000 个连接。C5 有 120 张特征图,每个单元连接 S4 全部 16 张图上的 5×5 邻域。由于 S4 本身也是 5×5,C5 的特征图是 1×1,相当于全连接;它仍被称作卷积层,因为一旦输入变大,这些特征图就会大于 1×1。C5 有 48,120 个可训练连接。F6 有 84 个单元,与 C5 全连接,有 10,164 个可训练参数。图 2 中的网络共有 345,308 个连接,但由于权重共享,可训练的自由参数只有 60,000 个。

Units up to F6 compute a dot product plus a bias and pass it through a scaled hyperbolic tangent whose amplitude constant is chosen to be 1.7159 (the rationale is given in Appendix A). The output layer has one Euclidean radial basis function (RBF) unit per class, each with 84 inputs: it measures the squared Euclidean distance between the F6 vector and a parameter vector. Those parameter vectors were chosen by hand and kept fixed, at least initially; each is a stylised 7×12 bitmap of the character (hence 84). Similar characters therefore receive similar output codes, which helps a linguistic post-processor resolve confusions, and the bounded RBF responses are also convenient for rejecting non-characters. A simple training criterion is mean squared error, which here is equivalent to maximum-likelihood estimation; the authors also discuss a more discriminative maximum a posteriori (MAP) criterion that pushes the correct class down and the rivals up, and that prevents the RBF centres from collapsing if those centres are allowed to adapt. Gradients are computed by back-propagation, with the partial derivatives of all connections that share a parameter added together. Training uses the stochastic diagonal Levenberg–Marquardt procedure of Appendix C, with an individual step size for each parameter, recomputed before each pass from a diagonal Gauss–Newton estimate of the Hessian.

直到 F6 的单元都是做输入向量与权重的点积、加上偏置,再经过缩放双曲正切;幅度常数取 1.7159(理由见附录 A)。输出层对每个类别设一个欧氏径向基函数(RBF)单元,每个有 84 个输入:它计算 F6 向量与参数向量之间的欧氏距离(文中给出的是平方距离形式)。这些参数向量是手工选定的,至少在开始时保持固定;每一个都是对应字符的风格化 7×12 位图(所以是 84 维)。相似字符因此会得到相似的输出编码,便于后续的语言处理模块消解混淆;有界的 RBF 响应也更适合拒识非字符。最简单的训练准则是均方误差,在这里等价于极大似然;作者还讨论了更具判别性的最大后验(MAP)准则,它在压低正确类惩罚的同时抬高竞争类,并在允许 RBF 中心自适应时防止它们塌缩到一起。梯度用反向传播计算,共享同一参数的各条连接的偏导数要加总。训练采用附录 C 的随机对角 Levenberg–Marquardt 方法:每个参数有自己的步长,在每一轮开始前,用 Hessian 的对角 Gauss–Newton 估计重新计算。

Graph transformer networks 图变换网络

Going from isolated characters to words and documents requires several modules—field extraction, segmentation, recognition, language modelling—whose early hard decisions can ruin later stages. The authors’ proposal is to let each module consume and emit directed graphs whose arcs carry hypotheses and scores (penalties). A graph transformer (GT) maps one or more input graphs to an output graph; a cascade of such modules is a graph transformer network. Because the operations are arranged so that the final scalar performance measure is differentiable with respect to the parameters, the whole stack can be trained with gradient-based methods. Heuristic oversegmentation (HOS) builds a segmentation graph of candidate cuts rather than committing to a single cut. A space-displacement neural network (SDNN) is a convolutional net swept across the input so that explicit segmentation heuristics can be reduced or avoided. Training at the string or word level can be done with Viterbi or forward algorithms, in a discriminative or non-discriminative form; the paper emphasises global discriminative loss functions, which aim at optimal classification and rejection without forcing the architecture to follow a generative model such as a hidden Markov model, although GTNs can still be combined with HMM-style composition.

从孤立字符走到词和文档,需要字段提取、切分、识别、语言建模等多个模块,而过早做出的硬决定会毁掉后面的阶段。作者的方案是:让每个模块读写有向图,图上的弧携带假设和分数(惩罚)。一个图变换器(graph transformer,GT)把一张或多张输入图映射成输出图;这样的模块级联就是图变换网络。只要运算安排得使最终的标量性能指标对参数可微,整叠模块就可以用基于梯度的方法训练。启发式过切分(heuristic oversegmentation,HOS)先构造一张候选切分图,而不是只做一个切分决定。空间位移神经网络(space-displacement neural network,SDNN)则是把卷积网络在输入上滑动扫描,从而减少甚至避免显式切分启发式。在字符串或词一级,可以用 Viterbi 或前向算法做判别式或非判别式训练;论文强调的是全局判别损失,目标是得到好的分类与拒识,而不强迫结构服从隐马尔可夫模型那样的生成模型——尽管 GTN 仍可以与 HMM 风格的图复合结合使用。

Main experimental results 主要实验结果

The figures below are only those the paper itself reports. The authors note that the uncertainty in the quoted MNIST test error rates is about 0.1%.

下面只写入原文实际报告的数字。作者说明,所列 MNIST 测试误差率的不确定性约为 0.1%。

LeNet-5 on MNIST LeNet-5 在 MNIST 上的结果

Several versions of LeNet-5 were trained on the regular MNIST set for twenty passes through the 60,000 training examples. The global learning rate followed a decreasing schedule: 0.0005 for the first two passes, 0.0002 for the next three, 0.0001 for the next three, 0.00005 for the next four, and 0.00001 thereafter. The test error stabilises after around ten passes at 0.95%. The training error reaches 0.35% after 19 passes. Convergence is attained after 10–12 passes through the training set. The training error measured on the fly can appear larger than the test error at the beginning of training, because it is averaged while the rate is still being lowered. The authors did not observe the classic overtraining pattern in which test error rises after a minimum; they suggest that a relatively large learning rate kept the weights from settling in a sharp local minimum. Fig. 8 shows all 82 misclassified test examples (0.95% of 10,000 is 95, so the 82 figure is the count they display for the trained net). Some of those errors are genuinely ambiguous; several are perfectly identifiable by humans but written in an under-represented style.

若干版本的 LeNet-5 在常规 MNIST 上训练,对全部 60,000 个训练样本走了 20 轮。全局学习率按递减日程:前两轮 0.0005,随后三轮 0.0002,再三轮 0.0001,再四轮 0.00005,此后 0.00001。测试误差在大约十轮后稳定在 0.95%。训练误差在 19 轮后达到 0.35%。在训练集上走 10–12 轮后即可收敛。训练初期在线统计的训练误差可能显得比测试误差更大,因为它是在学习率仍在下降时平均出来的。作者没有观察到测试误差先降后升的典型过训练现象;他们认为,相对较大的学习率使权重没有停在尖锐的局部极小上。图 8 展示了全部 82 个被分错的测试样本(10,000 的 0.95% 是 95,因此 82 是他们为训练后的网络画出的实际误分数)。其中有些确实含混;也有若干在人看来完全可辨,只是写法在训练集里代表性不足。

Training-set size was also varied (15,000, 30,000, and 60,000). Even with a specialised architecture such as LeNet-5, more data still improved accuracy. To test this further, the authors augmented the 60,000 originals with 540,000 artificially distorted instances. The distortions were planar affine transforms: horizontal and vertical translations, scaling, squeezing (simultaneous horizontal compression and vertical elongation, or the reverse), and horizontal shearing. With distorted training data, the test error dropped to 0.8% (from 0.95% without deformation). The same training parameters were used, and the session length was left unchanged at 20 passes of 60,000 patterns each. Training LeNet-5 took two to three days of CPU on a Silicon Graphics Origin 2000 with a single 200 MHz R10000 processor.

作者还改变了训练集大小(15,000、30,000 和 60,000)。即便已是 LeNet-5 这样的专门结构,更多数据仍然提高了精度。为进一步验证,他们在 60,000 张原图之外又加入 540,000 张人工变形样本。变形是平面仿射变换:水平与垂直平移、缩放、挤压(水平压缩同时垂直拉长,或相反),以及水平剪切。使用变形数据训练后,测试误差降到 0.8%(无变形时为 0.95%)。训练参数与无变形时相同,训练长度仍是 20 轮、每轮 60,000 个样本。在一台 Silicon Graphics Origin 2000、单颗 200 MHz 的 R10000 处理器上,训练 LeNet-5 大约需要两到三天 CPU 时间。

Comparisons on MNIST MNIST 上的方法比较

Fig. 9 collects test-set error rates. A linear classifier has 12.0% error on the regular data (7,850 free parameters) and 8.4% on deslanted images (4,010 parameters). A pairwise linear classifier reaches 7.6%. A 40-component PCA followed by a quadratic classifier has 3.3% error. A network of 1,000 Gaussian RBF units plus a linear classifier has 3.6%. A fully connected net with one hidden layer has 4.7% error with 300 hidden units and 4.5% with 1,000 hidden units; artificial distortions give only a marginal change (3.6% and 3.8% respectively); with deslanted images the 300-unit net reaches 1.6%. A two-hidden-layer 28×28-300-100-10 net has 3.05% error, better than the one-hidden-layer nets with only marginally more weights; a 28×28-1000-150-10 net has 2.95%. Distorted training improves these to 2.50% and 2.45% respectively.

图 9 汇总了测试集误差率。线性分类器在常规数据上误差为 12.0%(7,850 个自由参数),在去倾斜图像上为 8.4%(4,010 个参数)。成对线性分类器达到 7.6%。取 40 个主成分再加二次分类器,误差为 3.3%。1,000 个高斯 RBF 单元加线性分类器为 3.6%。单隐层全连接网:300 个隐单元时为 4.7%,1,000 个隐单元时为 4.5%;人工变形只带来很小的变化(分别为 3.6% 和 3.8%);在去倾斜图像上,300 隐单元网络达到 1.6%。双隐层的 28×28-300-100-10 网络误差为 3.05%,优于权重只多一点的单隐层网;28×28-1000-150-10 为 2.95%。用变形样本训练后,二者分别改进到 2.50% 和 2.45%。

LeNet-1, an earlier and much smaller convolutional net operating on 16×16 images, achieves 1.7% test error with only about 2,600 free parameters and about 100,000 multiply–adds. It had been tuned on the authors’ earlier USPS ZIP-code data. LeNet-4, designed to make better use of the large training set, has four first-level feature maps, then eight subsampling maps, 16 further feature maps, 16 subsampling maps, a fully connected layer of 120 units, and a ten-unit output; it contains about 260,000 connections and about 17,000 free parameters, and its test error is 1.1%. Replacing its last layer by a local linear classifier or a Euclidean nearest-neighbour classifier did not improve the raw error rate (both remain 1.1% in Fig. 9) but did improve rejection. Boosted LeNet-4, combining three LeNet-4 networks with Drucker and colleagues’ boosting procedure and training the later nets on distorted images, attains 0.7% test error, the best of any classifier in the comparison; the authors estimate the average computational cost at about 1.75 times that of a single net. LeNet-5 itself is at 0.95% without distortions and 0.8% with them.

更早、也小得多的卷积网 LeNet-1 在 16×16 图像上工作,测试误差为 1.7%,自由参数只有约 2,600 个,乘加次数约 100,000。它的结构是按作者更早的美国邮政编码(USPS)数据调整的。LeNet-4 是为更好地利用这一大训练集而设计的:第一层 4 张特征图,随后 8 张子采样图、再 16 张特征图和 16 张子采样图,然后是 120 个单元的全连接层和 10 个单元的输出层;约有 260,000 个连接和 17,000 个自由参数,测试误差为 1.1%。把最后一层换成局部线性分类器或欧氏近邻,并不改善原始误差率(图 9 中二者仍是 1.1%),但改善了拒识。Boosted LeNet-4 用 Drucker 等人的 boosting 把三台 LeNet-4 组合起来,并在变形图像上训练后两台网络,测试误差达到 0.7%,是这一比较中最好的结果;作者估计平均计算代价约为单网的 1.75 倍。LeNet-5 本身在无变形时为 0.95%,有变形时为 0.8%。

A tangent-distance nearest-neighbour classifier on 16×16 images reaches 1.1%. For support vector methods, the paper reports several numbers from the literature and from personal communication: a regular SVM at 1.4% on the regular test set (Burges and Schölkopf); 1.1% reported by Cortes and Vapnik with a slightly different technique; 1.0% with Schölkopf’s virtual-SVM (V-SVM); 0.8% with a modified V-SVM; and 1.1% with Burges’s reduced-set SVM (RS-SVM), at about 650,000 multiply–adds per recognition, only about 60% more expensive than LeNet-5. A regular SVM, they note, costs about 14 million multiply–adds. Fig. 9 plots an SVM with a degree-4 polynomial at 1.1%, RS-SVM at 1.1%, and distorted V-SVM at 0.8%.

在 16×16 图像上,切空间距离(tangent distance)近邻分类器达到 1.1%。支持向量方法方面,文中报告了若干来自文献和私人通信的数字:常规 SVM 在常规测试集上为 1.4%(Burges 与 Schölkopf);Cortes 与 Vapnik 用略有不同的技术报告过 1.1%;Schölkopf 的虚拟 SVM(V-SVM)为 1.0%;改进的 V-SVM 为 0.8%;Burges 的减集 SVM(RS-SVM)为 1.1%,每次识别约 650,000 次乘加,只比 LeNet-5 大约贵 60%。他们指出,常规 SVM 大约需要 1,400 万次乘加。图 9 中,4 次多项式 SVM 画在 1.1%,RS-SVM 为 1.1%,变形训练的 V-SVM 为 0.8%。

Fig. 10 reports a rejection measure: the percentage of test patterns that must be rejected to achieve 0.5% error among the remaining patterns. Boosted LeNet-4 (with distortions) needs only 0.5% rejections; LeNet-4 with a local classifier needs 1.4%; LeNet-4 itself and the degree-4 SVM need 1.8%; LeNet-1 needs 3.7%; a deslanted 20×20-300-10 net needs 3.2%; 16×16 tangent distance needs 1.9%; deslanted K-nearest neighbours need 8.1%. The authors remark that in many applications rejection performance matters more than raw error, and that Boosted LeNet-4 is best on this measure. Memory-based methods can be accurate but require storing the training set (the paper mentions about 24 megabytes for the 60,000 20×20 images at one byte per pixel) and are slow at run time; convolutional nets, by contrast, were already known to run at more than 1,000 characters per second in earlier analogue–digital hardware, though the authors also note that such specialised chips were quickly being overtaken by mainstream computers.

图 10 报告的是一种拒识指标:为使剩余样本上的误差达到 0.5%,必须拒绝的测试样本百分比。带变形的 Boosted LeNet-4 只需拒绝 0.5%;带局部分类器的 LeNet-4 为 1.4%;LeNet-4 本身和 4 次多项式 SVM 为 1.8%;LeNet-1 为 3.7%;去倾斜的 20×20-300-10 网络为 3.2%;16×16 切空间距离为 1.9%;去倾斜的 K 近邻为 8.1%。作者指出,在许多应用里,拒识表现比原始误差更重要,而 Boosted LeNet-4 在这一指标上最好。基于记忆的方法可以很准,但需要存储整个训练集(文中提到 60,000 张 20×20 图像按每像素一字节约 24 MB),运行也慢;相比之下,卷积网的前代硬件实现已知可以超过每秒 1,000 个字符——不过作者也说,这类专用芯片很快就被主流计算机赶上了。

Online handwriting 联机手写

Section IX describes a writer-independent online handwriting system whose core is a convolutional network, trained either at the character level or globally at the word level. After initial training on isolated characters from a database of approximately 100,000 hand-printed characters (95 classes of upper case, lower case, digits, and punctuation), tests on isolated characters gave: 2.99% error on 9,122 upper-case patterns, 4.15% error on 8,201 lower-case patterns, 1.4% error on 2,938 digits, and 4.3% error on 881 punctuation patterns. On a database of 881 lower-case words, heuristic oversegmentation with character-level normalisation yielded 7.3% word error and 3.5% character error (insertions, deletions, and substitutions) when search was constrained to a 25,461-word dictionary; switching to word-level normalisation dropped these to 4.6% and 2.0%, a relative reduction of 37% and 43%. On 3,500 lower-case words, an SDNN/HMM system without dictionary constraints went from 38% word error and 12.4% character error to 26% and 8.2% after word-level training, relative drops of 32% and 34%. With the 25,461-word dictionary, word and character errors fell from 4.6% and 2.0% to 3.2% and 1.4% after word-level training (relative drops of 30.4% and 30.0%). Shrinking the dictionary to 350 words yielded 1.6% and 0.94%. Fig. 32 summarises the gain from global training for the SDNN/HMM hybrid and for HOS, with and without the lexicon.

第 IX 节描述了一套与书写者无关的联机手写系统,核心是卷积网络,可以在字符级训练,也可以在词级做全局训练。在约 100,000 个手写印刷体字符(大写、小写、数字和标点共 95 类)上完成初始训练后,孤立字符测试结果为:大写 9,122 个样本误差 2.99%,小写 8,201 个样本误差 4.15%,数字 2,938 个样本误差 1.4%,标点 881 个样本误差 4.3%。在 881 个小写词的数据库上,采用启发式过切分并做字符级归一化、且搜索限制在 25,461 词的词典内时,词误差为 7.3%、字符误差为 3.5%(插入、删除与替换之和);改为词级归一化后降到 4.6% 和 2.0%,相对下降 37% 和 43%。在 3,500 个小写词上,不使用词典约束的 SDNN/HMM 系统,在词级训练后从 38% 的词误差和 12.4% 的字符误差降到 26% 和 8.2%,相对下降 32% 和 34%。使用 25,461 词词典时,词级训练使词误差和字符误差从 4.6% 和 2.0% 降到 3.2% 和 1.4%(相对下降 30.4% 和 30.0%)。把词典缩小到 350 词,则得到 1.6% 和 0.94%。图 32 汇总了 SDNN/HMM 混合系统与 HOS 在有无词典时,全局训练带来的改进。

Bank-check reading 支票阅读

Section X describes a commercially deployed GTN for reading the courtesy amount (the amount written in numerals) on business and personal checks. The authors state that a bank-set viability threshold was to read 50% of checks with less than 1% error, rejecting the rest to human operators (described as 50% correct / 49% reject / 1% error), and that the system was one of the first to cross that threshold on representative mixtures of business and personal checks. The network is a cascade of graph transformers: field location, segmentation, character recognition with a convolutional net, and composition with a stochastic grammar of valid amounts.

第 X 节描述了一套已投入商业部署、用于阅读商业支票和个人支票上小写金额(用数字书写的金额,courtesy amount)的 GTN。作者写道,银行设定的经济可行门槛是:在误差低于 1% 的前提下读出 50% 的支票,其余交给人工(即 50% 正确 / 49% 拒识 / 1% 错误);该系统是最早在有代表性的商业与个人支票混合数据上跨过这一门槛的系统之一。网络是一串图变换器:字段定位、切分、用卷积网做字符识别,再与合法金额的随机文法做复合。

The neural classifier was first trained on 500,000 character images spanning the printable ASCII set, then further trained on characters automatically segmented from checks and manually truthed, and also trained to reject non-characters caused by segmentation errors. After insertion into the check-reading system, a small subset of the parameters was trained globally at the field level on whole check images. On 646 business checks that were automatically categorised as machine printed, the performance was 82% correctly recognised checks, 1% errors, and 17% rejects. The previous system on the same test set had 68% correct, 1% errors, and 31% rejects. The authors attribute the gain to a larger, more thoroughly trained recogniser, to the GTN’s ability to use grammatical constraints more efficiently, and—more than it first seems—to the flexibility of tuning heuristics inside the same framework. They also note that, in this particular task, the importance of global training was only minor, because it concerned only a small subset of the parameters. The system was integrated in NCR’s check-reading line, fielded in several banks across the United States since June 1996, and had been reading millions of checks per day since then. That commercial claim matches the abstract’s “several million checks per day.”

神经分类器先在覆盖可打印 ASCII 集合的 500,000 张字符图像上训练,再在从支票上自动切分并人工标注的字符上继续训练,同时也训练拒识因切分错误产生的非字符。放入支票阅读系统之后,又有一小部分参数在整张支票图像上按字段级做了全局训练。在 646 张被自动判定为机器印刷的商业支票上,结果是 82% 正确识别、1% 错误、17% 拒识。此前系统在同一测试集上是 68% 正确、1% 错误、31% 拒识。作者把改进归为三点:识别器更大、训练更充分;GTN 能更有效地利用文法约束;以及——比看上去更重要的——在同一框架里调整启发式规则的灵活性。他们也写明:在这个具体任务上,全局训练的重要性其实不大,因为它只涉及一小部分参数。该系统被集成进 NCR 的支票阅读产品线,自 1996 年 6 月起部署于美国多家银行,并自此每天阅读数百万张支票。这一商业表述与摘要中的「每天数百万张支票」一致。

Impact and later work 影响与后续工作

The authors close by arguing that gradient-based learning is not confined to ordinary multilayer nets: once a system is organised so that a global loss can be differentiated through its modules, the same credit-assignment idea applies to architectures whose structure changes with each input, including GTNs. Convolutional nets, they write, reduce the need for hand-crafted feature extractors; GTNs reduce the need for hand-crafted heuristics, manual labelling, and manual parameter tuning. As data and computers grow, they expect systems to rely more on learning.

作者在结尾主张:基于梯度的学习并不限于普通多层网络——只要系统被组织成可以通过各模块对全局损失求导,同样的信用分配思想就可以用于结构随输入而变的架构,包括 GTN。他们写道,卷积网减少了对手工特征提取器的依赖;GTN 则减少了对手工启发式、人工标注和手工调参的依赖。随着数据和计算机的增长,他们预期系统会越来越依赖学习。

Subsequent work lies outside the 1998 text, but the paper’s public influence is easy to locate from what it introduced. MNIST became a standard benchmark for later deep networks. The LeNet pattern of convolution, nonlinearity, and subsampling is the direct ancestor of the deep convolutional models that, more than a decade later, returned to large-scale image recognition. Graph transformer networks are less often named than “LeNet,” yet the idea of training a whole recognition stack—segmentation, classification, and a language model—against one sequence-level loss remains central in speech and handwriting systems, and in later sequence models. The commercial check reader is an unusually concrete reminder that this was already a working engineering method in the mid-1990s, not only a laboratory comparison on isolated digits.

1998 年正文之后的发展已不属于原文,但这篇论文进入公共文献的影响,可以从它引入的内容上清楚地看到。MNIST 后来成为深度网络的标准基准。LeNet 那种「卷积、非线性、子采样」的组织方式,是十多年后重返大规模图像识别的深层卷积模型的直接前身。图变换网络不像「LeNet」那样常被点名,但把切分、分类和语言模型整条识别栈放到同一个序列级损失下训练的想法,在语音和手写系统以及后来的序列模型里一直很重要。那套商业支票阅读系统则是一个少见的具体提醒:在 1990 年代中期,这已经是可以上线的工程方法,而不仅仅是孤立数字上的实验室对照。

Limitations 局限

The paper itself is careful about scope. Isolated digit recognition, the authors say at the opening of Section III, is only one of many problems in a practical recognition system, even though it is an excellent benchmark. On MNIST, even LeNet-5 still benefits from more data; some of the remaining errors are genuine ambiguities, and others come from writing styles that are rare in the training set. Several highly accurate competitors are expensive at run time or in memory, and boosting three networks costs about 1.75 times a single net. For checks, the deployed system reads only the courtesy amount, not the legal amount written in words, a restriction the authors adopt for simplicity and speed. Finding the amount on business checks can be difficult even for a person, because many digit strings can be confused with it. In the check task as implemented, global training touched only a small subset of parameters and was, by the authors’ own account, only a minor part of the improvement. The comparisons also show that a convolutional architecture is not a guaranteed winner by itself: a good prior (deslanting, distortions, or a large training set) and a training procedure that actually converges still matter, which is consistent with the authors’ claim that some task knowledge must be built into the architecture.

原文对范围是有分寸的。第 III 节开篇就说,孤立数字识别虽然是极好的基准,却只是实用识别系统里的诸多问题之一。在 MNIST 上,即便是 LeNet-5,更多数据仍然有益;剩下的错误有些是真正的歧义,有些则来自训练集里少见的写法。若干精度很高的对照方法在运行时间或内存上很贵,三台网络的 boosting 代价大约是单网的 1.75 倍。在支票任务上,部署系统只读数字书写的小写金额,不读用文字书写的大写金额,这是作者为简单和速度做的限制。商业支票上要找到金额,对人来说有时也很困难,因为许多数字串都可能被认成金额。就他们实现的支票系统而言,全局训练只涉及一小部分参数,按作者自己的说法,在改进中只占次要位置。比较结果也表明,卷积结构本身并不保证取胜:好的先验(去倾斜、变形或更大的训练集)以及真正能够收敛的训练程序仍然重要——这与作者所说「必须把一定的任务知识写进结构」是一致的。

It should also be remembered that the article is an IEEE copyrighted invited paper, not an openly licensed text, so this guide does not reproduce the body of the paper beyond the abstract.

另外应记住:这是 IEEE 享有版权的特约论文,不是开放许可文本,因此本导读除摘要外不复述正文原文。

Key terms 关键词

  • Convolutional neural network (CNN) 卷积神经网络:A multilayer network that uses local receptive fields, shared weights, and subsampling so that features can be learned from images with partial invariance to shift and distortion. 使用局部感受野、共享权重和子采样的多层网络,使特征可以从图像中学习,并对平移和变形有部分不变性。
  • LeNet-5:The seven-layer convolutional architecture used in the paper’s main digit experiments, with 345,308 connections but only 60,000 free parameters. 本文主要数字实验所用的七层卷积结构,有 345,308 个连接,但只有 60,000 个自由参数。
  • Feature map 特征图:A plane of units that share the same weights and therefore detect the same local feature at every position. 共享同一组权重的单元平面,因此在每个位置检测同一种局部特征。
  • Subsampling layer 子采样层:A layer that averages a small neighbourhood, reduces spatial resolution, and makes the representation less sensitive to exact feature location. 对小邻域取平均、降低空间分辨率,从而使表征对特征精确位置不那么敏感的层。
  • Graph transformer network (GTN) 图变换网络:A cascade of modules that map scored hypothesis graphs to other graphs, trained globally by gradient descent on one overall performance measure. 把带分数的假设图映射成其他图的模块级联,并用同一个总体性能指标做全局梯度训练。
  • MNIST (Modified NIST) 修改后的 NIST 数据集:A mixed digit benchmark built from NIST SD-3 and SD-1, with 60,000 training samples and a 10,000-image test subset used in this paper. 由 NIST 的 SD-3 与 SD-1 混合而成的数字基准,本文使用 60,000 个训练样本和 10,000 张测试子集。
  • Heuristic oversegmentation (HOS) 启发式过切分:A strategy that proposes many candidate cuts and postpones the final segmentation decision until a later scorer, often a language model, can help. 先提出许多候选切分,把最终切分决定推迟到后续打分器(常常是语言模型)能够参与之时的策略。
  • Space-displacement neural network (SDNN) 空间位移神经网络:A convolutional recogniser applied at every location along the input, used to reduce reliance on explicit segmentation heuristics. 在输入的每个位置上施加的卷积识别器,用来减少对显式切分启发式的依赖。

Original paper 原文链接

DOI:https://doi.org/10.1109/5.726791
IEEE Xplore:https://ieeexplore.ieee.org/document/726791/
Author PDF 作者 PDF(官方列表中的地址):http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf
Author publication list 作者论文列表:http://yann.lecun.com/exdb/publis/

1 次浏览

发表回复