Mercurial > ift6266
comparison writeup/aistats2011_submission.tex @ 633:13baba8a4522
merge
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Sat, 19 Mar 2011 22:51:40 -0400 |
parents | 51213beaed8b |
children |
comparison
equal
deleted
inserted
replaced
632:5541056d3fb0 | 633:13baba8a4522 |
---|---|
1 %\documentclass[twoside,11pt]{article} % For LaTeX2e | |
2 \documentclass{article} % For LaTeX2e | |
3 \usepackage{aistats2e_2011} | |
4 %\usepackage{times} | |
5 \usepackage{wrapfig} | |
6 \usepackage{amsthm} | |
7 \usepackage{amsmath} | |
8 \usepackage{bbm} | |
9 \usepackage[utf8]{inputenc} | |
10 \usepackage[psamsfonts]{amssymb} | |
11 %\usepackage{algorithm,algorithmic} % not used after all | |
12 \usepackage{graphicx,subfigure} | |
13 \usepackage[numbers]{natbib} | |
14 | |
15 \addtolength{\textwidth}{10mm} | |
16 \addtolength{\evensidemargin}{-5mm} | |
17 \addtolength{\oddsidemargin}{-5mm} | |
18 | |
19 %\setlength\parindent{0mm} | |
20 | |
21 \begin{document} | |
22 | |
23 \twocolumn[ | |
24 \aistatstitle{Deep Learners Benefit More from Out-of-Distribution Examples} | |
25 \runningtitle{Deep Learners for Out-of-Distribution Examples} | |
26 \runningauthor{Bengio et. al.} | |
27 \aistatsauthor{Anonymous Authors}] | |
28 \iffalse | |
29 Yoshua Bengio \and | |
30 Frédéric Bastien \and | |
31 Arnaud Bergeron \and | |
32 Nicolas Boulanger-Lewandowski \and | |
33 Thomas Breuel \and | |
34 Youssouf Chherawala \and | |
35 Moustapha Cisse \and | |
36 Myriam Côté \and | |
37 Dumitru Erhan \and | |
38 Jeremy Eustache \and | |
39 Xavier Glorot \and | |
40 Xavier Muller \and | |
41 Sylvain Pannetier Lebeuf \and | |
42 Razvan Pascanu \and | |
43 Salah Rifai \and | |
44 Francois Savard \and | |
45 Guillaume Sicard | |
46 %} | |
47 \fi | |
48 %\aistatsaddress{Dept. IRO, U. Montreal, P.O. Box 6128, Centre-Ville branch, H3C 3J7, Montreal (Qc), Canada} | |
49 %\date{{\tt bengioy@iro.umontreal.ca}, Dept. IRO, U. Montreal, P.O. Box 6128, Centre-Ville branch, H3C 3J7, Montreal (Qc), Canada} | |
50 %\jmlrheading{}{2010}{}{10/2010}{XX/2011}{Yoshua Bengio et al} | |
51 %\editor{} | |
52 | |
53 %\makeanontitle | |
54 %\maketitle | |
55 | |
56 %{\bf Running title: Deep Self-Taught Learning} | |
57 | |
58 %\vspace*{-2mm} | |
59 \begin{abstract} | |
60 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. The hypothesis evaluated here is that intermediate levels of representation, because they can be shared across tasks and examples from different but related distributions, can yield even more benefits. Comparative experiments were performed on a large-scale handwritten character recognition setting with 62 classes (upper case, lower case, digits), using both a multi-task setting and perturbed examples in order to obtain out-of-distribution examples. The results agree with the hypothesis, and show that a deep learner did {\em beat previously published results and reached human-level performance}. | |
61 \end{abstract} | |
62 %\vspace*{-3mm} | |
63 | |
64 %\begin{keywords} | |
65 %Deep learning, self-taught learning, out-of-distribution examples, handwritten character recognition, multi-task learning | |
66 %\end{keywords} | |
67 %\keywords{self-taught learning \and multi-task learning \and out-of-distribution examples \and deep learning \and handwriting recognition} | |
68 | |
69 | |
70 | |
71 \section{Introduction} | |
72 %\vspace*{-1mm} | |
73 | |
74 {\bf Deep Learning} has emerged as a promising new area of research in | |
75 statistical machine learning~\citep{Hinton06,ranzato-07-small,Bengio-nips-2006,VincentPLarochelleH2008-very-small,ranzato-08,TaylorHintonICML2009,Larochelle-jmlr-2009,Salakhutdinov+Hinton-2009,HonglakL2009,HonglakLNIPS2009,Jarrett-ICCV2009,Taylor-cvpr-2010}. See \citet{Bengio-2009} for a review. | |
76 Learning algorithms for deep architectures are centered on the learning | |
77 of useful representations of data, which are better suited to the task at hand, | |
78 and are organized in a hierarchy with multiple levels. | |
79 This is in part inspired by observations of the mammalian visual cortex, | |
80 which consists of a chain of processing elements, each of which is associated with a | |
81 different representation of the raw visual input. In fact, | |
82 it was found recently that the features learnt in deep architectures resemble | |
83 those observed in the first two of these stages (in areas V1 and V2 | |
84 of visual cortex) \citep{HonglakL2008}, and that they become more and | |
85 more invariant to factors of variation (such as camera movement) in | |
86 higher layers~\citep{Goodfellow2009}. | |
87 It has been hypothesized that learning a hierarchy of features increases the | |
88 ease and practicality of developing representations that are at once | |
89 tailored to specific tasks, yet are able to borrow statistical strength | |
90 from other related tasks (e.g., modeling different kinds of objects). Finally, learning the | |
91 feature representation can lead to higher-level (more abstract, more | |
92 general) features that are more robust to unanticipated sources of | |
93 variance extant in real data. | |
94 | |
95 Whereas a deep architecture can in principle be more powerful than a | |
96 shallow one in terms of representation, depth appears to render the | |
97 training problem more difficult in terms of optimization and local minima. | |
98 It is also only recently that successful algorithms were proposed to | |
99 overcome some of these difficulties. All are based on unsupervised | |
100 learning, often in an greedy layer-wise ``unsupervised pre-training'' | |
101 stage~\citep{Bengio-2009}. | |
102 The principle is that each layer starting from | |
103 the bottom is trained to represent its input (the output of the previous | |
104 layer). After this | |
105 unsupervised initialization, the stack of layers can be | |
106 converted into a deep supervised feedforward neural network and fine-tuned by | |
107 stochastic gradient descent. | |
108 One of these layer initialization techniques, | |
109 applied here, is the Denoising | |
110 Auto-encoder~(DA)~\citep{VincentPLarochelleH2008-very-small} (see | |
111 Figure~\ref{fig:da}), which performed similarly or | |
112 better~\citep{VincentPLarochelleH2008-very-small} than previously | |
113 proposed Restricted Boltzmann Machines (RBM)~\citep{Hinton06} | |
114 in terms of unsupervised extraction | |
115 of a hierarchy of features useful for classification. Each layer is trained | |
116 to denoise its input, creating a layer of features that can be used as | |
117 input for the next layer, forming a Stacked Denoising Auto-encoder (SDA). | |
118 Note that training a Denoising Auto-encoder | |
119 can actually been seen as training a particular RBM by an inductive | |
120 principle different from maximum likelihood~\citep{Vincent-SM-2010}, | |
121 namely by Score Matching~\citep{Hyvarinen-2005,HyvarinenA2008}. | |
122 | |
123 Previous comparative experimental results with stacking of RBMs and DAs | |
124 to build deep supervised predictors had shown that they could outperform | |
125 shallow architectures in a variety of settings, especially | |
126 when the data involves complex interactions between many factors of | |
127 variation~\citep{LarochelleH2007,Bengio-2009}. Other experiments have suggested | |
128 that the unsupervised layer-wise pre-training acted as a useful | |
129 prior~\citep{Erhan+al-2010} that allows one to initialize a deep | |
130 neural network in a relatively much smaller region of parameter space, | |
131 corresponding to better generalization. | |
132 | |
133 To further the understanding of the reasons for the good performance | |
134 observed with deep learners, we focus here on the following {\em hypothesis}: | |
135 intermediate levels of representation, especially when there are | |
136 more such levels, can be exploited to {\bf share | |
137 statistical strength across different but related types of examples}, | |
138 such as examples coming from other tasks than the task of interest | |
139 (the multi-task setting), or examples coming from an overlapping | |
140 but different distribution (images with different kinds of perturbations | |
141 and noises, here). This is consistent with the hypotheses discussed | |
142 in~\citet{Bengio-2009} regarding the potential advantage | |
143 of deep learning and the idea that more levels of representation can | |
144 give rise to more abstract, more general features of the raw input. | |
145 | |
146 This hypothesis is related to a learning setting called | |
147 {\bf self-taught learning}~\citep{RainaR2007}, which combines principles | |
148 of semi-supervised and multi-task learning: the learner can exploit examples | |
149 that are unlabeled and possibly come from a distribution different from the target | |
150 distribution, e.g., from other classes than those of interest. | |
151 It has already been shown that deep learners can clearly take advantage of | |
152 unsupervised learning and unlabeled examples~\citep{Bengio-2009,WestonJ2008-small}, | |
153 but more needed to be done to explore the impact | |
154 of {\em out-of-distribution} examples and of the {\em multi-task} setting | |
155 (one exception is~\citep{CollobertR2008}, which shares and uses unsupervised | |
156 pre-training only with the first layer). In particular the {\em relative | |
157 advantage of deep learning} for these settings has not been evaluated. | |
158 | |
159 | |
160 % | |
161 The {\bf main claim} of this paper is that deep learners (with several levels of representation) can | |
162 {\bf benefit more from out-of-distribution examples than shallow learners} (with a single | |
163 level), both in the context of the multi-task setting and from | |
164 perturbed examples. Because we are able to improve on state-of-the-art | |
165 performance and reach human-level performance | |
166 on a large-scale task, we consider that this paper is also a contribution | |
167 to advance the application of machine learning to handwritten character recognition. | |
168 More precisely, we ask and answer the following questions: | |
169 | |
170 %\begin{enumerate} | |
171 $\bullet$ %\item | |
172 Do the good results previously obtained with deep architectures on the | |
173 MNIST digit images generalize to the setting of a similar but much larger and richer | |
174 dataset, the NIST special database 19, with 62 classes and around 800k examples? | |
175 | |
176 $\bullet$ %\item | |
177 To what extent does the perturbation of input images (e.g. adding | |
178 noise, affine transformations, background images) make the resulting | |
179 classifiers better not only on similarly perturbed images but also on | |
180 the {\em original clean examples}? We study this question in the | |
181 context of the 62-class and 10-class tasks of the NIST special database 19. | |
182 | |
183 $\bullet$ %\item | |
184 Do deep architectures {\em benefit {\bf more} from such out-of-distribution} | |
185 examples, in particular do they benefit more from | |
186 examples that are perturbed versions of the examples from the task of interest? | |
187 | |
188 $\bullet$ %\item | |
189 Similarly, does the feature learning step in deep learning algorithms benefit {\bf more} | |
190 from training with moderately {\em different classes} (i.e. a multi-task learning scenario) than | |
191 a corresponding shallow and purely supervised architecture? | |
192 We train on 62 classes and test on 10 (digits) or 26 (upper case or lower case) | |
193 to answer this question. | |
194 %\end{enumerate} | |
195 | |
196 Our experimental results provide positive evidence towards all of these questions, | |
197 as well as {\bf classifiers that reach human-level performance on 62-class isolated character | |
198 recognition and beat previously published results on the NIST dataset (special database 19)}. | |
199 To achieve these results, we introduce in the next section a sophisticated system | |
200 for stochastically transforming character images and then explain the methodology, | |
201 which is based on training with or without these transformed images and testing on | |
202 clean ones. | |
203 Code for generating these transformations as well as for the deep learning | |
204 algorithms are made available at {\tt http://anonymous.url.net}.%{\tt http://hg.assembla.com/ift6266}. | |
205 | |
206 %\vspace*{-3mm} | |
207 %\newpage | |
208 \section{Perturbed and Transformed Character Images} | |
209 \label{s:perturbations} | |
210 %\vspace*{-2mm} | |
211 | |
212 Figure~\ref{fig:transform} shows the different transformations we used to stochastically | |
213 transform $32 \times 32$ source images (such as the one in Fig.\ref{fig:torig}) | |
214 in order to obtain data from a larger distribution which | |
215 covers a domain substantially larger than the clean characters distribution from | |
216 which we start. | |
217 Although character transformations have been used before to | |
218 improve character recognizers, this effort is on a large scale both | |
219 in number of classes and in the complexity of the transformations, hence | |
220 in the complexity of the learning task. | |
221 The code for these transformations (mostly Python) is available at | |
222 {\tt http://anonymous.url.net}. All the modules in the pipeline (Figure~\ref{fig:transform}) share | |
223 a global control parameter ($0 \le complexity \le 1$) that allows one to modulate the | |
224 amount of deformation or noise introduced. | |
225 There are two main parts in the pipeline. The first one, | |
226 from thickness to pinch, performs transformations. The second | |
227 part, from blur to contrast, adds different kinds of noise. | |
228 More details can be found in~\citep{ift6266-tr-anonymous}. | |
229 | |
230 \begin{figure*}[ht] | |
231 \centering | |
232 \subfigure[Original]{\includegraphics[scale=0.6]{images/Original.png}\label{fig:torig}} | |
233 \subfigure[Thickness]{\includegraphics[scale=0.6]{images/Thick_only.png}} | |
234 \subfigure[Slant]{\includegraphics[scale=0.6]{images/Slant_only.png}} | |
235 \subfigure[Affine Transformation]{\includegraphics[scale=0.6]{images/Affine_only.png}} | |
236 \subfigure[Local Elastic Deformation]{\includegraphics[scale=0.6]{images/Localelasticdistorsions_only.png}} | |
237 \subfigure[Pinch]{\includegraphics[scale=0.6]{images/Pinch_only.png}} | |
238 %Noise | |
239 \subfigure[Motion Blur]{\includegraphics[scale=0.6]{images/Motionblur_only.png}} | |
240 \subfigure[Occlusion]{\includegraphics[scale=0.6]{images/occlusion_only.png}} | |
241 \subfigure[Gaussian Smoothing]{\includegraphics[scale=0.6]{images/Bruitgauss_only.png}} | |
242 \subfigure[Pixels Permutation]{\includegraphics[scale=0.6]{images/Permutpixel_only.png}} | |
243 \subfigure[Gaussian Noise]{\includegraphics[scale=0.6]{images/Distorsiongauss_only.png}} | |
244 \subfigure[Background Image Addition]{\includegraphics[scale=0.6]{images/background_other_only.png}} | |
245 \subfigure[Salt \& Pepper]{\includegraphics[scale=0.6]{images/Poivresel_only.png}} | |
246 \subfigure[Scratches]{\includegraphics[scale=0.6]{images/Rature_only.png}} | |
247 \subfigure[Grey Level \& Contrast]{\includegraphics[scale=0.6]{images/Contrast_only.png}} | |
248 \caption{Top left (a): example original image. Others (b-o): examples of the effect | |
249 of each transformation module taken separately. Actual perturbed examples are obtained by | |
250 a pipeline of these, with random choices about which module to apply and how much perturbation | |
251 to apply.} | |
252 \label{fig:transform} | |
253 %\vspace*{-2mm} | |
254 \end{figure*} | |
255 | |
256 %\vspace*{-3mm} | |
257 \section{Experimental Setup} | |
258 %\vspace*{-1mm} | |
259 | |
260 Much previous work on deep learning had been performed on | |
261 the MNIST digits task~\citep{Hinton06,ranzato-07-small,Bengio-nips-2006,Salakhutdinov+Hinton-2009}, | |
262 with 60,000 examples, and variants involving 10,000 | |
263 examples~\citep{Larochelle-jmlr-2009,VincentPLarochelleH2008-very-small}. | |
264 The focus here is on much larger training sets, from 10 times to | |
265 to 1000 times larger, and 62 classes. | |
266 | |
267 The first step in constructing the larger datasets (called NISTP and P07) is to sample from | |
268 a {\em data source}: {\bf NIST} (NIST database 19), {\bf Fonts}, {\bf Captchas}, | |
269 and {\bf OCR data} (scanned machine printed characters). See more in | |
270 Section~\ref{sec:sources} below. Once a character | |
271 is sampled from one of these sources (chosen randomly), the second step is to | |
272 apply a pipeline of transformations and/or noise processes outlined in section \ref{s:perturbations}. | |
273 | |
274 To provide a baseline of error rate comparison we also estimate human performance | |
275 on both the 62-class task and the 10-class digits task. | |
276 We compare the best Multi-Layer Perceptrons (MLP) against | |
277 the best Stacked Denoising Auto-encoders (SDA), when | |
278 both models' hyper-parameters are selected to minimize the validation set error. | |
279 We also provide a comparison against a precise estimate | |
280 of human performance obtained via Amazon's Mechanical Turk (AMT) | |
281 service ({\tt http://mturk.com}). | |
282 AMT users are paid small amounts | |
283 of money to perform tasks for which human intelligence is required. | |
284 Mechanical Turk has been used extensively in natural language processing and vision. | |
285 %processing \citep{SnowEtAl2008} and vision | |
286 %\citep{SorokinAndForsyth2008,whitehill09}. | |
287 AMT users were presented | |
288 with 10 character images (from a test set) on a screen | |
289 and asked to label them. | |
290 They were forced to choose a single character class (either among the | |
291 62 or 10 character classes) for each image. | |
292 80 subjects classified 2500 images per (dataset,task) pair. | |
293 Different humans labelers sometimes provided a different label for the same | |
294 example, and we were able to estimate the error variance due to this effect | |
295 because each image was classified by 3 different persons. | |
296 The average error of humans on the 62-class task NIST test set | |
297 is 18.2\%, with a standard error of 0.1\%. | |
298 | |
299 %\vspace*{-3mm} | |
300 \subsection{Data Sources} | |
301 \label{sec:sources} | |
302 %\vspace*{-2mm} | |
303 | |
304 %\begin{itemize} | |
305 %\item | |
306 {\bf NIST.} | |
307 Our main source of characters is the NIST Special Database 19~\citep{Grother-1995}, | |
308 widely used for training and testing character | |
309 recognition systems~\citep{Granger+al-2007,Cortes+al-2000,Oliveira+al-2002-short,Milgram+al-2005}. | |
310 The dataset is composed of 814255 digits and characters (upper and lower cases), with hand checked classifications, | |
311 extracted from handwritten sample forms of 3600 writers. The characters are labelled by one of the 62 classes | |
312 corresponding to ``0''-``9'',``A''-``Z'' and ``a''-``z''. The dataset contains 8 parts (partitions) of varying complexity. | |
313 The fourth partition (called $hsf_4$, 82,587 examples), | |
314 experimentally recognized to be the most difficult one, is the one recommended | |
315 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} | |
316 for that purpose. We randomly split the remainder (731,668 examples) into a training set and a validation set for | |
317 model selection. | |
318 The performances reported by previous work on that dataset mostly use only the digits. | |
319 Here we use all the classes both in the training and testing phase. This is especially | |
320 useful to estimate the effect of a multi-task setting. | |
321 The distribution of the classes in the NIST training and test sets differs | |
322 substantially, with relatively many more digits in the test set, and a more uniform distribution | |
323 of letters in the test set (whereas in the training set they are distributed | |
324 more like in natural text). | |
325 %\vspace*{-1mm} | |
326 | |
327 %\item | |
328 {\bf Fonts.} | |
329 In order to have a good variety of sources we downloaded an important number of free fonts from: | |
330 {\tt http://cg.scs.carleton.ca/\textasciitilde luc/freefonts.html}. | |
331 % TODO: pointless to anonymize, it's not pointing to our work | |
332 Including an operating system's (Windows 7) fonts, there is a total of $9817$ different fonts that we can choose uniformly from. | |
333 The chosen {\tt ttf} file is either used as input of the Captcha generator (see next item) or, by producing a corresponding image, | |
334 directly as input to our models. | |
335 %\vspace*{-1mm} | |
336 | |
337 %\item | |
338 {\bf Captchas.} | |
339 The Captcha data source is an adaptation of the \emph{pycaptcha} library (a Python-based captcha generator library) for | |
340 generating characters of the same format as the NIST dataset. This software is based on | |
341 a random character class generator and various kinds of transformations similar to those described in the previous sections. | |
342 In order to increase the variability of the data generated, many different fonts are used for generating the characters. | |
343 Transformations (slant, distortions, rotation, translation) are applied to each randomly generated character with a complexity | |
344 depending on the value of the complexity parameter provided by the user of the data source. | |
345 %Two levels of complexity are allowed and can be controlled via an easy to use facade class. %TODO: what's a facade class? | |
346 %\vspace*{-1mm} | |
347 | |
348 %\item | |
349 {\bf OCR data.} | |
350 A large set (2 million) of scanned, OCRed and manually verified machine-printed | |
351 characters where included as an | |
352 additional source. This set is part of a larger corpus being collected by the Image Understanding | |
353 Pattern Recognition Research group led by Thomas Breuel at University of Kaiserslautern | |
354 ({\tt http://www.iupr.com}), and which will be publicly released. | |
355 %TODO: let's hope that Thomas is not a reviewer! :) Seriously though, maybe we should anonymize this | |
356 %\end{itemize} | |
357 | |
358 %\vspace*{-3mm} | |
359 \subsection{Data Sets} | |
360 %\vspace*{-2mm} | |
361 | |
362 All data sets contain 32$\times$32 grey-level images (values in $[0,1]$) associated with a label | |
363 from one of the 62 character classes. | |
364 %\begin{itemize} | |
365 %\vspace*{-1mm} | |
366 | |
367 %\item | |
368 {\bf NIST.} This is the raw NIST special database 19~\citep{Grother-1995}. It has | |
369 \{651,668 / 80,000 / 82,587\} \{training / validation / test\} examples. | |
370 %\vspace*{-1mm} | |
371 | |
372 %\item | |
373 {\bf P07.} This dataset is obtained by taking raw characters from all four of the above sources | |
374 and sending them through the transformation pipeline described in section \ref{s:perturbations}. | |
375 For each new example to generate, a data source is selected with probability $10\%$ from the fonts, | |
376 $25\%$ from the captchas, $25\%$ from the OCR data and $40\%$ from NIST. We apply all the transformations in the | |
377 order given above, and for each of them we sample uniformly a \emph{complexity} in the range $[0,0.7]$. | |
378 It has \{81,920,000 / 80,000 / 20,000\} \{training / validation / test\} examples | |
379 obtained from the corresponding NIST sets plus other sources. | |
380 %\vspace*{-1mm} | |
381 | |
382 %\item | |
383 {\bf NISTP.} This one is equivalent to P07 (complexity parameter of $0.7$ with the same proportions of data sources) | |
384 except that we only apply | |
385 transformations from slant to pinch (see Fig.\ref{fig:transform}(b-f)). | |
386 Therefore, the character is | |
387 transformed but no additional noise is added to the image, giving images | |
388 closer to the NIST dataset. | |
389 It has \{81,920,000 / 80,000 / 20,000\} \{training / validation / test\} examples | |
390 obtained from the corresponding NIST sets plus other sources. | |
391 %\end{itemize} | |
392 | |
393 \begin{figure*}[ht] | |
394 %\vspace*{-2mm} | |
395 \centerline{\resizebox{0.8\textwidth}{!}{\includegraphics{images/denoising_autoencoder_small.pdf}}} | |
396 %\vspace*{-2mm} | |
397 \caption{Illustration of the computations and training criterion for the denoising | |
398 auto-encoder used to pre-train each layer of the deep architecture. Input $x$ of | |
399 the layer (i.e. raw input or output of previous layer) | |
400 s corrupted into $\tilde{x}$ and encoded into code $y$ by the encoder $f_\theta(\cdot)$. | |
401 The decoder $g_{\theta'}(\cdot)$ maps $y$ to reconstruction $z$, which | |
402 is compared to the uncorrupted input $x$ through the loss function | |
403 $L_H(x,z)$, whose expected value is approximately minimized during training | |
404 by tuning $\theta$ and $\theta'$.} | |
405 \label{fig:da} | |
406 %\vspace*{-2mm} | |
407 \end{figure*} | |
408 | |
409 %\vspace*{-3mm} | |
410 \subsection{Models and their Hyper-parameters} | |
411 %\vspace*{-2mm} | |
412 | |
413 The experiments are performed using MLPs (with a single | |
414 hidden layer) and deep SDAs. | |
415 \emph{Hyper-parameters are selected based on the {\bf NISTP} validation set error.} | |
416 | |
417 {\bf Multi-Layer Perceptrons (MLP).} | |
418 Whereas previous work had compared deep architectures to both shallow MLPs and | |
419 SVMs, we only compared to MLPs here because of the very large datasets used | |
420 (making the use of SVMs computationally challenging because of their quadratic | |
421 scaling behavior). Preliminary experiments on training SVMs (libSVM) with subsets of the training | |
422 set allowing the program to fit in memory yielded substantially worse results | |
423 than those obtained with MLPs. For training on nearly a hundred million examples | |
424 (with the perturbed data), the MLPs and SDA are much more convenient than | |
425 classifiers based on kernel methods. | |
426 The MLP has a single hidden layer with $\tanh$ activation functions, and softmax (normalized | |
427 exponentials) on the output layer for estimating $P(class | image)$. | |
428 The number of hidden units is taken in $\{300,500,800,1000,1500\}$. | |
429 Training examples are presented in minibatches of size 20. A constant learning | |
430 rate was chosen among $\{0.001, 0.01, 0.025, 0.075, 0.1, 0.5\}$. | |
431 %through preliminary experiments (measuring performance on a validation set), | |
432 %and $0.1$ (which was found to work best) was then selected for optimizing on | |
433 %the whole training sets. | |
434 %\vspace*{-1mm} | |
435 | |
436 | |
437 {\bf Stacked Denoising Auto-encoders (SDA).} | |
438 Various auto-encoder variants and Restricted Boltzmann Machines (RBMs) | |
439 can be used to initialize the weights of each layer of a deep MLP (with many hidden | |
440 layers)~\citep{Hinton06,ranzato-07-small,Bengio-nips-2006}, | |
441 apparently setting parameters in the | |
442 basin of attraction of supervised gradient descent yielding better | |
443 generalization~\citep{Erhan+al-2010}. This initial {\em unsupervised | |
444 pre-training phase} uses all of the training images but not the training labels. | |
445 Each layer is trained in turn to produce a new representation of its input | |
446 (starting from the raw pixels). | |
447 It is hypothesized that the | |
448 advantage brought by this procedure stems from a better prior, | |
449 on the one hand taking advantage of the link between the input | |
450 distribution $P(x)$ and the conditional distribution of interest | |
451 $P(y|x)$ (like in semi-supervised learning), and on the other hand | |
452 taking advantage of the expressive power and bias implicit in the | |
453 deep architecture (whereby complex concepts are expressed as | |
454 compositions of simpler ones through a deep hierarchy). | |
455 | |
456 Here we chose to use the Denoising | |
457 Auto-encoder~\citep{VincentPLarochelleH2008-very-small} as the building block for | |
458 these deep hierarchies of features, as it is simple to train and | |
459 explain (see Figure~\ref{fig:da}, as well as | |
460 tutorial and code there: {\tt http://deeplearning.net/tutorial}), | |
461 provides efficient inference, and yielded results | |
462 comparable or better than RBMs in series of experiments | |
463 \citep{VincentPLarochelleH2008-very-small}. It really corresponds to a Gaussian | |
464 RBM trained by a Score Matching criterion~\cite{Vincent-SM-2010}. | |
465 During training, a Denoising | |
466 Auto-encoder is presented with a stochastically corrupted version | |
467 of the input and trained to reconstruct the uncorrupted input, | |
468 forcing the hidden units to represent the leading regularities in | |
469 the data. Here we use the random binary masking corruption | |
470 (which sets to 0 a random subset of the inputs). | |
471 Once it is trained, in a purely unsupervised way, | |
472 its hidden units' activations can | |
473 be used as inputs for training a second one, etc. | |
474 After this unsupervised pre-training stage, the parameters | |
475 are used to initialize a deep MLP, which is fine-tuned by | |
476 the same standard procedure used to train them (see above). | |
477 The SDA hyper-parameters are the same as for the MLP, with the addition of the | |
478 amount of corruption noise (we used the masking noise process, whereby a | |
479 fixed proportion of the input values, randomly selected, are zeroed), and a | |
480 separate learning rate for the unsupervised pre-training stage (selected | |
481 from the same above set). The fraction of inputs corrupted was selected | |
482 among $\{10\%, 20\%, 50\%\}$. Another hyper-parameter is the number | |
483 of hidden layers but it was fixed to 3 based on previous work with | |
484 SDAs on MNIST~\citep{VincentPLarochelleH2008-very-small}. The size of the hidden | |
485 layers was kept constant across hidden layers, and the best results | |
486 were obtained with the largest values that we could experiment | |
487 with given our patience, with 1000 hidden units. | |
488 | |
489 %\vspace*{-1mm} | |
490 | |
491 \begin{figure*}[ht] | |
492 %\vspace*{-2mm} | |
493 \centerline{\resizebox{.99\textwidth}{!}{\includegraphics{images/error_rates_charts.pdf}}} | |
494 %\vspace*{-3mm} | |
495 \caption{SDAx are the {\bf deep} models. Error bars indicate a 95\% confidence interval. 0 indicates that the model was trained | |
496 on NIST, 1 on NISTP, and 2 on P07. Left: overall results | |
497 of all models, on NIST and NISTP test sets. | |
498 Right: error rates on NIST test digits only, along with the previous results from | |
499 literature~\citep{Granger+al-2007,Cortes+al-2000,Oliveira+al-2002-short,Milgram+al-2005} | |
500 respectively based on ART, nearest neighbors, MLPs, and SVMs.} | |
501 \label{fig:error-rates-charts} | |
502 %\vspace*{-2mm} | |
503 \end{figure*} | |
504 | |
505 | |
506 \begin{figure*}[ht] | |
507 \vspace*{-3mm} | |
508 \centerline{\resizebox{.99\textwidth}{!}{\includegraphics{images/improvements_charts.pdf}}} | |
509 \vspace*{-3mm} | |
510 \caption{Relative improvement in error rate due to out-of-distribution examples. | |
511 Left: Improvement (or loss, when negative) | |
512 induced by out-of-distribution examples (perturbed data). | |
513 Right: Improvement (or loss, when negative) induced by multi-task | |
514 learning (training on all classes and testing only on either digits, | |
515 upper case, or lower-case). The deep learner (SDA) benefits more from | |
516 out-of-distribution examples, compared to the shallow MLP.} | |
517 \label{fig:improvements-charts} | |
518 \vspace*{-2mm} | |
519 \end{figure*} | |
520 | |
521 \vspace*{-2mm} | |
522 \section{Experimental Results} | |
523 \vspace*{-2mm} | |
524 | |
525 %%\vspace*{-1mm} | |
526 %\subsection{SDA vs MLP vs Humans} | |
527 %%\vspace*{-1mm} | |
528 The models are either trained on NIST (MLP0 and SDA0), | |
529 NISTP (MLP1 and SDA1), or P07 (MLP2 and SDA2), and tested | |
530 on either NIST, NISTP or P07 (regardless of the data set used for training), | |
531 either on the 62-class task | |
532 or on the 10-digits task. Training time (including about half | |
533 for unsupervised pre-training, for DAs) on the larger | |
534 datasets is around one day on a GPU (GTX 285). | |
535 Figure~\ref{fig:error-rates-charts} summarizes the results obtained, | |
536 comparing humans, the three MLPs (MLP0, MLP1, MLP2) and the three SDAs (SDA0, SDA1, | |
537 SDA2), along with the previous results on the digits NIST special database | |
538 19 test set from the literature, respectively based on ARTMAP neural | |
539 networks ~\citep{Granger+al-2007}, fast nearest-neighbor search | |
540 ~\citep{Cortes+al-2000}, MLPs ~\citep{Oliveira+al-2002-short}, and SVMs | |
541 ~\citep{Milgram+al-2005}.% More detailed and complete numerical results | |
542 %(figures and tables, including standard errors on the error rates) can be | |
543 %found in Appendix. | |
544 The deep learner not only outperformed the shallow ones and | |
545 previously published performance (in a statistically and qualitatively | |
546 significant way) but when trained with perturbed data | |
547 reaches human performance on both the 62-class task | |
548 and the 10-class (digits) task. | |
549 17\% error (SDA1) or 18\% error (humans) may seem large but a large | |
550 majority of the errors from humans and from SDA1 are from out-of-context | |
551 confusions (e.g. a vertical bar can be a ``1'', an ``l'' or an ``L'', and a | |
552 ``c'' and a ``C'' are often indistinguishible). | |
553 | |
554 In addition, as shown in the left of | |
555 Figure~\ref{fig:improvements-charts}, the relative improvement in error | |
556 rate brought by out-of-distribution examples is greater for the deep | |
557 SDA, and these | |
558 differences with the shallow MLP are statistically and qualitatively | |
559 significant. | |
560 The left side of the figure shows the improvement to the clean | |
561 NIST test set error brought by the use of out-of-distribution examples | |
562 (i.e. the perturbed examples examples from NISTP or P07), | |
563 over the models trained exclusively on NIST (respectively SDA0 and MLP0). | |
564 Relative percent change is measured by taking | |
565 $100 \% \times$ (original model's error / perturbed-data model's error - 1). | |
566 The right side of | |
567 Figure~\ref{fig:improvements-charts} shows the relative improvement | |
568 brought by the use of a multi-task setting, in which the same model is | |
569 trained for more classes than the target classes of interest (i.e. training | |
570 with all 62 classes when the target classes are respectively the digits, | |
571 lower-case, or upper-case characters). Again, whereas the gain from the | |
572 multi-task setting is marginal or negative for the MLP, it is substantial | |
573 for the SDA. Note that to simplify these multi-task experiments, only the original | |
574 NIST dataset is used. For example, the MLP-digits bar shows the relative | |
575 percent improvement in MLP error rate on the NIST digits test set | |
576 as $100\% \times$ (single-task | |
577 model's error / multi-task model's error - 1). The single-task model is | |
578 trained with only 10 outputs (one per digit), seeing only digit examples, | |
579 whereas the multi-task model is trained with 62 outputs, with all 62 | |
580 character classes as examples. Hence the hidden units are shared across | |
581 all tasks. For the multi-task model, the digit error rate is measured by | |
582 comparing the correct digit class with the output class associated with the | |
583 maximum conditional probability among only the digit classes outputs. The | |
584 setting is similar for the other two target classes (lower case characters | |
585 and upper case characters). Note however that some types of perturbations | |
586 (NISTP) help more than others (P07) when testing on the clean images. | |
587 %%\vspace*{-1mm} | |
588 %\subsection{Perturbed Training Data More Helpful for SDA} | |
589 %%\vspace*{-1mm} | |
590 | |
591 %%\vspace*{-1mm} | |
592 %\subsection{Multi-Task Learning Effects} | |
593 %%\vspace*{-1mm} | |
594 | |
595 \iffalse | |
596 As previously seen, the SDA is better able to benefit from the | |
597 transformations applied to the data than the MLP. In this experiment we | |
598 define three tasks: recognizing digits (knowing that the input is a digit), | |
599 recognizing upper case characters (knowing that the input is one), and | |
600 recognizing lower case characters (knowing that the input is one). We | |
601 consider the digit classification task as the target task and we want to | |
602 evaluate whether training with the other tasks can help or hurt, and | |
603 whether the effect is different for MLPs versus SDAs. The goal is to find | |
604 out if deep learning can benefit more (or less) from multiple related tasks | |
605 (i.e. the multi-task setting) compared to a corresponding purely supervised | |
606 shallow learner. | |
607 | |
608 We use a single hidden layer MLP with 1000 hidden units, and a SDA | |
609 with 3 hidden layers (1000 hidden units per layer), pre-trained and | |
610 fine-tuned on NIST. | |
611 | |
612 Our results show that the MLP benefits marginally from the multi-task setting | |
613 in the case of digits (5\% relative improvement) but is actually hurt in the case | |
614 of characters (respectively 3\% and 4\% worse for lower and upper class characters). | |
615 On the other hand the SDA benefited from the multi-task setting, with relative | |
616 error rate improvements of 27\%, 15\% and 13\% respectively for digits, | |
617 lower and upper case characters, as shown in Table~\ref{tab:multi-task}. | |
618 \fi | |
619 | |
620 | |
621 \vspace*{-2mm} | |
622 \section{Conclusions and Discussion} | |
623 \vspace*{-2mm} | |
624 | |
625 We have found that out-of-distribution examples (multi-task learning | |
626 and perturbed examples) are more beneficial | |
627 to a deep learner than to a traditional shallow and purely | |
628 supervised learner. More precisely, | |
629 the answers are positive for all the questions asked in the introduction. | |
630 %\begin{itemize} | |
631 | |
632 $\bullet$ %\item | |
633 {\bf Do the good results previously obtained with deep architectures on the | |
634 MNIST digits generalize to a much larger and richer (but similar) | |
635 dataset, the NIST special database 19, with 62 classes and around 800k examples}? | |
636 Yes, the SDA {\em systematically outperformed the MLP and all the previously | |
637 published results on this dataset} (the ones that we are aware of), {\em in fact reaching human-level | |
638 performance} at around 17\% error on the 62-class task and 1.4\% on the digits, | |
639 and beating previously published results on the same data. | |
640 | |
641 $\bullet$ %\item | |
642 {\bf To what extent do out-of-distribution examples help deep learners, | |
643 and do they help them more than shallow supervised ones}? | |
644 We found that distorted training examples not only made the resulting | |
645 classifier better on similarly perturbed images but also on | |
646 the {\em original clean examples}, and more importantly and more novel, | |
647 that deep architectures benefit more from such {\em out-of-distribution} | |
648 examples. Shallow MLPs were helped by perturbed training examples when tested on perturbed input | |
649 images (65\% relative improvement on NISTP) | |
650 but only marginally helped (5\% relative improvement on all classes) | |
651 or even hurt (10\% relative loss on digits) | |
652 with respect to clean examples. On the other hand, the deep SDAs | |
653 were significantly boosted by these out-of-distribution examples. | |
654 Similarly, whereas the improvement due to the multi-task setting was marginal or | |
655 negative for the MLP (from +5.6\% to -3.6\% relative change), | |
656 it was quite significant for the SDA (from +13\% to +27\% relative change), | |
657 which may be explained by the arguments below. | |
658 Since out-of-distribution data | |
659 (perturbed or from other related classes) is very common, this conclusion | |
660 is of practical importance. | |
661 %\end{itemize} | |
662 | |
663 In the original self-taught learning framework~\citep{RainaR2007}, the | |
664 out-of-sample examples were used as a source of unsupervised data, and | |
665 experiments showed its positive effects in a \emph{limited labeled data} | |
666 scenario. However, many of the results by \citet{RainaR2007} (who used a | |
667 shallow, sparse coding approach) suggest that the {\em relative gain of self-taught | |
668 learning vs ordinary supervised learning} diminishes as the number of labeled examples increases. | |
669 We note instead that, for deep | |
670 architectures, our experiments show that such a positive effect is accomplished | |
671 even in a scenario with a \emph{large number of labeled examples}, | |
672 i.e., here, the relative gain of self-taught learning and | |
673 out-of-distribution examples is probably preserved | |
674 in the asymptotic regime. However, note that in our perturbation experiments | |
675 (but not in our multi-task experiments), | |
676 even the out-of-distribution examples are labeled, unlike in the | |
677 earlier self-taught learning experiments~\citep{RainaR2007}. | |
678 | |
679 {\bf Why would deep learners benefit more from the self-taught learning | |
680 framework and out-of-distribution examples}? | |
681 The key idea is that the lower layers of the predictor compute a hierarchy | |
682 of features that can be shared across tasks or across variants of the | |
683 input distribution. A theoretical analysis of generalization improvements | |
684 due to sharing of intermediate features across tasks already points | |
685 towards that explanation~\cite{baxter95a}. | |
686 Intermediate features that can be used in different | |
687 contexts can be estimated in a way that allows to share statistical | |
688 strength. Features extracted through many levels are more likely to | |
689 be more abstract and more invariant to some of the factors of variation | |
690 in the underlying distribution (as the experiments in~\citet{Goodfellow2009} suggest), | |
691 increasing the likelihood that they would be useful for a larger array | |
692 of tasks and input conditions. | |
693 Therefore, we hypothesize that both depth and unsupervised | |
694 pre-training play a part in explaining the advantages observed here, and future | |
695 experiments could attempt at teasing apart these factors. | |
696 And why would deep learners benefit from the self-taught learning | |
697 scenarios even when the number of labeled examples is very large? | |
698 We hypothesize that this is related to the hypotheses studied | |
699 in~\citet{Erhan+al-2010}. In~\citet{Erhan+al-2010} | |
700 it was found that online learning on a huge dataset did not make the | |
701 advantage of the deep learning bias vanish, and a similar phenomenon | |
702 may be happening here. We hypothesize that unsupervised pre-training | |
703 of a deep hierarchy with out-of-distribution examples initializes the | |
704 model in the basin of attraction of supervised gradient descent | |
705 that corresponds to better generalization. Furthermore, such good | |
706 basins of attraction are not discovered by pure supervised learning | |
707 (with or without out-of-distribution examples) from random initialization, and more labeled examples | |
708 does not allow the shallow or purely supervised models to discover | |
709 the kind of better basins associated | |
710 with deep learning and out-of-distribution examples. | |
711 | |
712 A Flash demo of the recognizer (where both the MLP and the SDA can be compared) | |
713 can be executed on-line at the anonymous site {\tt http://deep.host22.com}. | |
714 | |
715 \iffalse | |
716 \section*{Appendix I: Detailed Numerical Results} | |
717 | |
718 These tables correspond to Figures 2 and 3 and contain the raw error rates for each model and dataset considered. | |
719 They also contain additional data such as test errors on P07 and standard errors. | |
720 | |
721 \begin{table}[ht] | |
722 \caption{Overall comparison of error rates ($\pm$ std.err.) on 62 character classes (10 digits + | |
723 26 lower + 26 upper), except for last columns -- digits only, between deep architecture with pre-training | |
724 (SDA=Stacked Denoising Autoencoder) and ordinary shallow architecture | |
725 (MLP=Multi-Layer Perceptron). The models shown are all trained using perturbed data (NISTP or P07) | |
726 and using a validation set to select hyper-parameters and other training choices. | |
727 \{SDA,MLP\}0 are trained on NIST, | |
728 \{SDA,MLP\}1 are trained on NISTP, and \{SDA,MLP\}2 are trained on P07. | |
729 The human error rate on digits is a lower bound because it does not count digits that were | |
730 recognized as letters. For comparison, the results found in the literature | |
731 on NIST digits classification using the same test set are included.} | |
732 \label{tab:sda-vs-mlp-vs-humans} | |
733 \begin{center} | |
734 \begin{tabular}{|l|r|r|r|r|} \hline | |
735 & NIST test & NISTP test & P07 test & NIST test digits \\ \hline | |
736 Humans& 18.2\% $\pm$.1\% & 39.4\%$\pm$.1\% & 46.9\%$\pm$.1\% & $1.4\%$ \\ \hline | |
737 SDA0 & 23.7\% $\pm$.14\% & 65.2\%$\pm$.34\% & 97.45\%$\pm$.06\% & 2.7\% $\pm$.14\%\\ \hline | |
738 SDA1 & 17.1\% $\pm$.13\% & 29.7\%$\pm$.3\% & 29.7\%$\pm$.3\% & 1.4\% $\pm$.1\%\\ \hline | |
739 SDA2 & 18.7\% $\pm$.13\% & 33.6\%$\pm$.3\% & 39.9\%$\pm$.17\% & 1.7\% $\pm$.1\%\\ \hline | |
740 MLP0 & 24.2\% $\pm$.15\% & 68.8\%$\pm$.33\% & 78.70\%$\pm$.14\% & 3.45\% $\pm$.15\% \\ \hline | |
741 MLP1 & 23.0\% $\pm$.15\% & 41.8\%$\pm$.35\% & 90.4\%$\pm$.1\% & 3.85\% $\pm$.16\% \\ \hline | |
742 MLP2 & 24.3\% $\pm$.15\% & 46.0\%$\pm$.35\% & 54.7\%$\pm$.17\% & 4.85\% $\pm$.18\% \\ \hline | |
743 \citep{Granger+al-2007} & & & & 4.95\% $\pm$.18\% \\ \hline | |
744 \citep{Cortes+al-2000} & & & & 3.71\% $\pm$.16\% \\ \hline | |
745 \citep{Oliveira+al-2002} & & & & 2.4\% $\pm$.13\% \\ \hline | |
746 \citep{Milgram+al-2005} & & & & 2.1\% $\pm$.12\% \\ \hline | |
747 \end{tabular} | |
748 \end{center} | |
749 \end{table} | |
750 | |
751 \begin{table}[ht] | |
752 \caption{Relative change in error rates due to the use of perturbed training data, | |
753 either using NISTP, for the MLP1/SDA1 models, or using P07, for the MLP2/SDA2 models. | |
754 A positive value indicates that training on the perturbed data helped for the | |
755 given test set (the first 3 columns on the 62-class tasks and the last one is | |
756 on the clean 10-class digits). Clearly, the deep learning models did benefit more | |
757 from perturbed training data, even when testing on clean data, whereas the MLP | |
758 trained on perturbed data performed worse on the clean digits and about the same | |
759 on the clean characters. } | |
760 \label{tab:perturbation-effect} | |
761 \begin{center} | |
762 \begin{tabular}{|l|r|r|r|r|} \hline | |
763 & NIST test & NISTP test & P07 test & NIST test digits \\ \hline | |
764 SDA0/SDA1-1 & 38\% & 84\% & 228\% & 93\% \\ \hline | |
765 SDA0/SDA2-1 & 27\% & 94\% & 144\% & 59\% \\ \hline | |
766 MLP0/MLP1-1 & 5.2\% & 65\% & -13\% & -10\% \\ \hline | |
767 MLP0/MLP2-1 & -0.4\% & 49\% & 44\% & -29\% \\ \hline | |
768 \end{tabular} | |
769 \end{center} | |
770 \end{table} | |
771 | |
772 \begin{table}[ht] | |
773 \caption{Test error rates and relative change in error rates due to the use of | |
774 a multi-task setting, i.e., training on each task in isolation vs training | |
775 for all three tasks together, for MLPs vs SDAs. The SDA benefits much | |
776 more from the multi-task setting. All experiments on only on the | |
777 unperturbed NIST data, using validation error for model selection. | |
778 Relative improvement is 1 - single-task error / multi-task error.} | |
779 \label{tab:multi-task} | |
780 \begin{center} | |
781 \begin{tabular}{|l|r|r|r|} \hline | |
782 & single-task & multi-task & relative \\ | |
783 & setting & setting & improvement \\ \hline | |
784 MLP-digits & 3.77\% & 3.99\% & 5.6\% \\ \hline | |
785 MLP-lower & 17.4\% & 16.8\% & -4.1\% \\ \hline | |
786 MLP-upper & 7.84\% & 7.54\% & -3.6\% \\ \hline | |
787 SDA-digits & 2.6\% & 3.56\% & 27\% \\ \hline | |
788 SDA-lower & 12.3\% & 14.4\% & 15\% \\ \hline | |
789 SDA-upper & 5.93\% & 6.78\% & 13\% \\ \hline | |
790 \end{tabular} | |
791 \end{center} | |
792 \end{table} | |
793 | |
794 \fi | |
795 | |
796 %\afterpage{\clearpage} | |
797 %\clearpage | |
798 { | |
799 %\bibliographystyle{spbasic} % basic style, author-year citations | |
800 \bibliographystyle{plainnat} | |
801 \bibliography{strings,strings-short,strings-shorter,ift6266_ml,specials,aigaion-shorter} | |
802 %\bibliographystyle{unsrtnat} | |
803 %\bibliographystyle{apalike} | |
804 } | |
805 | |
806 | |
807 \end{document} |