annotate writeup/techreport.tex @ 438:a6d339033d03

added AMT
author Yoshua Bengio <bengioy@iro.umontreal.ca>
date Mon, 03 May 2010 07:46:18 -0400
parents 479f2f518fc9
children 89258bb41e4c
rev   line source
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
1 \documentclass[12pt,letterpaper]{article}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
2 \usepackage[utf8]{inputenc}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
3 \usepackage{graphicx}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
4 \usepackage{times}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
5 \usepackage{mlapa}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
6
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
7 \begin{document}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
8 \title{Generating and Exploiting Perturbed Training Data for Deep Architectures}
381
0a91fc69ff90 authors
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 379
diff changeset
9 \author{The IFT6266 Gang}
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
10 \date{April 2010, Technical Report, Dept. IRO, U. Montreal}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
11
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
12 \maketitle
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
13
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
14 \begin{abstract}
392
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
15 Recent theoretical and empirical work in statistical machine learning has
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
16 demonstrated the importance of learning algorithms for deep
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
17 architectures, i.e., function classes obtained by composing multiple
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
18 non-linear transformations. In the area of handwriting recognition,
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
19 deep learning algorithms
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
20 had been evaluated on rather small datasets with a few tens of thousands
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
21 of examples. Here we propose a powerful generator of variations
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
22 of examples for character images based on a pipeline of stochastic
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
23 transformations that include not only the usual affine transformations
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
24 but also the addition of slant, local elastic deformations, changes
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
25 in thickness, background images, color, contrast, occlusion, and
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
26 various types of pixel and spatially correlated noise.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
27 We evaluate a deep learning algorithm (Stacked Denoising Autoencoders)
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
28 on the task of learning to classify digits and letters transformed
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
29 with this pipeline, using the hundreds of millions of generated examples
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
30 and testing on the full NIST test set.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
31 We find that the SDA outperforms its
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
32 shallow counterpart, an ordinary Multi-Layer Perceptron,
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
33 and that it is better able to take advantage of the additional
438
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
34 generated data, as well as better able to take advantage of
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
35 training from more classes than those of interest in the end.
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
36 In fact, we find that the SDA reaches human performance as
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
37 estimated by the Amazon Mechanical Turk on the NIST test characters.
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
38 \end{abstract}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
39
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
40 \section{Introduction}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
41
392
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
42 Deep Learning has emerged as a promising new area of research in
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
43 statistical machine learning (see~\emcite{Bengio-2009} for a review).
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
44 Learning algorithms for deep architectures are centered on the learning
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
45 of useful representations of data, which are better suited to the task at hand.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
46 This is in great part inspired by observations of the mammalian visual cortex,
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
47 which consists of a chain of processing elements, each of which is associated with a
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
48 different representation. In fact,
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
49 it was found recently that the features learnt in deep architectures resemble
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
50 those observed in the first two of these stages (in areas V1 and V2
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
51 of visual cortex)~\cite{HonglakL2008}.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
52 Processing images typically involves transforming the raw pixel data into
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
53 new {\bf representations} that can be used for analysis or classification.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
54 For example, a principal component analysis representation linearly projects
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
55 the input image into a lower-dimensional feature space.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
56 Why learn a representation? Current practice in the computer vision
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
57 literature converts the raw pixels into a hand-crafted representation
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
58 (e.g.\ SIFT features~\cite{Lowe04}), but deep learning algorithms
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
59 tend to discover similar features in their first few
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
60 levels~\cite{HonglakL2008,ranzato-08,Koray-08,VincentPLarochelleH2008-very-small}.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
61 Learning increases the
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
62 ease and practicality of developing representations that are at once
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
63 tailored to specific tasks, yet are able to borrow statistical strength
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
64 from other related tasks (e.g., modeling different kinds of objects). Finally, learning the
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
65 feature representation can lead to higher-level (more abstract, more
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
66 general) features that are more robust to unanticipated sources of
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
67 variance extant in real data.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
68
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
69 Whereas a deep architecture can in principle be more powerful than a shallow
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
70 one in terms of representation, depth appears to render the training problem
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
71 more difficult in terms of optimization and local minima.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
72 It is also only recently that
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
73 successful algorithms were proposed to overcome some of these
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
74 difficulties.
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
75
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
76 \section{Perturbation and Transformation of Character Images}
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
77 This section describes the different transformations we used to generate data, in their order.
428
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
78 We can differentiate two important parts in the pipeline. The first one, from slant to pinch, performs transformations
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
79 of the character. The second part, from blur to contrast, adds noise to the image.
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
80
407
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
81 \subsection{Adding Slant}
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
82 In order to mimic a slant effect, we simply shift each row of the image proportionnaly to its height: $shift = round(slant \times height)$.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
83 We round the shift in order to have a discret displacement. We do not use a filter to smooth the result in order to save computing time
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
84 and also because latter transformations have similar effects.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
85
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
86 The $slant$ coefficient can be negative or positive with equal probability and its value is randomly sampled according to the complexity level.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
87 In our case we take uniformly a number in the range $[0,complexity]$, that means, in our case, that the maximum displacement for the lowest
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
88 or highest pixel line is of $round(complexity \times 32)$.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
89
407
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
90
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
91 \subsection{Changing Thickness}
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
92 To change the thickness of the characters we used morpholigical operators: dilation and erosion~\cite{Haralick87,Serra82}.i
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
93
407
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
94 The basic idea of such transform is, for each pixel, to multiply in the element-wise manner its neighbourhood with a matrix called the structuring element.
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
95 Then for dilation we remplace the pixel value by the maximum of the result, or the minimum for erosion.
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
96 This will dilate or erode objects in the image and strength of the transform only depends on the structuring element.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
97
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
98 We used ten different structural elements with increasing dimensions (the biggest is $5\times5$).
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
99 for each image, we radomly sample the operator type (dilation or erosion) with equal probability and one structural element
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
100 from a subset of the $n$ smallest structuring elements where $n$ is $round(10 \times complexity)$ for dilation and $round(6 \times complexity)$ for erosion.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
101 A neutral element is always present in the set, if it is chosen the transformation is not applied.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
102 Erosion allows only the six smallest structural elements because when the character is too thin it may erase it completly.
407
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
103
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
104 \subsection{Affine Transformations}
407
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
105 We generate an affine transform matrix according to the complexity level, then we apply it directly to the image.
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
106 This allows to produce scaling, translation, rotation and shearing variances. We took care that the maximum rotation applied
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
107 to the image is low enough not to confuse classes.
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
108
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
109 \subsection{Local Elastic Deformations}
416
5f9d04dda707 Correction d'une erreur pour pinch et ajout d'une ref bibliographique
fsavard
parents: 415
diff changeset
110 This filter induces a "wiggly" effect in the image. The description here will be brief, as the algorithm follows precisely what is described in \cite{SimardSP03}.
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
111
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
112 The general idea is to generate two "displacements" fields, for horizontal and vertical displacements of pixels. Each of these fields has the same size as the original image.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
113
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
114 When generating the transformed image, we'll loop over the x and y positions in the fields and select, as a value, the value of the pixel in the original image at the (relative) position given by the displacement fields for this x and y. If the position we'd retrieve is outside the borders of the image, we use a 0 value instead.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
115
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
116 To generate a pixel in either field, first a value between -1 and 1 is chosen from a uniform distribution. Then all the pixels, in both fields, is multiplied by a constant $\alpha$ which controls the intensity of the displacements (bigger $\alpha$ translates into larger wiggles).
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
117
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
118 As a final step, each field is convoluted with a Gaussian 2D kernel of standard deviation $\sigma$. Visually, this results in a "blur" filter. This has the effect of making values next to each other in the displacement fields similar. In effect, this makes the wiggles more coherent, less noisy.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
119
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
120 As displacement fields were long to compute, 50 pairs of fields were generated per complexity in increments of 0.1 (50 pairs for 0.1, 50 pairs for 0.2, etc.), and afterwards, given a complexity, we selected randomly among the 50 corresponding pairs.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
121
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
122 $\sigma$ and $\alpha$ were linked to complexity through the formulas $\alpha = \sqrt[3]{complexity} \times 10.0$ and $\sigma = 10 - 7 \times \sqrt[3]{complexity}$.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
123
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
124
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
125 \subsection{Pinch}
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
126
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
127 This is another GIMP filter we used. The filter is in fact named "Whirl and pinch", but we don't use the "whirl" part (whirl is set to 0). As described in GIMP, a pinch is "similar to projecting the image onto an elastic surface and pressing or pulling on the center of the surface".
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
128
416
5f9d04dda707 Correction d'une erreur pour pinch et ajout d'une ref bibliographique
fsavard
parents: 415
diff changeset
129 Mathematically, for a square input image, think of drawing a circle of radius $r$ around a center point $C$. Any point (pixel) $P$ belonging to that disk (region inside circle) will have its value recalculated by taking the value of another "source" pixel in the original image. The position of that source pixel is found on the line thats goes through $C$ and $P$, but at some other distance $d_2$. Define $d_1$ to be the distance between $P$ and $C$. $d_2$ is given by $d_2 = sin(\frac{\pi{}d_1}{2r})^{-pinch} \times d_1$, where $pinch$ is a parameter to the filter.
5f9d04dda707 Correction d'une erreur pour pinch et ajout d'une ref bibliographique
fsavard
parents: 415
diff changeset
130
417
0282882aa91f Completed the pinch transformation text
fsavard
parents: 416
diff changeset
131 If the region considered is not square then, before computing $d_2$, the smallest dimension (x or y) is stretched such that we may consider the region as if it was square. Then, after $d_2$ has been computed and corresponding components $d_2\_x$ and $d_2\_y$ have been found, the component corresponding to the stretched dimension is compressed back by an inverse ratio.
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
132
417
0282882aa91f Completed the pinch transformation text
fsavard
parents: 416
diff changeset
133 The actual value is given by bilinear interpolation considering the pixels around the (non-integer) source position thus found.
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
134
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
135 The value for $pinch$ in our case was given by sampling from an uniform distribution over the range $[-complexity, 0.7 \times complexity]$.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
136
426
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
137 \subsection{Motion Blur}
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
138
426
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
139 This is a GIMP filter we applied, a "linear motion blur" in GIMP terminology. The description will be brief as it is a well-known filter.
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
140
426
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
141 This algorithm has two input parameters, $length$ and $angle$. The value of a pixel in the final image is the mean value of the $length$ first pixels found by moving in the $angle$ direction. An approximation of this idea is used, as we won't fall onto precise pixels by following that direction. This is done using the Bresenham line algorithm.
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
142
426
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
143 The angle, in our case, is chosen from a uniform distribution over $[0,360]$ degrees. The length, though, depends on the complexity; it's sampled from a Gaussian distribution of mean 0 and standard deviation $\sigma = 3 \times complexity$.
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
144
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
145 \subsection{Occlusion}
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
146
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
147 This filter selects random parts of other (hereafter "occlusive") letter images and places them over the original letter (hereafter "occluded") image. To be more precise, having selected a subregion of the occlusive image and a desination position in the occluded image, to determine the final value for a given overlapping pixel, it selects whichever pixel is the lightest. As a reminder, the background value is 0, black, so the value nearest to 1 is selected.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
148
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
149 To select a subpart of the occlusive image, four numbers are generated. For compability with the code, we'll call them "haut", "bas", "gauche" and "droite" (respectively meaning top, bottom, left and right). Each of these numbers is selected according to a Gaussian distribution of mean $8 \times complexity$ and standard deviation $2$. This means the largest the complexity is, the biggest the occlusion will be. The absolute value is taken, as the numbers must be positive, and the maximum value is capped at 15.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
150
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
151 These four sizes collectively define a window centered on the middle pixel of the occlusive image. This is the part that will be extracted as the occlusion.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
152
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
153 The next step is to select a destination position in the occluded image. Vertical and horizontal displacements $y\_arrivee$ and $x\_arrivee$ are selected according to Gaussian distributions of mean 0 and of standard deviations of, respectively, 3 and 2. Then an horizontal placement mode, $endroit$ (meaning location), is selected to be of three values meaning left, middle or right.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
154
416
5f9d04dda707 Correction d'une erreur pour pinch et ajout d'une ref bibliographique
fsavard
parents: 415
diff changeset
155 If $endroit$ is "middle", the occlusion will be horizontally centered around the horizontal middle of the occluded image, then shifted according to $x\_arrivee$. If $endroit$ is "left", it will be placed on the left of the occluded image, then displaced right according to $x\_arrivee$. The contrary happens if $endroit$ is $right$.
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
156
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
157 In both the horizontal and vertical positionning, the maximum position in either direction is such that the selected occlusion won't go beyond the borders of the occluded image.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
158
416
5f9d04dda707 Correction d'une erreur pour pinch et ajout d'une ref bibliographique
fsavard
parents: 415
diff changeset
159 This filter has a probability of not being applied, at all, of 60\%.
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
160
426
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
161
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
162 \subsection{Distorsion gauss}
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
163
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
164 This filter simply adds, to each pixel of the image independently, a gaussian noise of mean $0$ and standard deviation $\frac{complexity}{10}$.
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
165
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
166 It has has a probability of not being applied, at all, of 70\%.
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
167
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
168
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
169 \subsection{Background Images}
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
170
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
171 This transformation adds a random background behind the letter. The background is chosen by first selecting, at random, an image from a set of images. Then we choose a 32x32 subregion of that image as the background image (by sampling x and y positions uniformly while making sure not to cross image borders).
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
172
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
173 To combine the original letter image and the background image, contrast adjustments are made. We first get the maximal values (i.e. maximal intensity) for both the original image and the background image, $maximage$ and $maxbg$. We also have a parameter, $contrast$, given by sampling from a uniform distribution over $[complexity, 1]$.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
174
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
175 Once we have all these numbers, we first adjust the values for the background image. Each pixel value is multiplied by $\frac{max(maximage - contrast, 0)}{maxbg}$. Therefore the higher the contrast, the darkest the background will be.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
176
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
177 The final image is found by taking the brightest (i.e. value nearest to 1) pixel from either the background image or the corresponding pixel in the original image.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
178
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
179 \subsection{Salt and Pepper Noise}
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
180
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
181 This filter adds noise to the image by randomly selecting a certain number of them and, for those selected pixels, assign a random value according to a uniform distribution over the $[0,1]$ ranges. This last distribution does not change according to complexity. Instead, the number of selected pixels does: the proportion of changed pixels corresponds to $complexity / 5$, which means, as a maximum, 20\% of the pixels will be randomized. On the lowest extreme, no pixel is changed.
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
182
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
183 This filter also has a probability of not being applied, at all, of 75\%.
415
1e9788ce1680 Added the parts concerning the transformations I'd announced I'd do: Local elastic deformations; occlusions; gimp transformations; salt and pepper noise; background images
fsavard
parents: 411
diff changeset
184
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
185 \subsection{Spatially Gaussian Noise}
426
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
186
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
187 The aim of this transformation is to filter, with a gaussian kernel, different regions of the image. In order to save computing time
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
188 we decided to convolve the whole image only once with a symmetric gaussian kernel of size and variance choosen uniformly in the ranges:
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
189 $[12,12 + 20 \times complexity]$ and $[2,2 + 6 \times complexity]$. The result is normalized between $0$ and $1$.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
190 We also create a symmetric averaging window, of the kernel size, with maximum value at the center.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
191 For each image we sample uniformly from $3$ to $3 + 10 \times complexity$ pixels that will be averaging centers
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
192 between the original image and the filtered one.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
193 We initialize to zero a mask matrix of the image size. For each selected pixel we add to the mask the averaging window centered to it.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
194 The final image is computed from the following element-wise operation: $\frac{image + filtered_image \times mask}{mask+1}$.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
195
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
196 This filter has a probability of not being applied, at all, of 75\%.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
197
428
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
198 \subsection{"Ratures"}
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
199
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
200 The ratures ("scratches") filter places line-like white patches on the image. The lines are in fact heavily transformed images of the digit "1" (one), chosen at random among five thousands such start images of this digit.
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
201
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
202 Once the image is selected, the transformation begins by finding the first $top$, $bottom$, $right$ and $left$ non-zero pixels in the image. It is then cropped to the region thus delimited, then this cropped version is expanded to 32x32 again. It is then rotated by a random angle having a Gaussian distribution of mean 90 and standard deviation $100 \times complexity$ (in degrees). The rotation is done with bicubic interpolation.
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
203
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
204 The rotated image is then resized to 50x50, with anti-aliasing. In that image, we crop the image again by selecting a region delimited horizontally to $left$ to $left+32$ and vertically by $top$ to $top+32$.
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
205
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
206 Once this is done, two passes of a greyscale morphological erosion filter are applied. Put briefly, this erosion filter reduces the width of the line by a certain $smoothing$ amount. For small complexities (< 0.5), $smoothing$ is 6, so the line is very small. For complexities ranging from 0.25 to 0.5, $smoothing$ is 5. It is 4 for complexities 0.5 to 0.75, and 3 for higher complexities.
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
207
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
208 To compensate for border effects, the image is then cropped to 28x28 by removing two pixels everywhere on the borders, then expanded to 32x32 again. The pixel values are then linearly expanded such that the minimum value is 0 and the maximal one is 1. Then, 50\% of the time, the image is vertically flipped.
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
209
9fcd0215b8d5 Added text for ratures filter
fsavard
parents: 427
diff changeset
210 This filter is only applied only 15\% of the time. When it is applied, 50\% of the time, only one patch image is generated and applied. In 30\% of cases, two patches are generated, and otherwise three patches are generated. The patch is applied by taking the maximal value on any given patch or the original image, for each of the 32x32 pixel locations.
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
211
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
212 \subsection{Color and Contrast Changes}
426
a7fab59de174 change order of transformations
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 425
diff changeset
213
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
214 This filter changes the constrast and may invert the image polarity (white on black to black on white). The contrast $C$ is defined here as the difference
424
6e5f0f50ddab Fix latex syntax in 2.12 (would not compile otherwise).
Arnaud Bergeron <abergeron@gmail.com>
parents: 423
diff changeset
215 between the maximum and the minimum pixel value of the image. A contrast value is sampled uniformly between $1$ and $1-0.85 \times complexity$
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
216 (this insure a minimum constrast of $0.15$). We then simply normalize the image to the range $[\frac{1-C}{2},1-\frac{1-C}{2}]$. The polarity
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
217 is inverted with $0.5$ probability.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
218
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
219
393
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
220 \begin{figure}[h]
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
221 \resizebox{.99\textwidth}{!}{\includegraphics{images/example_t.png}}\\
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
222 \caption{Illustration of the pipeline of stochastic
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
223 transformations applied to the image of a lower-case t
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
224 (the upper left image). Each image in the pipeline (going from
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
225 left to right, first top line, then bottom line) shows the result
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
226 of applying one of the modules in the pipeline. The last image
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
227 (bottom right) is used as training example.}
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
228 \label{fig:pipeline}
4c840798d290 added examples of figure and table of results
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 392
diff changeset
229 \end{figure}
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
230
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
231 \section{Learning Algorithms for Deep Architectures}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
232
422
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
233 Learning for deep network has long been a problem since well-known learning algorithms do not generalize well on deep architectures.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
234 Using these training algorithms on deep network usually yields to a worse generalization than on shallow networks.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
235 Recently, new initialization techniques have been discovered that enable better generalization overall.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
236
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
237 One of these initialization techniques is denoising auto-encoders.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
238 The principle is that each layer starting from the bottom is trained to encode and decode their input and the encoding part is kept as initialization for the weights and bias of the network.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
239 For more details see section \ref{SdA}.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
240
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
241 After initialization is done, standard training algorithms work.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
242 In this case, since we have large data sets we use stochastic gradient descent.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
243 This resemble minibatch training except that the batches are selected at random.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
244 To speed up computation, we randomly pre-arranged examples in batches and used those for all training experiments.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
245
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
246 \section{Experimental Setup}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
247
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
248 \subsection{Training Datasets}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
249
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
250 \subsubsection{Data Sources}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
251
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
252 \begin{itemize}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
253 \item {\bf NIST}
434
310c730516af added description of nist19 and captcha data sources
goldfinger
parents: 432
diff changeset
254 The NIST Special Database 19 (NIST19) is a very widely used dataset for training and testing OCR systems.
310c730516af added description of nist19 and captcha data sources
goldfinger
parents: 432
diff changeset
255 The dataset is composed with over 800 000 digits and characters (upper and lower cases), with hand checked classifications,
310c730516af added description of nist19 and captcha data sources
goldfinger
parents: 432
diff changeset
256 extracted from handwritten sample forms of 3600 writers. The characters are labelled by one of the 62 classes
310c730516af added description of nist19 and captcha data sources
goldfinger
parents: 432
diff changeset
257 corresponding to "0"-"9","A"-"Z" and "a"-"z". The dataset contains 8 series of different complexity.
310c730516af added description of nist19 and captcha data sources
goldfinger
parents: 432
diff changeset
258 The fourth series, $hsf_4$, experimentally recognized to be the most difficult one for classification task is recommended
310c730516af added description of nist19 and captcha data sources
goldfinger
parents: 432
diff changeset
259 by NIST as testing set and is used in our work for that purpose.
310c730516af added description of nist19 and captcha data sources
goldfinger
parents: 432
diff changeset
260 The performances reported by previous work on that dataset mostly use only the digits.
432
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
261 Here we use the whole classes both in the training and testing phase.
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
262
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
263
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
264 \item {\bf Fonts}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
265 \item {\bf Captchas}
432
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
266 The Captcha data source is an adaptation of the \emph{pycaptcha} library (a python based captcha generator library) for
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
267 generating characters of the same format as the NIST dataset. The core of this data source is composed with a random character
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
268 generator and various kinds of tranformations similar to those described in the previous sections.
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
269 In order to increase the variability of the data generated, different fonts are used for generating the characters.
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
270 Transformations (slant, distorsions, rotation, translation) are applied to each randomly generated character with a complexity
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
271 depending on the value of the complexity parameter provided by the user of the data source. Two levels of complexity are
e2fd928a7de0 added description of nist19 and captcha data sources
goldfinger
parents: 428
diff changeset
272 allowed and can be controlled via an easy to use facade class.
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
273 \item {\bf OCR data}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
274 \end{itemize}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
275
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
276 \subsubsection{Data Sets}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
277 \begin{itemize}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
278 \item {\bf NIST}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
279 \item {\bf P07}
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
280 The dataset P07 is sampled with our transformation pipeline with a complexity parameter of $0.7$.
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
281 For each new exemple to generate, we choose one source with the following probability: $0.1$ for the fonts,
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
282 $0.25$ for the captchas, $0.25$ for OCR data and $0.4$ for NIST. We apply all the transformations in their order
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
283 and for each of them we sample uniformly a complexity in the range $[0,0.7]$.
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
284 \item {\bf NISTP} {\em ne pas utiliser PNIST mais NISTP, pour rester politically correct...}
420
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
285 NISTP is equivalent to P07 except that we only apply transformations from slant to pinch. Therefore, the character is transformed
a3a4a9c6476d added transformations description and began dataset descriptions
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 417
diff changeset
286 but no additionnal noise is added to the image, this gives images closer to the NIST dataset.
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
287 \end{itemize}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
288
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
289 \subsection{Models and their Hyperparameters}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
290
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
291 \subsubsection{Multi-Layer Perceptrons (MLP)}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
292
410
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
293 An MLP is a family of functions that are described by stacking layers of of a function similar to
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
294 $$g(x) = \tanh(b+Wx)$$
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
295 The input, $x$, is a $d$-dimension vector.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
296 The output, $g(x)$, is a $m$-dimension vector.
411
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
297 The parameter $W$ is a $m\times d$ matrix and is called the weight matrix.
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
298 The parameter $b$ is a $m$-vector and is called the bias vector.
410
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
299 The non-linearity (here $\tanh$) is applied element-wise to the output vector.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
300 Usually the input is referred to a input layer and similarly for the output.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
301 You can of course chain several such functions to obtain a more complex one.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
302 Here is a common example
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
303 $$f(x) = c + V\tanh(b+Wx)$$
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
304 In this case the intermediate layer corresponding to $\tanh(b+Wx)$ is called a hidden layer.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
305 Here the output layer does not have the same non-linearity as the hidden layer.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
306 This is a common case where some specialized non-linearity is applied to the output layer only depending on the task at hand.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
307
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
308 If you put 3 or more hidden layers in such a network you obtain what is called a deep MLP.
411
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
309 The parameters to adapt are the weight matrix and the bias vector for each layer.
410
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
310
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
311 \subsubsection{Stacked Denoising Auto-Encoders (SDAE)}
422
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
312 \label{SdA}
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
313
410
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
314 Auto-encoders are essentially a way to initialize the weights of the network to enable better generalization.
422
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
315 This is essentially unsupervised training where the layer is made to reconstruct its input through and encoding and decoding phase.
e7790db265b1 Basic text for section 3, add a bit more detail to section 4.2.2
Arnaud Bergeron <abergeron@gmail.com>
parents: 417
diff changeset
316 Denoising auto-encoders are a variant where the input is corrupted with random noise but the target is the uncorrupted input.
410
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
317 The principle behind these initialization methods is that the network will learn the inherent relation between portions of the data and be able to represent them thus helping with whatever task we want to perform.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
318
411
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
319 An auto-encoder unit is formed of two MLP layers with the bottom one called the encoding layer and the top one the decoding layer.
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
320 Usually the top and bottom weight matrices are the transpose of each other and are fixed this way.
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
321 The network is trained as such and, when sufficiently trained, the MLP layer is initialized with the parameters of the encoding layer.
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
322 The other parameters are discarded.
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
323
410
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
324 The stacked version is an adaptation to deep MLPs where you initialize each layer with a denoising auto-encoder starting from the bottom.
411
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
325 During the initialization, which is usually called pre-training, the bottom layer is treated as if it were an isolated auto-encoder.
4f69d915d142 Better description of the model parameters.
Arnaud Bergeron <abergeron@gmail.com>
parents: 410
diff changeset
326 The second and following layers receive the same treatment except that they take as input the encoded version of the data that has gone through the layers before it.
410
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
327 For additional details see \cite{vincent:icml08}.
6330298791fb Description brève de MLP et SdA
Arnaud Bergeron <abergeron@gmail.com>
parents: 407
diff changeset
328
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
329 \section{Experimental Results}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
330
438
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
331 \subsection{SDA vs MLP vs Humans}
392
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
332
438
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
333 We compare here the best MLP (according to validation set error) that we found against
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
334 the best SDA (again according to validation set error), along with a precise estimate
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
335 of human performance obtained via Amazon's Mechanical Turk (AMT)
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
336 service\footnote{http://mturk.com}. AMT users are paid small amounts
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
337 of money to perform tasks for which human intelligence is required.
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
338 Mechanical Turk has been used extensively in natural language
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
339 processing \cite{SnowEtAl2008} and vision
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
340 \cite{SorokinAndForsyth2008,whitehill09}. AMT users where presented
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
341 with 10 character images and asked to type 10 corresponding ascii
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
342 characters. Hence they were forced to make a hard choice among the
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
343 62 character classes. Three users classified each image, allowing
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
344 to estimate inter-human variability (shown as +/- in parenthesis below).
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
345
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
346 \begin{table}
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
347 \caption{Overall comparison of error rates on 62 character classes (10 digits +
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
348 26 lower + 26 upper), except for last columns -- digits only, between deep architecture with pre-training
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
349 (SDA=Stacked Denoising Autoencoder) and ordinary shallow architecture
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
350 (MLP=Multi-Layer Perceptron). }
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
351 \label{tab:sda-vs-mlp-vs-humans}
392
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
352 \begin{center}
438
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
353 \begin{tabular}{|l|r|r|r|r|} \hline
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
354 & NIST test & NISTP test & P07 test & NIST test digits \\ \hline
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
355 Humans& & & & \\ \hline
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
356 SDA & & & &\\ \hline
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
357 MLP & & & & \\ \hline
392
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
358 \end{tabular}
5f8fffd7347f possible image for illustrating perturbations
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 381
diff changeset
359 \end{center}
438
a6d339033d03 added AMT
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents: 437
diff changeset
360 \end{table}
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
361
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
362 \subsection{Perturbed Training Data More Helpful for SDAE}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
363
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
364 \subsection{Training with More Classes than Necessary}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
365
437
479f2f518fc9 added Training with More Classes than Necessary
Guillaume Sicard <guitch21@gmail.com>
parents: 434
diff changeset
366 As previously seen, the SDA is better able to benefit from the transformations applied to the data than the MLP. We are now training SDAs and MLPs on single classes from NIST (respectively digits, lower case characters and upper case characters), to compare the test results with those from models trained on the entire NIST database (per-class test error, with an a priori on the desired class). The goal is to find out if training the model with more classes than necessary reduces the test error on a single class, as opposed to training it only with the desired class. We use a single hidden layer MLP with 1000 hidden units, and a SDA with 3 hidden layers (1000 hidden units per layer), pre-trained and fine-tuned on NIST.
479f2f518fc9 added Training with More Classes than Necessary
Guillaume Sicard <guitch21@gmail.com>
parents: 434
diff changeset
367
479f2f518fc9 added Training with More Classes than Necessary
Guillaume Sicard <guitch21@gmail.com>
parents: 434
diff changeset
368 Our results show that the MLP only benefits from a full NIST training on digits, and the test error is only 5\% smaller than a digits-specialized MLP. On the other hand, the SDA always gives better results when it is trained with the entire NIST database, compared to its specialized counterparts (with upper case character, the test errors are identical, but 27\% smaller on digits, and 9.4\% smaller on lower case characters).
479f2f518fc9 added Training with More Classes than Necessary
Guillaume Sicard <guitch21@gmail.com>
parents: 434
diff changeset
369
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
370 \section{Conclusions}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
371
407
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
372 \bibliography{strings,ml,aigaion,specials}
379
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
373 \bibliographystyle{mlapa}
a21a174c1c18 added writeup skeleton
Yoshua Bengio <bengioy@iro.umontreal.ca>
parents:
diff changeset
374
407
fe2e2964e7a3 description des transformations en cours ajout d un fichier special.bib pour des references specifiques
Xavier Glorot <glorotxa@iro.umontreal.ca>
parents: 393
diff changeset
375 \end{document}