Mercurial > ift6266
annotate writeup/mlj_submission.tex @ 619:ea31fee25147
review response
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Sun, 09 Jan 2011 14:15:04 -0500 |
parents | 8bd4ff0c5c05 |
children |
rev | line source |
---|---|
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
1 \RequirePackage{fix-cm} % from template |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
2 |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
3 %\documentclass{article} % For LaTeX2e |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
4 \documentclass[smallcondensed]{svjour3} % onecolumn (ditto) |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
5 |
585 | 6 \usepackage{times} |
7 \usepackage{wrapfig} | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
8 %\usepackage{amsthm} % not to be used with springer tools |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
9 \usepackage{amsmath} |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
10 \usepackage{bbm} |
585 | 11 \usepackage[psamsfonts]{amssymb} |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
12 %\usepackage{algorithm,algorithmic} % not used after all |
585 | 13 \usepackage[utf8]{inputenc} |
14 \usepackage{graphicx,subfigure} | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
15 \usepackage{natbib} % was [numbers]{natbib} |
585 | 16 |
17 \addtolength{\textwidth}{10mm} | |
18 \addtolength{\evensidemargin}{-5mm} | |
19 \addtolength{\oddsidemargin}{-5mm} | |
20 | |
21 %\setlength\parindent{0mm} | |
22 | |
23 \title{Deep Self-Taught Learning for Handwritten Character Recognition} | |
24 \author{ | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
25 Yoshua Bengio \and |
585 | 26 Frédéric Bastien \and |
27 Arnaud Bergeron \and | |
28 Nicolas Boulanger-Lewandowski \and | |
29 Thomas Breuel \and | |
30 Youssouf Chherawala \and | |
31 Moustapha Cisse \and | |
32 Myriam Côté \and | |
33 Dumitru Erhan \and | |
34 Jeremy Eustache \and | |
35 Xavier Glorot \and | |
36 Xavier Muller \and | |
37 Sylvain Pannetier Lebeuf \and | |
38 Razvan Pascanu \and | |
39 Salah Rifai \and | |
40 Francois Savard \and | |
41 Guillaume Sicard | |
42 } | |
43 \date{September 30th, submission to MLJ special issue on learning from multi-label data} | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
44 \journalname{Machine Learning Journal} |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
45 \institute{Frédéric Bastien \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
46 Yoshua Bengio \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
47 Arnaud Bergeron \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
48 Nicolas Boulanger-Lewandowski \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
49 Youssouf Chherawala \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
50 Moustapha Cisse \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
51 Myriam Côté \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
52 Dumitru Erhan \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
53 Jeremy Eustache \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
54 Xavier Glorot \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
55 Xavier Muller \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
56 Sylvain Pannetier-Lebeuf \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
57 Razvan Pascanu \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
58 Salah Rifai \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
59 Francois Savard \and \\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
60 Guillaume Sicard \at |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
61 Dept. IRO, Universite de Montreal, C.P. 6128, Montreal, QC, H3C 3J7, Canada\\ |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
62 \email{yoshua.bengio@umontreal.ca} |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
63 \and |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
64 Thomas Breuel \at |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
65 Department of Computer Science, University of Kaiserslautern, Postfach 3049, 67653 Kaiserslautern, Germany |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
66 } |
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
67 |
585 | 68 |
69 \begin{document} | |
70 | |
71 %\makeanontitle | |
72 \maketitle | |
73 | |
74 %\vspace*{-2mm} | |
75 \begin{abstract} | |
589 | 76 Recent theoretical and empirical work in statistical machine learning has demonstrated the potential of learning algorithms for deep architectures, i.e., function classes obtained by composing multiple levels of representation. Self-taught learning (exploiting unlabeled examples or examples from other distributions) has already been applied to deep learners, but mostly to show the advantage of unlabeled examples. Here we explore the advantage brought by {\em out-of-distribution examples}. For this purpose we developed a powerful generator of stochastic variations and noise processes for character images, including not only affine transformations but also slant, local elastic deformations, changes in thickness, background images, grey level changes, contrast, occlusion, and various types of noise. The out-of-distribution examples are obtained from these highly distorted images or by including examples of object classes different from those in the target test set. We show that {\em deep learners benefit more from out-of-distribution examples than a corresponding shallow learner}, at least in the area of handwritten character recognition. In fact, we show that they beat previously published results and reach human-level performance on both handwritten digit classification and 62-class handwritten character recognition. |
585 | 77 \end{abstract} |
78 %\vspace*{-3mm} | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
79 |
591 | 80 \keywords{self-taught learning \and multi-task learning \and out-of-distribution examples \and deep learning \and handwriting recognition} |
585 | 81 |
82 \section{Introduction} | |
83 %\vspace*{-1mm} | |
84 | |
85 {\bf Deep Learning} has emerged as a promising new area of research in | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
86 statistical machine learning (see \citet{Bengio-2009} for a review). |
585 | 87 Learning algorithms for deep architectures are centered on the learning |
88 of useful representations of data, which are better suited to the task at hand, | |
89 and are organized in a hierarchy with multiple levels. | |
90 This is in part inspired by observations of the mammalian visual cortex, | |
91 which consists of a chain of processing elements, each of which is associated with a | |
92 different representation of the raw visual input. In fact, | |
93 it was found recently that the features learnt in deep architectures resemble | |
94 those observed in the first two of these stages (in areas V1 and V2 | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
95 of visual cortex) \citep{HonglakL2008}, and that they become more and |
585 | 96 more invariant to factors of variation (such as camera movement) in |
97 higher layers~\citep{Goodfellow2009}. | |
98 Learning a hierarchy of features increases the | |
99 ease and practicality of developing representations that are at once | |
100 tailored to specific tasks, yet are able to borrow statistical strength | |
101 from other related tasks (e.g., modeling different kinds of objects). Finally, learning the | |
102 feature representation can lead to higher-level (more abstract, more | |
103 general) features that are more robust to unanticipated sources of | |
104 variance extant in real data. | |
105 | |
106 {\bf Self-taught learning}~\citep{RainaR2007} is a paradigm that combines principles | |
107 of semi-supervised and multi-task learning: the learner can exploit examples | |
108 that are unlabeled and possibly come from a distribution different from the target | |
109 distribution, e.g., from other classes than those of interest. | |
110 It has already been shown that deep learners can clearly take advantage of | |
111 unsupervised learning and unlabeled examples~\citep{Bengio-2009,WestonJ2008-small}, | |
112 but more needs to be done to explore the impact | |
113 of {\em out-of-distribution} examples and of the {\em multi-task} setting | |
114 (one exception is~\citep{CollobertR2008}, which uses a different kind | |
115 of learning algorithm). In particular the {\em relative | |
116 advantage of deep learning} for these settings has not been evaluated. | |
117 The hypothesis discussed in the conclusion is that in the context of | |
118 multi-task learning and the availability of out-of-distribution training examples, | |
119 a deep hierarchy of features | |
120 may be better able to provide sharing of statistical strength | |
121 between different regions in input space or different tasks, compared to | |
122 a shallow learner. | |
123 | |
124 Whereas a deep architecture can in principle be more powerful than a | |
125 shallow one in terms of representation, depth appears to render the | |
126 training problem more difficult in terms of optimization and local minima. | |
127 It is also only recently that successful algorithms were proposed to | |
128 overcome some of these difficulties. All are based on unsupervised | |
129 learning, often in an greedy layer-wise ``unsupervised pre-training'' | |
130 stage~\citep{Bengio-2009}. One of these layer initialization techniques, | |
131 applied here, is the Denoising | |
590 | 132 Auto-encoder~(DA)~\citep{VincentPLarochelleH2008-very-small} (see Figure~\ref{fig:da}), |
585 | 133 which |
134 performed similarly or better than previously proposed Restricted Boltzmann | |
135 Machines in terms of unsupervised extraction of a hierarchy of features | |
136 useful for classification. Each layer is trained to denoise its | |
137 input, creating a layer of features that can be used as input for the next layer. | |
138 | |
139 %The principle is that each layer starting from | |
140 %the bottom is trained to encode its input (the output of the previous | |
141 %layer) and to reconstruct it from a corrupted version. After this | |
142 %unsupervised initialization, the stack of DAs can be | |
143 %converted into a deep supervised feedforward neural network and fine-tuned by | |
144 %stochastic gradient descent. | |
145 | |
146 % | |
147 In this paper we ask the following questions: | |
148 | |
149 %\begin{enumerate} | |
150 $\bullet$ %\item | |
151 Do the good results previously obtained with deep architectures on the | |
152 MNIST digit images generalize to the setting of a much larger and richer (but similar) | |
153 dataset, the NIST special database 19, with 62 classes and around 800k examples? | |
154 | |
155 $\bullet$ %\item | |
156 To what extent does the perturbation of input images (e.g. adding | |
157 noise, affine transformations, background images) make the resulting | |
158 classifiers better not only on similarly perturbed images but also on | |
159 the {\em original clean examples}? We study this question in the | |
160 context of the 62-class and 10-class tasks of the NIST special database 19. | |
161 | |
162 $\bullet$ %\item | |
163 Do deep architectures {\em benefit {\bf more} from such out-of-distribution} | |
164 examples, i.e. do they benefit more from the self-taught learning~\citep{RainaR2007} framework? | |
165 We use highly perturbed examples to generate out-of-distribution examples. | |
166 | |
167 $\bullet$ %\item | |
168 Similarly, does the feature learning step in deep learning algorithms benefit {\bf more} | |
169 from training with moderately {\em different classes} (i.e. a multi-task learning scenario) than | |
170 a corresponding shallow and purely supervised architecture? | |
171 We train on 62 classes and test on 10 (digits) or 26 (upper case or lower case) | |
172 to answer this question. | |
173 %\end{enumerate} | |
174 | |
175 Our experimental results provide positive evidence towards all of these questions, | |
176 as well as classifiers that reach human-level performance on 62-class isolated character | |
177 recognition and beat previously published results on the NIST dataset (special database 19). | |
178 To achieve these results, we introduce in the next section a sophisticated system | |
179 for stochastically transforming character images and then explain the methodology, | |
180 which is based on training with or without these transformed images and testing on | |
181 clean ones. We measure the relative advantage of out-of-distribution examples | |
182 (perturbed or out-of-class) | |
183 for a deep learner vs a supervised shallow one. | |
184 Code for generating these transformations as well as for the deep learning | |
185 algorithms are made available at {\tt http://hg.assembla.com/ift6266}. | |
186 We estimate the relative advantage for deep learners of training with | |
187 other classes than those of interest, by comparing learners trained with | |
188 62 classes with learners trained with only a subset (on which they | |
189 are then tested). | |
190 The conclusion discusses | |
191 the more general question of why deep learners may benefit so much from | |
192 the self-taught learning framework. Since out-of-distribution data | |
193 (perturbed or from other related classes) is very common, this conclusion | |
194 is of practical importance. | |
195 | |
196 %\vspace*{-3mm} | |
197 %\newpage | |
198 \section{Perturbed and Transformed Character Images} | |
199 \label{s:perturbations} | |
200 %\vspace*{-2mm} | |
201 | |
202 \begin{wrapfigure}[8]{l}{0.15\textwidth} | |
203 %\begin{minipage}[b]{0.14\linewidth} | |
204 %\vspace*{-5mm} | |
205 \begin{center} | |
590 | 206 \includegraphics[scale=.4]{Original.png}\\ |
585 | 207 {\bf Original} |
208 \end{center} | |
209 \end{wrapfigure} | |
210 %%\vspace{0.7cm} | |
211 %\end{minipage}% | |
212 %\hspace{0.3cm}\begin{minipage}[b]{0.86\linewidth} | |
213 This section describes the different transformations we used to stochastically | |
214 transform $32 \times 32$ source images (such as the one on the left) | |
215 in order to obtain data from a larger distribution which | |
216 covers a domain substantially larger than the clean characters distribution from | |
217 which we start. | |
218 Although character transformations have been used before to | |
219 improve character recognizers, this effort is on a large scale both | |
220 in number of classes and in the complexity of the transformations, hence | |
221 in the complexity of the learning task. | |
222 The code for these transformations (mostly python) is available at | |
223 {\tt http://hg.assembla.com/ift6266}. All the modules in the pipeline share | |
224 a global control parameter ($0 \le complexity \le 1$) that allows one to modulate the | |
225 amount of deformation or noise introduced. | |
226 There are two main parts in the pipeline. The first one, | |
227 from slant to pinch below, performs transformations. The second | |
228 part, from blur to contrast, adds different kinds of noise. | |
229 %\end{minipage} | |
230 | |
231 %\vspace*{1mm} | |
232 \subsection{Transformations} | |
233 %{\large\bf 2.1 Transformations} | |
234 %\vspace*{1mm} | |
235 | |
236 \subsubsection*{Thickness} | |
237 | |
238 %\begin{wrapfigure}[7]{l}{0.15\textwidth} | |
239 \begin{minipage}[b]{0.14\linewidth} | |
240 %\centering | |
241 \begin{center} | |
242 \vspace*{-5mm} | |
590 | 243 \includegraphics[scale=.4]{Thick_only.png}\\ |
585 | 244 %{\bf Thickness} |
245 \end{center} | |
246 \vspace{.6cm} | |
247 \end{minipage}% | |
248 \hspace{0.3cm}\begin{minipage}[b]{0.86\linewidth} | |
249 %\end{wrapfigure} | |
250 To change character {\bf thickness}, morphological operators of dilation and erosion~\citep{Haralick87,Serra82} | |
251 are applied. The neighborhood of each pixel is multiplied | |
252 element-wise with a {\em structuring element} matrix. | |
253 The pixel value is replaced by the maximum or the minimum of the resulting | |
254 matrix, respectively for dilation or erosion. Ten different structural elements with | |
255 increasing dimensions (largest is $5\times5$) were used. For each image, | |
256 randomly sample the operator type (dilation or erosion) with equal probability and one structural | |
257 element from a subset of the $n=round(m \times complexity)$ smallest structuring elements | |
258 where $m=10$ for dilation and $m=6$ for erosion (to avoid completely erasing thin characters). | |
259 A neutral element (no transformation) | |
260 is always present in the set. | |
261 %%\vspace{.4cm} | |
262 \end{minipage} | |
263 | |
264 \vspace{2mm} | |
265 | |
266 \subsubsection*{Slant} | |
267 \vspace*{2mm} | |
268 | |
269 \begin{minipage}[b]{0.14\linewidth} | |
270 \centering | |
590 | 271 \includegraphics[scale=.4]{Slant_only.png}\\ |
585 | 272 %{\bf Slant} |
273 \end{minipage}% | |
274 \hspace{0.3cm} | |
275 \begin{minipage}[b]{0.83\linewidth} | |
276 %\centering | |
277 To produce {\bf slant}, each row of the image is shifted | |
278 proportionally to its height: $shift = round(slant \times height)$. | |
279 $slant \sim U[-complexity,complexity]$. | |
280 The shift is randomly chosen to be either to the left or to the right. | |
281 \vspace{5mm} | |
282 \end{minipage} | |
283 %\vspace*{-4mm} | |
284 | |
285 %\newpage | |
286 | |
287 \subsubsection*{Affine Transformations} | |
288 | |
289 \begin{minipage}[b]{0.14\linewidth} | |
290 %\centering | |
291 %\begin{wrapfigure}[8]{l}{0.15\textwidth} | |
292 \begin{center} | |
590 | 293 \includegraphics[scale=.4]{Affine_only.png} |
585 | 294 \vspace*{6mm} |
295 %{\small {\bf Affine \mbox{Transformation}}} | |
296 \end{center} | |
297 %\end{wrapfigure} | |
298 \end{minipage}% | |
299 \hspace{0.3cm}\begin{minipage}[b]{0.86\linewidth} | |
300 \noindent A $2 \times 3$ {\bf affine transform} matrix (with | |
301 parameters $(a,b,c,d,e,f)$) is sampled according to the $complexity$. | |
302 Output pixel $(x,y)$ takes the value of input pixel | |
303 nearest to $(ax+by+c,dx+ey+f)$, | |
304 producing scaling, translation, rotation and shearing. | |
305 Marginal distributions of $(a,b,c,d,e,f)$ have been tuned to | |
306 forbid large rotations (to avoid confusing classes) but to give good | |
307 variability of the transformation: $a$ and $d$ $\sim U[1-3 | |
308 complexity,1+3\,complexity]$, $b$ and $e$ $\sim U[-3 \,complexity,3\, | |
309 complexity]$, and $c$ and $f \sim U[-4 \,complexity, 4 \, | |
310 complexity]$.\\ | |
311 \end{minipage} | |
312 | |
313 %\vspace*{-4.5mm} | |
314 \subsubsection*{Local Elastic Deformations} | |
315 | |
316 %\begin{minipage}[t]{\linewidth} | |
317 %\begin{wrapfigure}[7]{l}{0.15\textwidth} | |
318 %\hspace*{-8mm} | |
319 \begin{minipage}[b]{0.14\linewidth} | |
320 %\centering | |
321 \begin{center} | |
322 \vspace*{5mm} | |
590 | 323 \includegraphics[scale=.4]{Localelasticdistorsions_only.png} |
585 | 324 %{\bf Local Elastic Deformation} |
325 \end{center} | |
326 %\end{wrapfigure} | |
327 \end{minipage}% | |
328 \hspace{3mm} | |
329 \begin{minipage}[b]{0.85\linewidth} | |
330 %%\vspace*{-20mm} | |
331 The {\bf local elastic deformation} | |
332 module induces a ``wiggly'' effect in the image, following~\citet{SimardSP03-short}, | |
333 which provides more details. | |
334 The intensity of the displacement fields is given by | |
335 $\alpha = \sqrt[3]{complexity} \times 10.0$, which are | |
336 convolved with a Gaussian 2D kernel (resulting in a blur) of | |
337 standard deviation $\sigma = 10 - 7 \times\sqrt[3]{complexity}$. | |
338 \vspace{2mm} | |
339 \end{minipage} | |
340 | |
341 \vspace*{4mm} | |
342 | |
343 \subsubsection*{Pinch} | |
344 | |
345 \begin{minipage}[b]{0.14\linewidth} | |
346 %\centering | |
347 %\begin{wrapfigure}[7]{l}{0.15\textwidth} | |
348 %\vspace*{-5mm} | |
349 \begin{center} | |
590 | 350 \includegraphics[scale=.4]{Pinch_only.png}\\ |
585 | 351 \vspace*{15mm} |
352 %{\bf Pinch} | |
353 \end{center} | |
354 %\end{wrapfigure} | |
355 %%\vspace{.6cm} | |
356 \end{minipage}% | |
357 \hspace{0.3cm}\begin{minipage}[b]{0.86\linewidth} | |
358 The {\bf pinch} module applies the ``Whirl and pinch'' GIMP filter with whirl set to 0. | |
359 A pinch is ``similar to projecting the image onto an elastic | |
360 surface and pressing or pulling on the center of the surface'' (GIMP documentation manual). | |
361 For a square input image, draw a radius-$r$ disk | |
362 around its center $C$. Any pixel $P$ belonging to | |
363 that disk has its value replaced by | |
364 the value of a ``source'' pixel in the original image, | |
365 on the line that goes through $C$ and $P$, but | |
366 at some other distance $d_2$. Define $d_1=distance(P,C)$ | |
367 and $d_2 = sin(\frac{\pi{}d_1}{2r})^{-pinch} \times | |
368 d_1$, where $pinch$ is a parameter of the filter. | |
369 The actual value is given by bilinear interpolation considering the pixels | |
370 around the (non-integer) source position thus found. | |
371 Here $pinch \sim U[-complexity, 0.7 \times complexity]$. | |
372 %%\vspace{1.5cm} | |
373 \end{minipage} | |
374 | |
375 %\vspace{1mm} | |
376 | |
377 %{\large\bf 2.2 Injecting Noise} | |
378 \subsection{Injecting Noise} | |
379 %\vspace{2mm} | |
380 | |
381 \subsubsection*{Motion Blur} | |
382 | |
383 %%\vspace*{-.2cm} | |
384 \begin{minipage}[t]{0.14\linewidth} | |
385 \centering | |
386 \vspace*{0mm} | |
590 | 387 \includegraphics[scale=.4]{Motionblur_only.png} |
585 | 388 %{\bf Motion Blur} |
389 \end{minipage}% | |
390 \hspace{0.3cm}\begin{minipage}[t]{0.83\linewidth} | |
391 %%\vspace*{.5mm} | |
392 \vspace*{2mm} | |
393 The {\bf motion blur} module is GIMP's ``linear motion blur'', which | |
394 has parameters $length$ and $angle$. The value of | |
395 a pixel in the final image is approximately the mean of the first $length$ pixels | |
396 found by moving in the $angle$ direction, | |
397 $angle \sim U[0,360]$ degrees, and $length \sim {\rm Normal}(0,(3 \times complexity)^2)$. | |
398 %\vspace{5mm} | |
399 \end{minipage} | |
400 | |
401 %\vspace*{1mm} | |
402 | |
403 \subsubsection*{Occlusion} | |
404 | |
405 \begin{minipage}[t]{0.14\linewidth} | |
406 \centering | |
407 \vspace*{3mm} | |
590 | 408 \includegraphics[scale=.4]{occlusion_only.png}\\ |
585 | 409 %{\bf Occlusion} |
410 %%\vspace{.5cm} | |
411 \end{minipage}% | |
412 \hspace{0.3cm}\begin{minipage}[t]{0.83\linewidth} | |
413 %\vspace*{-18mm} | |
414 The {\bf occlusion} module selects a random rectangle from an {\em occluder} character | |
415 image and places it over the original {\em occluded} | |
416 image. Pixels are combined by taking the max(occluder, occluded), | |
417 i.e. keeping the lighter ones. | |
418 The rectangle corners | |
419 are sampled so that larger complexity gives larger rectangles. | |
420 The destination position in the occluded image are also sampled | |
421 according to a normal distribution. | |
422 This module is skipped with probability 60\%. | |
423 %%\vspace{7mm} | |
424 \end{minipage} | |
425 | |
426 %\vspace*{1mm} | |
427 \subsubsection*{Gaussian Smoothing} | |
428 | |
429 %\begin{wrapfigure}[8]{l}{0.15\textwidth} | |
430 %\vspace*{-6mm} | |
431 \begin{minipage}[t]{0.14\linewidth} | |
432 \begin{center} | |
433 %\centering | |
434 \vspace*{6mm} | |
590 | 435 \includegraphics[scale=.4]{Bruitgauss_only.png} |
585 | 436 %{\bf Gaussian Smoothing} |
437 \end{center} | |
438 %\end{wrapfigure} | |
439 %%\vspace{.5cm} | |
440 \end{minipage}% | |
441 \hspace{0.3cm}\begin{minipage}[t]{0.86\linewidth} | |
442 With the {\bf Gaussian smoothing} module, | |
443 different regions of the image are spatially smoothed. | |
444 This is achieved by first convolving | |
445 the image with an isotropic Gaussian kernel of | |
446 size and variance chosen uniformly in the ranges $[12,12 + 20 \times | |
447 complexity]$ and $[2,2 + 6 \times complexity]$. This filtered image is normalized | |
448 between $0$ and $1$. We also create an isotropic weighted averaging window, of the | |
449 kernel size, with maximum value at the center. For each image we sample | |
450 uniformly from $3$ to $3 + 10 \times complexity$ pixels that will be | |
451 averaging centers between the original image and the filtered one. We | |
452 initialize to zero a mask matrix of the image size. For each selected pixel | |
453 we add to the mask the averaging window centered on it. The final image is | |
454 computed from the following element-wise operation: $\frac{image + filtered\_image | |
455 \times mask}{mask+1}$. | |
456 This module is skipped with probability 75\%. | |
457 \end{minipage} | |
458 | |
459 %\newpage | |
460 | |
461 %\vspace*{-9mm} | |
462 \subsubsection*{Permute Pixels} | |
463 | |
464 %\hspace*{-3mm}\begin{minipage}[t]{0.18\linewidth} | |
465 %\centering | |
466 \begin{minipage}[t]{0.14\textwidth} | |
467 %\begin{wrapfigure}[7]{l}{ | |
468 %\vspace*{-5mm} | |
469 \begin{center} | |
470 \vspace*{1mm} | |
590 | 471 \includegraphics[scale=.4]{Permutpixel_only.png} |
585 | 472 %{\small\bf Permute Pixels} |
473 \end{center} | |
474 %\end{wrapfigure} | |
475 \end{minipage}% | |
476 \hspace{3mm}\begin{minipage}[t]{0.86\linewidth} | |
477 \vspace*{1mm} | |
478 %%\vspace*{-20mm} | |
479 This module {\bf permutes neighbouring pixels}. It first selects a | |
480 fraction $\frac{complexity}{3}$ of pixels randomly in the image. Each | |
481 of these pixels is then sequentially exchanged with a random pixel | |
482 among its four nearest neighbors (on its left, right, top or bottom). | |
483 This module is skipped with probability 80\%.\\ | |
484 %\vspace*{1mm} | |
485 \end{minipage} | |
486 | |
487 %\vspace{-3mm} | |
488 | |
489 \subsubsection*{Gaussian Noise} | |
490 | |
491 \begin{minipage}[t]{0.14\textwidth} | |
492 %\begin{wrapfigure}[7]{l}{ | |
493 %%\vspace*{-3mm} | |
494 \begin{center} | |
495 %\hspace*{-3mm}\begin{minipage}[t]{0.18\linewidth} | |
496 %\centering | |
497 \vspace*{0mm} | |
590 | 498 \includegraphics[scale=.4]{Distorsiongauss_only.png} |
585 | 499 %{\small \bf Gauss. Noise} |
500 \end{center} | |
501 %\end{wrapfigure} | |
502 \end{minipage}% | |
503 \hspace{0.3cm}\begin{minipage}[t]{0.86\linewidth} | |
504 \vspace*{1mm} | |
505 %\vspace*{12mm} | |
506 The {\bf Gaussian noise} module simply adds, to each pixel of the image independently, a | |
507 noise $\sim Normal(0,(\frac{complexity}{10})^2)$. | |
508 This module is skipped with probability 70\%. | |
509 %%\vspace{1.1cm} | |
510 \end{minipage} | |
511 | |
512 %\vspace*{1.2cm} | |
513 | |
514 \subsubsection*{Background Image Addition} | |
515 | |
516 \begin{minipage}[t]{\linewidth} | |
517 \begin{minipage}[t]{0.14\linewidth} | |
518 \centering | |
519 \vspace*{0mm} | |
590 | 520 \includegraphics[scale=.4]{background_other_only.png} |
585 | 521 %{\small \bf Bg Image} |
522 \end{minipage}% | |
523 \hspace{0.3cm}\begin{minipage}[t]{0.83\linewidth} | |
524 \vspace*{1mm} | |
525 Following~\citet{Larochelle-jmlr-2009}, the {\bf background image} module adds a random | |
526 background image behind the letter, from a randomly chosen natural image, | |
527 with contrast adjustments depending on $complexity$, to preserve | |
528 more or less of the original character image. | |
529 %%\vspace{.8cm} | |
530 \end{minipage} | |
531 \end{minipage} | |
532 %%\vspace{-.7cm} | |
533 | |
534 \subsubsection*{Salt and Pepper Noise} | |
535 | |
536 \begin{minipage}[t]{0.14\linewidth} | |
537 \centering | |
538 \vspace*{0mm} | |
590 | 539 \includegraphics[scale=.4]{Poivresel_only.png} |
585 | 540 %{\small \bf Salt \& Pepper} |
541 \end{minipage}% | |
542 \hspace{0.3cm}\begin{minipage}[t]{0.83\linewidth} | |
543 \vspace*{1mm} | |
544 The {\bf salt and pepper noise} module adds noise $\sim U[0,1]$ to random subsets of pixels. | |
545 The number of selected pixels is $0.2 \times complexity$. | |
546 This module is skipped with probability 75\%. | |
547 %%\vspace{.9cm} | |
548 \end{minipage} | |
549 %%\vspace{-.7cm} | |
550 | |
551 %\vspace{1mm} | |
552 \subsubsection*{Scratches} | |
553 | |
554 \begin{minipage}[t]{0.14\textwidth} | |
555 %\begin{wrapfigure}[7]{l}{ | |
556 %\begin{minipage}[t]{0.14\linewidth} | |
557 %\centering | |
558 \begin{center} | |
559 \vspace*{4mm} | |
560 %\hspace*{-1mm} | |
590 | 561 \includegraphics[scale=.4]{Rature_only.png}\\ |
585 | 562 %{\bf Scratches} |
563 \end{center} | |
564 \end{minipage}% | |
565 %\end{wrapfigure} | |
566 \hspace{0.3cm}\begin{minipage}[t]{0.86\linewidth} | |
567 %%\vspace{.4cm} | |
568 The {\bf scratches} module places line-like white patches on the image. The | |
569 lines are heavily transformed images of the digit ``1'' (one), chosen | |
570 at random among 500 such 1 images, | |
571 randomly cropped and rotated by an angle $\sim Normal(0,(100 \times | |
572 complexity)^2$ (in degrees), using bi-cubic interpolation. | |
573 Two passes of a grey-scale morphological erosion filter | |
574 are applied, reducing the width of the line | |
575 by an amount controlled by $complexity$. | |
576 This module is skipped with probability 85\%. The probabilities | |
577 of applying 1, 2, or 3 patches are (50\%,30\%,20\%). | |
578 \end{minipage} | |
579 | |
580 %\vspace*{1mm} | |
581 | |
582 \subsubsection*{Grey Level and Contrast Changes} | |
583 | |
584 \begin{minipage}[t]{0.15\linewidth} | |
585 \centering | |
586 \vspace*{0mm} | |
590 | 587 \includegraphics[scale=.4]{Contrast_only.png} |
585 | 588 %{\bf Grey Level \& Contrast} |
589 \end{minipage}% | |
590 \hspace{3mm}\begin{minipage}[t]{0.85\linewidth} | |
591 \vspace*{1mm} | |
592 The {\bf grey level and contrast} module changes the contrast by changing grey levels, and may invert the image polarity (white | |
593 to black and black to white). The contrast is $C \sim U[1-0.85 \times complexity,1]$ | |
594 so the image is normalized into $[\frac{1-C}{2},1-\frac{1-C}{2}]$. The | |
595 polarity is inverted with probability 50\%. | |
596 %%\vspace{.7cm} | |
597 \end{minipage} | |
598 %\vspace{2mm} | |
599 | |
600 | |
601 \iffalse | |
602 \begin{figure}[ht] | |
603 \centerline{\resizebox{.9\textwidth}{!}{\includegraphics{example_t.png}}}\\ | |
604 \caption{Illustration of the pipeline of stochastic | |
605 transformations applied to the image of a lower-case \emph{t} | |
606 (the upper left image). Each image in the pipeline (going from | |
607 left to right, first top line, then bottom line) shows the result | |
608 of applying one of the modules in the pipeline. The last image | |
609 (bottom right) is used as training example.} | |
610 \label{fig:pipeline} | |
611 \end{figure} | |
612 \fi | |
613 | |
614 %\vspace*{-3mm} | |
615 \section{Experimental Setup} | |
616 %\vspace*{-1mm} | |
617 | |
618 Much previous work on deep learning had been performed on | |
619 the MNIST digits task~\citep{Hinton06,ranzato-07-small,Bengio-nips-2006,Salakhutdinov+Hinton-2009}, | |
620 with 60~000 examples, and variants involving 10~000 | |
621 examples~\citep{Larochelle-jmlr-toappear-2008,VincentPLarochelleH2008}. | |
622 The focus here is on much larger training sets, from 10 times to | |
623 to 1000 times larger, and 62 classes. | |
624 | |
625 The first step in constructing the larger datasets (called NISTP and P07) is to sample from | |
626 a {\em data source}: {\bf NIST} (NIST database 19), {\bf Fonts}, {\bf Captchas}, | |
627 and {\bf OCR data} (scanned machine printed characters). Once a character | |
628 is sampled from one of these sources (chosen randomly), the second step is to | |
629 apply a pipeline of transformations and/or noise processes described in section \ref{s:perturbations}. | |
630 | |
631 To provide a baseline of error rate comparison we also estimate human performance | |
632 on both the 62-class task and the 10-class digits task. | |
633 We compare the best Multi-Layer Perceptrons (MLP) against | |
634 the best Stacked Denoising Auto-encoders (SDA), when | |
635 both models' hyper-parameters are selected to minimize the validation set error. | |
636 We also provide a comparison against a precise estimate | |
637 of human performance obtained via Amazon's Mechanical Turk (AMT) | |
638 service (http://mturk.com). | |
639 AMT users are paid small amounts | |
640 of money to perform tasks for which human intelligence is required. | |
641 Mechanical Turk has been used extensively in natural language processing and vision. | |
642 %processing \citep{SnowEtAl2008} and vision | |
643 %\citep{SorokinAndForsyth2008,whitehill09}. | |
644 AMT users were presented | |
645 with 10 character images (from a test set) and asked to choose 10 corresponding ASCII | |
646 characters. They were forced to choose a single character class (either among the | |
647 62 or 10 character classes) for each image. | |
648 80 subjects classified 2500 images per (dataset,task) pair. | |
649 Different humans labelers sometimes provided a different label for the same | |
650 example, and we were able to estimate the error variance due to this effect | |
651 because each image was classified by 3 different persons. | |
652 The average error of humans on the 62-class task NIST test set | |
653 is 18.2\%, with a standard error of 0.1\%. | |
654 | |
655 %\vspace*{-3mm} | |
656 \subsection{Data Sources} | |
657 %\vspace*{-2mm} | |
658 | |
659 %\begin{itemize} | |
660 %\item | |
661 {\bf NIST.} | |
662 Our main source of characters is the NIST Special Database 19~\citep{Grother-1995}, | |
663 widely used for training and testing character | |
664 recognition systems~\citep{Granger+al-2007,Cortes+al-2000,Oliveira+al-2002-short,Milgram+al-2005}. | |
665 The dataset is composed of 814255 digits and characters (upper and lower cases), with hand checked classifications, | |
666 extracted from handwritten sample forms of 3600 writers. The characters are labelled by one of the 62 classes | |
667 corresponding to ``0''-``9'',``A''-``Z'' and ``a''-``z''. The dataset contains 8 parts (partitions) of varying complexity. | |
668 The fourth partition (called $hsf_4$, 82587 examples), | |
669 experimentally recognized to be the most difficult one, is the one recommended | |
670 by NIST as a testing set and is used in our work as well as some previous work~\citep{Granger+al-2007,Cortes+al-2000,Oliveira+al-2002-short,Milgram+al-2005} | |
671 for that purpose. We randomly split the remainder (731668 examples) into a training set and a validation set for | |
672 model selection. | |
673 The performances reported by previous work on that dataset mostly use only the digits. | |
674 Here we use all the classes both in the training and testing phase. This is especially | |
675 useful to estimate the effect of a multi-task setting. | |
676 The distribution of the classes in the NIST training and test sets differs | |
677 substantially, with relatively many more digits in the test set, and a more uniform distribution | |
678 of letters in the test set (whereas in the training set they are distributed | |
679 more like in natural text). | |
680 %\vspace*{-1mm} | |
681 | |
682 %\item | |
683 {\bf Fonts.} | |
684 In order to have a good variety of sources we downloaded an important number of free fonts from: | |
685 {\tt http://cg.scs.carleton.ca/\textasciitilde luc/freefonts.html}. | |
686 % TODO: pointless to anonymize, it's not pointing to our work | |
687 Including the operating system's (Windows 7) fonts, there is a total of $9817$ different fonts that we can choose uniformly from. | |
688 The chosen {\tt ttf} file is either used as input of the Captcha generator (see next item) or, by producing a corresponding image, | |
689 directly as input to our models. | |
690 %\vspace*{-1mm} | |
691 | |
692 %\item | |
693 {\bf Captchas.} | |
694 The Captcha data source is an adaptation of the \emph{pycaptcha} library (a python based captcha generator library) for | |
695 generating characters of the same format as the NIST dataset. This software is based on | |
696 a random character class generator and various kinds of transformations similar to those described in the previous sections. | |
697 In order to increase the variability of the data generated, many different fonts are used for generating the characters. | |
698 Transformations (slant, distortions, rotation, translation) are applied to each randomly generated character with a complexity | |
699 depending on the value of the complexity parameter provided by the user of the data source. | |
700 %Two levels of complexity are allowed and can be controlled via an easy to use facade class. %TODO: what's a facade class? | |
701 %\vspace*{-1mm} | |
702 | |
703 %\item | |
704 {\bf OCR data.} | |
705 A large set (2 million) of scanned, OCRed and manually verified machine-printed | |
706 characters where included as an | |
707 additional source. This set is part of a larger corpus being collected by the Image Understanding | |
708 Pattern Recognition Research group led by Thomas Breuel at University of Kaiserslautern | |
709 ({\tt http://www.iupr.com}), and which will be publicly released. | |
710 %TODO: let's hope that Thomas is not a reviewer! :) Seriously though, maybe we should anonymize this | |
711 %\end{itemize} | |
712 | |
713 %\vspace*{-3mm} | |
714 \subsection{Data Sets} | |
715 %\vspace*{-2mm} | |
716 | |
717 All data sets contain 32$\times$32 grey-level images (values in $[0,1]$) associated with a label | |
718 from one of the 62 character classes. | |
719 %\begin{itemize} | |
720 %\vspace*{-1mm} | |
721 | |
722 %\item | |
723 {\bf NIST.} This is the raw NIST special database 19~\citep{Grother-1995}. It has | |
724 \{651668 / 80000 / 82587\} \{training / validation / test\} examples. | |
725 %\vspace*{-1mm} | |
726 | |
727 %\item | |
728 {\bf P07.} This dataset is obtained by taking raw characters from all four of the above sources | |
729 and sending them through the transformation pipeline described in section \ref{s:perturbations}. | |
730 For each new example to generate, a data source is selected with probability $10\%$ from the fonts, | |
731 $25\%$ from the captchas, $25\%$ from the OCR data and $40\%$ from NIST. We apply all the transformations in the | |
732 order given above, and for each of them we sample uniformly a \emph{complexity} in the range $[0,0.7]$. | |
733 It has \{81920000 / 80000 / 20000\} \{training / validation / test\} examples. | |
734 %\vspace*{-1mm} | |
735 | |
736 %\item | |
737 {\bf NISTP.} This one is equivalent to P07 (complexity parameter of $0.7$ with the same proportions of data sources) | |
738 except that we only apply | |
739 transformations from slant to pinch. Therefore, the character is | |
740 transformed but no additional noise is added to the image, giving images | |
741 closer to the NIST dataset. | |
742 It has \{81920000 / 80000 / 20000\} \{training / validation / test\} examples. | |
743 %\end{itemize} | |
744 | |
745 %\vspace*{-3mm} | |
746 \subsection{Models and their Hyperparameters} | |
747 %\vspace*{-2mm} | |
748 | |
749 The experiments are performed using MLPs (with a single | |
750 hidden layer) and SDAs. | |
751 \emph{Hyper-parameters are selected based on the {\bf NISTP} validation set error.} | |
752 | |
753 {\bf Multi-Layer Perceptrons (MLP).} | |
754 Whereas previous work had compared deep architectures to both shallow MLPs and | |
755 SVMs, we only compared to MLPs here because of the very large datasets used | |
756 (making the use of SVMs computationally challenging because of their quadratic | |
757 scaling behavior). Preliminary experiments on training SVMs (libSVM) with subsets of the training | |
758 set allowing the program to fit in memory yielded substantially worse results | |
759 than those obtained with MLPs. For training on nearly a billion examples | |
760 (with the perturbed data), the MLPs and SDA are much more convenient than | |
761 classifiers based on kernel methods. | |
762 The MLP has a single hidden layer with $\tanh$ activation functions, and softmax (normalized | |
763 exponentials) on the output layer for estimating $P(class | image)$. | |
764 The number of hidden units is taken in $\{300,500,800,1000,1500\}$. | |
765 Training examples are presented in minibatches of size 20. A constant learning | |
766 rate was chosen among $\{0.001, 0.01, 0.025, 0.075, 0.1, 0.5\}$. | |
767 %through preliminary experiments (measuring performance on a validation set), | |
768 %and $0.1$ (which was found to work best) was then selected for optimizing on | |
769 %the whole training sets. | |
770 %\vspace*{-1mm} | |
771 | |
772 | |
773 {\bf Stacked Denoising Auto-Encoders (SDA).} | |
774 Various auto-encoder variants and Restricted Boltzmann Machines (RBMs) | |
775 can be used to initialize the weights of each layer of a deep MLP (with many hidden | |
776 layers)~\citep{Hinton06,ranzato-07-small,Bengio-nips-2006}, | |
777 apparently setting parameters in the | |
778 basin of attraction of supervised gradient descent yielding better | |
779 generalization~\citep{Erhan+al-2010}. This initial {\em unsupervised | |
780 pre-training phase} uses all of the training images but not the training labels. | |
781 Each layer is trained in turn to produce a new representation of its input | |
782 (starting from the raw pixels). | |
783 It is hypothesized that the | |
784 advantage brought by this procedure stems from a better prior, | |
785 on the one hand taking advantage of the link between the input | |
786 distribution $P(x)$ and the conditional distribution of interest | |
787 $P(y|x)$ (like in semi-supervised learning), and on the other hand | |
788 taking advantage of the expressive power and bias implicit in the | |
789 deep architecture (whereby complex concepts are expressed as | |
790 compositions of simpler ones through a deep hierarchy). | |
791 | |
792 \begin{figure}[ht] | |
793 %\vspace*{-2mm} | |
590 | 794 \centerline{\resizebox{0.8\textwidth}{!}{\includegraphics{denoising_autoencoder_small.pdf}}} |
585 | 795 %\vspace*{-2mm} |
796 \caption{Illustration of the computations and training criterion for the denoising | |
797 auto-encoder used to pre-train each layer of the deep architecture. Input $x$ of | |
798 the layer (i.e. raw input or output of previous layer) | |
799 s corrupted into $\tilde{x}$ and encoded into code $y$ by the encoder $f_\theta(\cdot)$. | |
800 The decoder $g_{\theta'}(\cdot)$ maps $y$ to reconstruction $z$, which | |
801 is compared to the uncorrupted input $x$ through the loss function | |
802 $L_H(x,z)$, whose expected value is approximately minimized during training | |
803 by tuning $\theta$ and $\theta'$.} | |
804 \label{fig:da} | |
805 %\vspace*{-2mm} | |
806 \end{figure} | |
807 | |
808 Here we chose to use the Denoising | |
809 Auto-encoder~\citep{VincentPLarochelleH2008} as the building block for | |
810 these deep hierarchies of features, as it is simple to train and | |
811 explain (see Figure~\ref{fig:da}, as well as | |
812 tutorial and code there: {\tt http://deeplearning.net/tutorial}), | |
813 provides efficient inference, and yielded results | |
814 comparable or better than RBMs in series of experiments | |
815 \citep{VincentPLarochelleH2008}. During training, a Denoising | |
816 Auto-encoder is presented with a stochastically corrupted version | |
817 of the input and trained to reconstruct the uncorrupted input, | |
818 forcing the hidden units to represent the leading regularities in | |
819 the data. Here we use the random binary masking corruption | |
820 (which sets to 0 a random subset of the inputs). | |
821 Once it is trained, in a purely unsupervised way, | |
822 its hidden units' activations can | |
823 be used as inputs for training a second one, etc. | |
824 After this unsupervised pre-training stage, the parameters | |
825 are used to initialize a deep MLP, which is fine-tuned by | |
826 the same standard procedure used to train them (see previous section). | |
827 The SDA hyper-parameters are the same as for the MLP, with the addition of the | |
828 amount of corruption noise (we used the masking noise process, whereby a | |
829 fixed proportion of the input values, randomly selected, are zeroed), and a | |
830 separate learning rate for the unsupervised pre-training stage (selected | |
831 from the same above set). The fraction of inputs corrupted was selected | |
832 among $\{10\%, 20\%, 50\%\}$. Another hyper-parameter is the number | |
833 of hidden layers but it was fixed to 3 based on previous work with | |
834 SDAs on MNIST~\citep{VincentPLarochelleH2008}. The size of the hidden | |
835 layers was kept constant across hidden layers, and the best results | |
836 were obtained with the largest values that we could experiment | |
837 with given our patience, with 1000 hidden units. | |
838 | |
839 %\vspace*{-1mm} | |
840 | |
841 \begin{figure}[ht] | |
842 %\vspace*{-2mm} | |
590 | 843 \centerline{\resizebox{.99\textwidth}{!}{\includegraphics{error_rates_charts.pdf}}} |
585 | 844 %\vspace*{-3mm} |
845 \caption{SDAx are the {\bf deep} models. Error bars indicate a 95\% confidence interval. 0 indicates that the model was trained | |
846 on NIST, 1 on NISTP, and 2 on P07. Left: overall results | |
847 of all models, on NIST and NISTP test sets. | |
848 Right: error rates on NIST test digits only, along with the previous results from | |
849 literature~\citep{Granger+al-2007,Cortes+al-2000,Oliveira+al-2002-short,Milgram+al-2005} | |
850 respectively based on ART, nearest neighbors, MLPs, and SVMs.} | |
851 \label{fig:error-rates-charts} | |
852 %\vspace*{-2mm} | |
853 \end{figure} | |
854 | |
855 | |
856 \begin{figure}[ht] | |
857 %\vspace*{-3mm} | |
590 | 858 \centerline{\resizebox{.99\textwidth}{!}{\includegraphics{improvements_charts.pdf}}} |
585 | 859 %\vspace*{-3mm} |
860 \caption{Relative improvement in error rate due to self-taught learning. | |
861 Left: Improvement (or loss, when negative) | |
862 induced by out-of-distribution examples (perturbed data). | |
863 Right: Improvement (or loss, when negative) induced by multi-task | |
864 learning (training on all classes and testing only on either digits, | |
865 upper case, or lower-case). The deep learner (SDA) benefits more from | |
866 both self-taught learning scenarios, compared to the shallow MLP.} | |
867 \label{fig:improvements-charts} | |
868 %\vspace*{-2mm} | |
869 \end{figure} | |
870 | |
871 \section{Experimental Results} | |
872 %\vspace*{-2mm} | |
873 | |
874 %%\vspace*{-1mm} | |
875 %\subsection{SDA vs MLP vs Humans} | |
876 %%\vspace*{-1mm} | |
877 The models are either trained on NIST (MLP0 and SDA0), | |
878 NISTP (MLP1 and SDA1), or P07 (MLP2 and SDA2), and tested | |
879 on either NIST, NISTP or P07, either on the 62-class task | |
880 or on the 10-digits task. Training (including about half | |
881 for unsupervised pre-training, for DAs) on the larger | |
882 datasets takes around one day on a GPU-285. | |
883 Figure~\ref{fig:error-rates-charts} summarizes the results obtained, | |
884 comparing humans, the three MLPs (MLP0, MLP1, MLP2) and the three SDAs (SDA0, SDA1, | |
885 SDA2), along with the previous results on the digits NIST special database | |
886 19 test set from the literature, respectively based on ARTMAP neural | |
887 networks ~\citep{Granger+al-2007}, fast nearest-neighbor search | |
888 ~\citep{Cortes+al-2000}, MLPs ~\citep{Oliveira+al-2002-short}, and SVMs | |
889 ~\citep{Milgram+al-2005}. More detailed and complete numerical results | |
890 (figures and tables, including standard errors on the error rates) can be | |
891 found in Appendix. | |
892 The deep learner not only outperformed the shallow ones and | |
893 previously published performance (in a statistically and qualitatively | |
894 significant way) but when trained with perturbed data | |
895 reaches human performance on both the 62-class task | |
896 and the 10-class (digits) task. | |
897 17\% error (SDA1) or 18\% error (humans) may seem large but a large | |
898 majority of the errors from humans and from SDA1 are from out-of-context | |
899 confusions (e.g. a vertical bar can be a ``1'', an ``l'' or an ``L'', and a | |
900 ``c'' and a ``C'' are often indistinguishible). | |
901 | |
902 In addition, as shown in the left of | |
903 Figure~\ref{fig:improvements-charts}, the relative improvement in error | |
904 rate brought by self-taught learning is greater for the SDA, and these | |
905 differences with the MLP are statistically and qualitatively | |
906 significant. | |
907 The left side of the figure shows the improvement to the clean | |
908 NIST test set error brought by the use of out-of-distribution examples | |
909 (i.e. the perturbed examples examples from NISTP or P07). | |
910 Relative percent change is measured by taking | |
911 $100 \% \times$ (original model's error / perturbed-data model's error - 1). | |
912 The right side of | |
913 Figure~\ref{fig:improvements-charts} shows the relative improvement | |
914 brought by the use of a multi-task setting, in which the same model is | |
915 trained for more classes than the target classes of interest (i.e. training | |
916 with all 62 classes when the target classes are respectively the digits, | |
917 lower-case, or upper-case characters). Again, whereas the gain from the | |
918 multi-task setting is marginal or negative for the MLP, it is substantial | |
919 for the SDA. Note that to simplify these multi-task experiments, only the original | |
920 NIST dataset is used. For example, the MLP-digits bar shows the relative | |
921 percent improvement in MLP error rate on the NIST digits test set | |
922 is $100\% \times$ (single-task | |
923 model's error / multi-task model's error - 1). The single-task model is | |
924 trained with only 10 outputs (one per digit), seeing only digit examples, | |
925 whereas the multi-task model is trained with 62 outputs, with all 62 | |
926 character classes as examples. Hence the hidden units are shared across | |
927 all tasks. For the multi-task model, the digit error rate is measured by | |
928 comparing the correct digit class with the output class associated with the | |
929 maximum conditional probability among only the digit classes outputs. The | |
930 setting is similar for the other two target classes (lower case characters | |
931 and upper case characters). | |
932 %%\vspace*{-1mm} | |
933 %\subsection{Perturbed Training Data More Helpful for SDA} | |
934 %%\vspace*{-1mm} | |
935 | |
936 %%\vspace*{-1mm} | |
937 %\subsection{Multi-Task Learning Effects} | |
938 %%\vspace*{-1mm} | |
939 | |
940 \iffalse | |
941 As previously seen, the SDA is better able to benefit from the | |
942 transformations applied to the data than the MLP. In this experiment we | |
943 define three tasks: recognizing digits (knowing that the input is a digit), | |
944 recognizing upper case characters (knowing that the input is one), and | |
945 recognizing lower case characters (knowing that the input is one). We | |
946 consider the digit classification task as the target task and we want to | |
947 evaluate whether training with the other tasks can help or hurt, and | |
948 whether the effect is different for MLPs versus SDAs. The goal is to find | |
949 out if deep learning can benefit more (or less) from multiple related tasks | |
950 (i.e. the multi-task setting) compared to a corresponding purely supervised | |
951 shallow learner. | |
952 | |
953 We use a single hidden layer MLP with 1000 hidden units, and a SDA | |
954 with 3 hidden layers (1000 hidden units per layer), pre-trained and | |
955 fine-tuned on NIST. | |
956 | |
957 Our results show that the MLP benefits marginally from the multi-task setting | |
958 in the case of digits (5\% relative improvement) but is actually hurt in the case | |
959 of characters (respectively 3\% and 4\% worse for lower and upper class characters). | |
960 On the other hand the SDA benefited from the multi-task setting, with relative | |
961 error rate improvements of 27\%, 15\% and 13\% respectively for digits, | |
962 lower and upper case characters, as shown in Table~\ref{tab:multi-task}. | |
963 \fi | |
964 | |
965 | |
966 %\vspace*{-2mm} | |
967 \section{Conclusions and Discussion} | |
968 %\vspace*{-2mm} | |
969 | |
970 We have found that the self-taught learning framework is more beneficial | |
971 to a deep learner than to a traditional shallow and purely | |
972 supervised learner. More precisely, | |
973 the answers are positive for all the questions asked in the introduction. | |
974 %\begin{itemize} | |
975 | |
976 $\bullet$ %\item | |
977 {\bf Do the good results previously obtained with deep architectures on the | |
978 MNIST digits generalize to a much larger and richer (but similar) | |
979 dataset, the NIST special database 19, with 62 classes and around 800k examples}? | |
980 Yes, the SDA {\em systematically outperformed the MLP and all the previously | |
981 published results on this dataset} (the ones that we are aware of), {\em in fact reaching human-level | |
982 performance} at around 17\% error on the 62-class task and 1.4\% on the digits, | |
983 and beating previously published results on the same data. | |
984 | |
985 $\bullet$ %\item | |
986 {\bf To what extent do self-taught learning scenarios help deep learners, | |
987 and do they help them more than shallow supervised ones}? | |
988 We found that distorted training examples not only made the resulting | |
989 classifier better on similarly perturbed images but also on | |
990 the {\em original clean examples}, and more importantly and more novel, | |
991 that deep architectures benefit more from such {\em out-of-distribution} | |
992 examples. MLPs were helped by perturbed training examples when tested on perturbed input | |
993 images (65\% relative improvement on NISTP) | |
994 but only marginally helped (5\% relative improvement on all classes) | |
995 or even hurt (10\% relative loss on digits) | |
996 with respect to clean examples . On the other hand, the deep SDAs | |
997 were significantly boosted by these out-of-distribution examples. | |
998 Similarly, whereas the improvement due to the multi-task setting was marginal or | |
999 negative for the MLP (from +5.6\% to -3.6\% relative change), | |
1000 it was quite significant for the SDA (from +13\% to +27\% relative change), | |
1001 which may be explained by the arguments below. | |
1002 %\end{itemize} | |
1003 | |
1004 In the original self-taught learning framework~\citep{RainaR2007}, the | |
1005 out-of-sample examples were used as a source of unsupervised data, and | |
1006 experiments showed its positive effects in a \emph{limited labeled data} | |
1007 scenario. However, many of the results by \citet{RainaR2007} (who used a | |
1008 shallow, sparse coding approach) suggest that the {\em relative gain of self-taught | |
1009 learning vs ordinary supervised learning} diminishes as the number of labeled examples increases. | |
1010 We note instead that, for deep | |
1011 architectures, our experiments show that such a positive effect is accomplished | |
1012 even in a scenario with a \emph{large number of labeled examples}, | |
1013 i.e., here, the relative gain of self-taught learning is probably preserved | |
1014 in the asymptotic regime. | |
1015 | |
1016 {\bf Why would deep learners benefit more from the self-taught learning framework}? | |
1017 The key idea is that the lower layers of the predictor compute a hierarchy | |
1018 of features that can be shared across tasks or across variants of the | |
1019 input distribution. A theoretical analysis of generalization improvements | |
1020 due to sharing of intermediate features across tasks already points | |
1021 towards that explanation~\cite{baxter95a}. | |
1022 Intermediate features that can be used in different | |
1023 contexts can be estimated in a way that allows to share statistical | |
1024 strength. Features extracted through many levels are more likely to | |
1025 be more abstract (as the experiments in~\citet{Goodfellow2009} suggest), | |
1026 increasing the likelihood that they would be useful for a larger array | |
1027 of tasks and input conditions. | |
1028 Therefore, we hypothesize that both depth and unsupervised | |
1029 pre-training play a part in explaining the advantages observed here, and future | |
1030 experiments could attempt at teasing apart these factors. | |
1031 And why would deep learners benefit from the self-taught learning | |
1032 scenarios even when the number of labeled examples is very large? | |
1033 We hypothesize that this is related to the hypotheses studied | |
1034 in~\citet{Erhan+al-2010}. Whereas in~\citet{Erhan+al-2010} | |
1035 it was found that online learning on a huge dataset did not make the | |
1036 advantage of the deep learning bias vanish, a similar phenomenon | |
1037 may be happening here. We hypothesize that unsupervised pre-training | |
1038 of a deep hierarchy with self-taught learning initializes the | |
1039 model in the basin of attraction of supervised gradient descent | |
1040 that corresponds to better generalization. Furthermore, such good | |
1041 basins of attraction are not discovered by pure supervised learning | |
1042 (with or without self-taught settings), and more labeled examples | |
1043 does not allow the model to go from the poorer basins of attraction discovered | |
1044 by the purely supervised shallow models to the kind of better basins associated | |
1045 with deep learning and self-taught learning. | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
1046 |
585 | 1047 A Flash demo of the recognizer (where both the MLP and the SDA can be compared) |
1048 can be executed on-line at {\tt http://deep.host22.com}. | |
1049 | |
1050 | |
1051 \section*{Appendix I: Detailed Numerical Results} | |
1052 | |
1053 These tables correspond to Figures 2 and 3 and contain the raw error rates for each model and dataset considered. | |
1054 They also contain additional data such as test errors on P07 and standard errors. | |
1055 | |
1056 \begin{table}[ht] | |
1057 \caption{Overall comparison of error rates ($\pm$ std.err.) on 62 character classes (10 digits + | |
1058 26 lower + 26 upper), except for last columns -- digits only, between deep architecture with pre-training | |
1059 (SDA=Stacked Denoising Autoencoder) and ordinary shallow architecture | |
1060 (MLP=Multi-Layer Perceptron). The models shown are all trained using perturbed data (NISTP or P07) | |
1061 and using a validation set to select hyper-parameters and other training choices. | |
1062 \{SDA,MLP\}0 are trained on NIST, | |
1063 \{SDA,MLP\}1 are trained on NISTP, and \{SDA,MLP\}2 are trained on P07. | |
1064 The human error rate on digits is a lower bound because it does not count digits that were | |
1065 recognized as letters. For comparison, the results found in the literature | |
1066 on NIST digits classification using the same test set are included.} | |
1067 \label{tab:sda-vs-mlp-vs-humans} | |
1068 \begin{center} | |
1069 \begin{tabular}{|l|r|r|r|r|} \hline | |
1070 & NIST test & NISTP test & P07 test & NIST test digits \\ \hline | |
1071 Humans& 18.2\% $\pm$.1\% & 39.4\%$\pm$.1\% & 46.9\%$\pm$.1\% & $1.4\%$ \\ \hline | |
1072 SDA0 & 23.7\% $\pm$.14\% & 65.2\%$\pm$.34\% & 97.45\%$\pm$.06\% & 2.7\% $\pm$.14\%\\ \hline | |
1073 SDA1 & 17.1\% $\pm$.13\% & 29.7\%$\pm$.3\% & 29.7\%$\pm$.3\% & 1.4\% $\pm$.1\%\\ \hline | |
1074 SDA2 & 18.7\% $\pm$.13\% & 33.6\%$\pm$.3\% & 39.9\%$\pm$.17\% & 1.7\% $\pm$.1\%\\ \hline | |
1075 MLP0 & 24.2\% $\pm$.15\% & 68.8\%$\pm$.33\% & 78.70\%$\pm$.14\% & 3.45\% $\pm$.15\% \\ \hline | |
1076 MLP1 & 23.0\% $\pm$.15\% & 41.8\%$\pm$.35\% & 90.4\%$\pm$.1\% & 3.85\% $\pm$.16\% \\ \hline | |
1077 MLP2 & 24.3\% $\pm$.15\% & 46.0\%$\pm$.35\% & 54.7\%$\pm$.17\% & 4.85\% $\pm$.18\% \\ \hline | |
1078 \citep{Granger+al-2007} & & & & 4.95\% $\pm$.18\% \\ \hline | |
1079 \citep{Cortes+al-2000} & & & & 3.71\% $\pm$.16\% \\ \hline | |
1080 \citep{Oliveira+al-2002} & & & & 2.4\% $\pm$.13\% \\ \hline | |
1081 \citep{Milgram+al-2005} & & & & 2.1\% $\pm$.12\% \\ \hline | |
1082 \end{tabular} | |
1083 \end{center} | |
1084 \end{table} | |
1085 | |
1086 \begin{table}[ht] | |
1087 \caption{Relative change in error rates due to the use of perturbed training data, | |
1088 either using NISTP, for the MLP1/SDA1 models, or using P07, for the MLP2/SDA2 models. | |
1089 A positive value indicates that training on the perturbed data helped for the | |
1090 given test set (the first 3 columns on the 62-class tasks and the last one is | |
1091 on the clean 10-class digits). Clearly, the deep learning models did benefit more | |
1092 from perturbed training data, even when testing on clean data, whereas the MLP | |
1093 trained on perturbed data performed worse on the clean digits and about the same | |
1094 on the clean characters. } | |
1095 \label{tab:perturbation-effect} | |
1096 \begin{center} | |
1097 \begin{tabular}{|l|r|r|r|r|} \hline | |
1098 & NIST test & NISTP test & P07 test & NIST test digits \\ \hline | |
1099 SDA0/SDA1-1 & 38\% & 84\% & 228\% & 93\% \\ \hline | |
1100 SDA0/SDA2-1 & 27\% & 94\% & 144\% & 59\% \\ \hline | |
1101 MLP0/MLP1-1 & 5.2\% & 65\% & -13\% & -10\% \\ \hline | |
1102 MLP0/MLP2-1 & -0.4\% & 49\% & 44\% & -29\% \\ \hline | |
1103 \end{tabular} | |
1104 \end{center} | |
1105 \end{table} | |
1106 | |
1107 \begin{table}[ht] | |
1108 \caption{Test error rates and relative change in error rates due to the use of | |
1109 a multi-task setting, i.e., training on each task in isolation vs training | |
1110 for all three tasks together, for MLPs vs SDAs. The SDA benefits much | |
1111 more from the multi-task setting. All experiments on only on the | |
1112 unperturbed NIST data, using validation error for model selection. | |
1113 Relative improvement is 1 - single-task error / multi-task error.} | |
1114 \label{tab:multi-task} | |
1115 \begin{center} | |
1116 \begin{tabular}{|l|r|r|r|} \hline | |
1117 & single-task & multi-task & relative \\ | |
1118 & setting & setting & improvement \\ \hline | |
1119 MLP-digits & 3.77\% & 3.99\% & 5.6\% \\ \hline | |
1120 MLP-lower & 17.4\% & 16.8\% & -4.1\% \\ \hline | |
1121 MLP-upper & 7.84\% & 7.54\% & -3.6\% \\ \hline | |
1122 SDA-digits & 2.6\% & 3.56\% & 27\% \\ \hline | |
1123 SDA-lower & 12.3\% & 14.4\% & 15\% \\ \hline | |
1124 SDA-upper & 5.93\% & 6.78\% & 13\% \\ \hline | |
1125 \end{tabular} | |
1126 \end{center} | |
1127 \end{table} | |
1128 | |
1129 %\afterpage{\clearpage} | |
1130 \clearpage | |
1131 { | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
1132 \bibliographystyle{spbasic} % basic style, author-year citations |
585 | 1133 \bibliography{strings,strings-short,strings-shorter,ift6266_ml,specials,aigaion-shorter} |
1134 %\bibliographystyle{plainnat} | |
587
b1be957dd1be
Added mlj_submission to group every file needed for that.
fsavard
parents:
585
diff
changeset
|
1135 %\bibliographystyle{unsrtnat} |
585 | 1136 %\bibliographystyle{apalike} |
1137 } | |
1138 | |
1139 | |
1140 \end{document} |