paper_id
stringlengths 13
13
| title
stringlengths 14
123
| abstract
stringlengths 72
1.87k
| full_text
stringlengths 0
89.3k
| authors
stringlengths 10
110
| decision
stringclasses 1
value | year
int64 2.01k
2.01k
| api_raw_submission
stringlengths 798
2.87k
| review
stringlengths 12
16.6k
| reviewer_id
stringlengths 2
110
| rating
null | confidence
null | api_raw_review
stringlengths 455
17.4k
| criteria_count
dict | reward_value
float64 0
3.25
| reward_value_length_adjusted
float64 -303.12
2.54
| length_penalty
float64 0
305
| reward_u
float64 0
3.27
| reward_h
float64 0.01
1.63
| meteor_score
float64 0
0.18
| criticism
float64 0
1
| example
float64 0
0.5
| importance_and_relevance
float64 0
1
| materials_and_methods
float64 0
1
| praise
float64 0
0.67
| presentation_and_reporting
float64 0
1
| results_and_discussion
float64 0
1
| suggestion_and_solution
float64 0
1
| dimension_scores
dict | overall_score
float64 0
3.25
| source
stringclasses 1
value | review_src
stringclasses 1
value | relative_rank
int64 0
0
| win_prob
float64 0
0
| thinking_trace
stringclasses 1
value | prompt
stringclasses 1
value | prompt_length
int64 0
0
| conversations
null |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zzy0H3ZbWiHsS
|
Audio Artist Identification by Deep Neural Network
|
Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.
|
胡振, Kun Fu, Changshui Zhang
|
Unknown
| 2,013
|
{"id": "zzy0H3ZbWiHsS", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358325000000, "tmdate": 1358325000000, "ddate": null, "number": 1, "content": {"decision": "reject", "title": "Audio Artist Identification by Deep Neural Network", "abstract": "Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.", "pdf": "https://arxiv.org/abs/1301.3195", "paperhash": "|audio_artist_identification_by_deep_neural_network", "keywords": [], "conflicts": [], "authors": ["\u80e1\u632f", "Kun Fu", "Changshui Zhang"], "authorids": ["eblis.hu@gmail.com", "Tsinghua Univ.", "Tsinghua Univ."]}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["eblis.hu@gmail.com"], "writers": []}
|
[Review]:
Thank you. We will revise our paper as soon as possible.
Zhen
|
胡振
| null | null |
{"id": "qbjSYWhow-bDl", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362725700000, "tmdate": 1362725700000, "ddate": null, "number": 3, "content": {"title": "", "review": "Thank you. We will revise our paper as soon as possible.\r\n\r\nZhen"}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzy0H3ZbWiHsS", "readers": ["everyone"], "nonreaders": [], "signatures": ["\u80e1\u632f"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 1,
"total": 3
}
| 0.333333
| -1.24491
| 1.578243
| 0.333333
| 0.053333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.3333333333333333
}
| 0.333333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
|||
zzy0H3ZbWiHsS
|
Audio Artist Identification by Deep Neural Network
|
Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.
|
胡振, Kun Fu, Changshui Zhang
|
Unknown
| 2,013
|
{"id": "zzy0H3ZbWiHsS", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358325000000, "tmdate": 1358325000000, "ddate": null, "number": 1, "content": {"decision": "reject", "title": "Audio Artist Identification by Deep Neural Network", "abstract": "Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.", "pdf": "https://arxiv.org/abs/1301.3195", "paperhash": "|audio_artist_identification_by_deep_neural_network", "keywords": [], "conflicts": [], "authors": ["\u80e1\u632f", "Kun Fu", "Changshui Zhang"], "authorids": ["eblis.hu@gmail.com", "Tsinghua Univ.", "Tsinghua Univ."]}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["eblis.hu@gmail.com"], "writers": []}
|
[Review]:
This paper present an application of an hybrid deep learning model to the task of audio artist identification.
Novelty:
+ The novelty of the paper comes from using an hybrid unsupervised learning approach by stacking Denoising Auto-Encoders (DA) and Restricted Boltzman Machines (RBM).
= Another minor novelty is the application of deep learning to artist identification. However, deep learning has already been applied to similar tasks before such as genre recognition and automatic tag annotation.
- Unfortunately, I found that the major contributions of the paper are not exposed clearly enough in the introduction.
Quality of presentation:
- The quality of the presentation leaves to be desired. A more careful proofreading would have been required. There are several sentences with gramatical errors. Several verbs or adjectives are wrong. The writing style is also sometimes inadequate for a scientific paper (ex. 'we will review some fantastic work', 'we can build many outstanding networks'). The quality of the english is, in general, inadequate.
- The abstract does not present in a relevant and concise manner the essential points of the paper.
- Also, there is a bit of confusion in between the introduction and related work sections, as most of the introduction is also about related work.
Reference to previous work:
+ Previous related work coverage is good. Previous work in deep learning and its applications in MIR, as well as work in audio artist identification are well covered.
- In the beginning of section 5: 'It's known that Bach, Beethoven and Brahms, known as the three Bs, shared some style when they wrote their composition.' I find this claim, without any reference, hard to understand. Bach, Beethoven and Brahms are from 3 different musical eras. How are these 3 composers more related than the others?
Quality of the research.
- Although the idea of using a hybrid deep learning system might be new, no justification as to why such a system should work better is presented in the paper.
- In the experiments, the authors compare the hybrid model to pure models. However, the pure models all have less layers than the hybrid model. Why didn't the authors compare same-depth models? I feel it would have made a much stronger point.
- Although the authors describe in details the theory behind SDAs and DBNs, there is little to no detail about the hyper-parameters used in the actual model (number of hidden units, number of unsupervised epochs, regularization, etc.). How was the data corrupted for the DA? White Noise, or random flipped bits? How many steps in the CD? These details would be important to reproduce the results.
- In the beginning of section 3 and 6, the authors mention that they think their model will project the data into a semantic space which is very sparse. How is your model learning a sparse representation? Have you used sparseness constraints in your training? If so, there is no mention of it in the paper.
|
anonymous reviewer 8eb9
| null | null |
{"id": "obqUAuHWC9mWc", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362137160000, "tmdate": 1362137160000, "ddate": null, "number": 2, "content": {"title": "review of Audio Artist Identification by Deep Neural Network", "review": "This paper present an application of an hybrid deep learning model to the task of audio artist identification.\r\n\r\nNovelty:\r\n+ The novelty of the paper comes from using an hybrid unsupervised learning approach by stacking Denoising Auto-Encoders (DA) and Restricted Boltzman Machines (RBM). \r\n= Another minor novelty is the application of deep learning to artist identification. However, deep learning has already been applied to similar tasks before such as genre recognition and automatic tag annotation.\r\n- Unfortunately, I found that the major contributions of the paper are not exposed clearly enough in the introduction.\r\n\r\nQuality of presentation:\r\n- The quality of the presentation leaves to be desired. A more careful proofreading would have been required. There are several sentences with gramatical errors. Several verbs or adjectives are wrong. The writing style is also sometimes inadequate for a scientific paper (ex. 'we will review some fantastic work', 'we can build many outstanding networks'). The quality of the english is, in general, inadequate.\r\n- The abstract does not present in a relevant and concise manner the essential points of the paper.\r\n- Also, there is a bit of confusion in between the introduction and related work sections, as most of the introduction is also about related work.\r\n\r\nReference to previous work:\r\n+ Previous related work coverage is good. Previous work in deep learning and its applications in MIR, as well as work in audio artist identification are well covered.\r\n- In the beginning of section 5: 'It's known that Bach, Beethoven and Brahms, known as the three Bs, shared some style when they wrote their composition.' I find this claim, without any reference, hard to understand. Bach, Beethoven and Brahms are from 3 different musical eras. How are these 3 composers more related than the others?\r\n\r\nQuality of the research.\r\n- Although the idea of using a hybrid deep learning system might be new, no justification as to why such a system should work better is presented in the paper.\r\n- In the experiments, the authors compare the hybrid model to pure models. However, the pure models all have less layers than the hybrid model. Why didn't the authors compare same-depth models? I feel it would have made a much stronger point.\r\n- Although the authors describe in details the theory behind SDAs and DBNs, there is little to no detail about the hyper-parameters used in the actual model (number of hidden units, number of unsupervised epochs, regularization, etc.). How was the data corrupted for the DA? White Noise, or random flipped bits? How many steps in the CD? These details would be important to reproduce the results.\r\n- In the beginning of section 3 and 6, the authors mention that they think their model will project the data into a semantic space which is very sparse. How is your model learning a sparse representation? Have you used sparseness constraints in your training? If so, there is no mention of it in the paper."}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzy0H3ZbWiHsS", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 8eb9"], "writers": ["anonymous"]}
|
{
"criticism": 9,
"example": 2,
"importance_and_relevance": 3,
"materials_and_methods": 13,
"praise": 4,
"presentation_and_reporting": 11,
"results_and_discussion": 1,
"suggestion_and_solution": 3,
"total": 35
}
| 1.314286
| -6.32441
| 7.638696
| 1.314286
| 0.034571
| 0
| 0.257143
| 0.057143
| 0.085714
| 0.371429
| 0.114286
| 0.314286
| 0.028571
| 0.085714
|
{
"criticism": 0.2571428571428571,
"example": 0.05714285714285714,
"importance_and_relevance": 0.08571428571428572,
"materials_and_methods": 0.37142857142857144,
"praise": 0.11428571428571428,
"presentation_and_reporting": 0.3142857142857143,
"results_and_discussion": 0.02857142857142857,
"suggestion_and_solution": 0.08571428571428572
}
| 1.314286
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
|||
zzy0H3ZbWiHsS
|
Audio Artist Identification by Deep Neural Network
|
Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.
|
胡振, Kun Fu, Changshui Zhang
|
Unknown
| 2,013
|
{"id": "zzy0H3ZbWiHsS", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358325000000, "tmdate": 1358325000000, "ddate": null, "number": 1, "content": {"decision": "reject", "title": "Audio Artist Identification by Deep Neural Network", "abstract": "Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.", "pdf": "https://arxiv.org/abs/1301.3195", "paperhash": "|audio_artist_identification_by_deep_neural_network", "keywords": [], "conflicts": [], "authors": ["\u80e1\u632f", "Kun Fu", "Changshui Zhang"], "authorids": ["eblis.hu@gmail.com", "Tsinghua Univ.", "Tsinghua Univ."]}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["eblis.hu@gmail.com"], "writers": []}
|
[Review]:
This paper describes work to collect a new dataset with music from 11 classical composers for the task of audio composer identification (although the title, abstract, and introduction use the phrase 'audio artist identification' which is a different task). It describes experiments training a few different deep neural networks to perform this classification task.
The paper is not very novel. It describes existing deep architectures applied to a new version of an existing dataset for an existing task.
The quality of the paper is not very high. The comparisons of the models were not systematic and because it is a new dataset, they cannot be compared directly to results on other datasets of existing models. There are very few specifics given about the models used (layer sizes, cost functions, input feature types, specific input features).
The use of mel frequency spectrum seems dubious for this task. What distinguishes classical works from different composers is generally harmonic and melodic content, which mel frequency spectrum ignores almost entirely.
Few details are given about the make-up of the new dataset. Are these orchestral pieces, chamber pieces, concertos, piano pieces, etc? How many clips came from each piece? How many clips came from each movement? The use of clips from different movements of the same piece in the training and test sets might account for the increase in accuracy scores relative to previous MIREX results. Movements from the same piece generally share many characteristics like recording conditions, production, instrumentation, and timbre, which are the main characteristics captured by mel frequency spectrum. They also generally share harmonic and melodic content.
And finally, the 'Three B's' that the authors refer to, Bach, Beethoven, and Brahms, are very different composers from different musical eras. Their works should not be easily confused with each other, and so the fact that the proposed algorithm does confuse them is concerning. Potentially it indicates the weakness of the mel spectrum for performing this task.
Pros:
- Literary presentation of the paper is high (although there are a number of strange word substitutions)
- Decent summary of existing work
- New dataset might be useful, if it is made public, although it is pretty small
Cons:
- Little novelty
- Un-systematic comparisons of systems
- Features don't make much sense
- Few details on actual systems compared and on the dataset
- Few generalizable conclusions
|
anonymous reviewer b7e1
| null | null |
{"id": "k3fr32tl6qARo", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362226800000, "tmdate": 1362226800000, "ddate": null, "number": 4, "content": {"title": "review of Audio Artist Identification by Deep Neural Network", "review": "This paper describes work to collect a new dataset with music from 11 classical composers for the task of audio composer identification (although the title, abstract, and introduction use the phrase 'audio artist identification' which is a different task). It describes experiments training a few different deep neural networks to perform this classification task.\r\n\r\nThe paper is not very novel. It describes existing deep architectures applied to a new version of an existing dataset for an existing task.\r\n\r\nThe quality of the paper is not very high. The comparisons of the models were not systematic and because it is a new dataset, they cannot be compared directly to results on other datasets of existing models. There are very few specifics given about the models used (layer sizes, cost functions, input feature types, specific input features).\r\n\r\nThe use of mel frequency spectrum seems dubious for this task. What distinguishes classical works from different composers is generally harmonic and melodic content, which mel frequency spectrum ignores almost entirely.\r\n\r\nFew details are given about the make-up of the new dataset. Are these orchestral pieces, chamber pieces, concertos, piano pieces, etc? How many clips came from each piece? How many clips came from each movement? The use of clips from different movements of the same piece in the training and test sets might account for the increase in accuracy scores relative to previous MIREX results. Movements from the same piece generally share many characteristics like recording conditions, production, instrumentation, and timbre, which are the main characteristics captured by mel frequency spectrum. They also generally share harmonic and melodic content.\r\n\r\nAnd finally, the 'Three B's' that the authors refer to, Bach, Beethoven, and Brahms, are very different composers from different musical eras. Their works should not be easily confused with each other, and so the fact that the proposed algorithm does confuse them is concerning. Potentially it indicates the weakness of the mel spectrum for performing this task.\r\n\r\nPros:\r\n- Literary presentation of the paper is high (although there are a number of strange word substitutions)\r\n- Decent summary of existing work\r\n- New dataset might be useful, if it is made public, although it is pretty small\r\n\r\nCons:\r\n- Little novelty\r\n- Un-systematic comparisons of systems\r\n- Features don't make much sense\r\n- Few details on actual systems compared and on the dataset\r\n- Few generalizable conclusions"}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzy0H3ZbWiHsS", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer b7e1"], "writers": ["anonymous"]}
|
{
"criticism": 6,
"example": 1,
"importance_and_relevance": 0,
"materials_and_methods": 10,
"praise": 0,
"presentation_and_reporting": 3,
"results_and_discussion": 3,
"suggestion_and_solution": 2,
"total": 20
}
| 1.25
| 0.476661
| 0.773339
| 1.25
| 0.0275
| 0
| 0.3
| 0.05
| 0
| 0.5
| 0
| 0.15
| 0.15
| 0.1
|
{
"criticism": 0.3,
"example": 0.05,
"importance_and_relevance": 0,
"materials_and_methods": 0.5,
"praise": 0,
"presentation_and_reporting": 0.15,
"results_and_discussion": 0.15,
"suggestion_and_solution": 0.1
}
| 1.25
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
|||
zzy0H3ZbWiHsS
|
Audio Artist Identification by Deep Neural Network
|
Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.
|
胡振, Kun Fu, Changshui Zhang
|
Unknown
| 2,013
|
{"id": "zzy0H3ZbWiHsS", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358325000000, "tmdate": 1358325000000, "ddate": null, "number": 1, "content": {"decision": "reject", "title": "Audio Artist Identification by Deep Neural Network", "abstract": "Since officially began in 2005, the annual Music Information Retrieval Evaluation eXchange (MIREX) has made great contributions to the Music Information Retrieval (MIR) research. By defining some important tasks and providing a meaningful comparison system, the International Music Information Retrieval Systems Evaluation Laboratory (IMIRSEL), organizer of the MIREX, drives researchers in the MIR field to develop more advanced system to fulfill the tasks. One of the important tasks is the Audio Artist Identification task, or the AAI task. We implemented a Deep Belief Network (DBN) to identify the artist by audio signal. As a matter of copyright, IMIRSEL didn't publish there data set and we had to construct our own. In our data set we got an accuracy of 69.87% without carefully choosing parameters while the best result reported on MIREX is 69.70%. We think our method is promising and we want to discuss with others.", "pdf": "https://arxiv.org/abs/1301.3195", "paperhash": "|audio_artist_identification_by_deep_neural_network", "keywords": [], "conflicts": [], "authors": ["\u80e1\u632f", "Kun Fu", "Changshui Zhang"], "authorids": ["eblis.hu@gmail.com", "Tsinghua Univ.", "Tsinghua Univ."]}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["eblis.hu@gmail.com"], "writers": []}
|
[Review]:
A brief summary of the paper’s contributions. In the context of prior work:
This paper builds a hybrid model based on Deep Belief Network (DBN) and Stacked Denoising Autoencoder (SDA) and applies it to Audio Artist Identification (AAI) task. Specifically, the proposed model is constructed with a two-layer SDA in the lower layers, a two-layer DBN in the middle, and a logistic regression classification layer on the top. The proposed model seems to achieve good classification performance.
An assessment of novelty and quality:
The paper proposes a hybrid deep network by stacking denoising autoencoders and RBMs.
Although this may be a new way of building a deep network, it seems to be a minor modification of the standard methods. Therefore, the novelty seems to be limited.
More importantly, motivation or justification about hybrid architecture is not clearly presented. Without a clear motivation or justification, this method doesn’t seem to be technically interesting. To make a fair comparison to other baseline methods, the SDA2-DBN2 should be compared to DBN4 or SDA4, but there are no such comparisons.
Although the classification performance by the proposed method is good, the results are not directly comparable to other work in the literature. It will be helpful to apply some widely used methods in authors’ data set as additional control experiments;
The paper isn’t well polished. There are many awkward sentences and grammatical errors.
Other comments:
Figure 2 is anecdotal and is not convincing enough.
Authors use some non-standard terminology. For example, what does “MAP paradigm” mean?
In Table 3, rows corresponding to “#DA layers”, “#RBM layers”, “#logistic layers” are unnecessary.
A list of pros and cons (reasons to accept/reject)
pros:
+ Literature review seems fine.
+ good (but incomplete) empirical classification results
cons:
- lack of clear motivation or justification of the hybrid method; lack of proper control experiments
- the results are not comparable to other published work
- unpolished writing (lots of awkward sentences and grammatical errors).
|
anonymous reviewer 589d
| null | null |
{"id": "Zg8fgYb5dAUiY", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362479820000, "tmdate": 1362479820000, "ddate": null, "number": 1, "content": {"title": "review of Audio Artist Identification by Deep Neural Network", "review": "A brief summary of the paper\u2019s contributions. In the context of prior work:\r\nThis paper builds a hybrid model based on Deep Belief Network (DBN) and Stacked Denoising Autoencoder (SDA) and applies it to Audio Artist Identification (AAI) task. Specifically, the proposed model is constructed with a two-layer SDA in the lower layers, a two-layer DBN in the middle, and a logistic regression classification layer on the top. The proposed model seems to achieve good classification performance.\r\n\r\n\r\nAn assessment of novelty and quality:\r\nThe paper proposes a hybrid deep network by stacking denoising autoencoders and RBMs.\r\nAlthough this may be a new way of building a deep network, it seems to be a minor modification of the standard methods. Therefore, the novelty seems to be limited.\r\n\r\nMore importantly, motivation or justification about hybrid architecture is not clearly presented. Without a clear motivation or justification, this method doesn\u2019t seem to be technically interesting. To make a fair comparison to other baseline methods, the SDA2-DBN2 should be compared to DBN4 or SDA4, but there are no such comparisons.\r\n\r\nAlthough the classification performance by the proposed method is good, the results are not directly comparable to other work in the literature. It will be helpful to apply some widely used methods in authors\u2019 data set as additional control experiments;\r\n\r\nThe paper isn\u2019t well polished. There are many awkward sentences and grammatical errors.\r\n\r\n\r\nOther comments:\r\nFigure 2 is anecdotal and is not convincing enough.\r\n\r\nAuthors use some non-standard terminology. For example, what does \u201cMAP paradigm\u201d mean?\r\n\r\nIn Table 3, rows corresponding to \u201c#DA layers\u201d, \u201c#RBM layers\u201d, \u201c#logistic layers\u201d are unnecessary.\r\n\r\n\r\n\r\nA list of pros and cons (reasons to accept/reject)\r\n\r\npros:\r\n+ Literature review seems fine.\r\n+ good (but incomplete) empirical classification results\r\n\r\ncons:\r\n- lack of clear motivation or justification of the hybrid method; lack of proper control experiments\r\n- the results are not comparable to other published work\r\n- unpolished writing (lots of awkward sentences and grammatical errors)."}, "forum": "zzy0H3ZbWiHsS", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzy0H3ZbWiHsS", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 589d"], "writers": ["anonymous"]}
|
{
"criticism": 11,
"example": 3,
"importance_and_relevance": 3,
"materials_and_methods": 11,
"praise": 3,
"presentation_and_reporting": 4,
"results_and_discussion": 3,
"suggestion_and_solution": 4,
"total": 19
}
| 2.210526
| 1.642359
| 0.568167
| 2.210526
| 0.069474
| 0
| 0.578947
| 0.157895
| 0.157895
| 0.578947
| 0.157895
| 0.210526
| 0.157895
| 0.210526
|
{
"criticism": 0.5789473684210527,
"example": 0.15789473684210525,
"importance_and_relevance": 0.15789473684210525,
"materials_and_methods": 0.5789473684210527,
"praise": 0.15789473684210525,
"presentation_and_reporting": 0.21052631578947367,
"results_and_discussion": 0.15789473684210525,
"suggestion_and_solution": 0.21052631578947367
}
| 2.210526
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
|||
zzKhQhsTYlzAZ
|
Regularized Discriminant Embedding for Visual Descriptor Learning
|
Images can vary according to changes in viewpoint, resolution, noise, and illumination. In this paper, we aim to learn representations for an image, which are robust to wide changes in such environmental conditions, using training pairs of matching and non-matching local image patches that are collected under various environmental conditions. We present a regularized discriminant analysis that emphasizes two challenging categories among the given training pairs: (1) matching, but far apart pairs and (2) non-matching, but close pairs in the original feature space (e.g., SIFT feature space). Compared to existing work on metric learning and discriminant analysis, our method can better distinguish relevant images from irrelevant, but look-alike images.
|
Regularized Discriminant Embedding for Visual
Descriptor Learning
Kye-Hyeon Kim,a Rui Cai,b Lei Zhang,b Seungjin Choia∗
a Department of Computer Science, POSTECH, Pohang 790-784, Korea
b Microsoft Research Asia, Beijing 100080, China
fenrir@postech.ac.kr, {ruicai, leizhang}@microsoft.com,
seungjin@postech.ac.kr
Abstract
Images can vary according to changes in viewpoint, resolution, noise, and illu-
mination. In this paper, we aim to learn representations for an image, which are
robust to wide changes in such environmental conditions, using training pairs of
matching and non-matching local image patches that are collected under various
environmental conditions. We present a regularized discriminant analysis that em-
phasizes two challenging categories among the given training pairs: (1) matching,
but far apart pairs and (2) non-matching, but close pairs in the original feature
space (e.g., SIFT feature space). Compared to existing work on metric learning
and discriminant analysis, our method can better distinguish relevant images from
irrelevant, but look-alike images.
1 Introduction
In many computer vision problems, images are compared using their local descriptors. A local
descriptor is a feature vector, representing characteristics of an interesting local partin an image.
Scale-invariant feature transform (SIFT) [2] is popularly used for extracting interesting parts and
their local descriptors from an image. Then comparing two images is done by aggregating pairs
between each local descriptor in one image and its closest local descriptor in another image, whose
pairwise distances are below some threshold. The assumption behind this procedure is that local
descriptors corresponding to the same local part (“matching descriptors”) are usually close enough
in the feature space, whereas local descriptors belonging to different local parts (“non-matching
descriptors”) are far apart.
However, this assumption does not hold when there are significant changes in environmental condi-
tions (e.g., viewpoint, illumination, noise, and resolution) between two images. For the same local
part, varying environment conditions can yield varying local image patches, leading to matching
descriptors far apartin the feature space. On the other hand, for different local parts, their image
patches can look similar to each other in some environmental conditions, leading to non-matching
descriptors close together. Fig. 1 shows some examples: in each triplet, the first two image patches
belong to the same local part but captured under different environment conditions, while the third
patch belongs to a different part but looks similar to the second one, resulting that the SIFT descrip-
tors between non-matching local parts are closer than those between matching parts. Consequently,
comparing two images using their local descriptors cannot be done correctly when their are signifi-
cant differences in environmental conditions between the images. Fig. 2(a) shows the cases.
In this paper, we address this problem by learning more robust representations for local image
patches where matching parts are more similar together than non-matching parts even under widely
varying environmental conditions.
∗The full version of this manuscript is currently under review in an international journal.
1
arXiv:1301.3644v1 [cs.CV] 16 Jan 2013
SIFT: 304
LDE: 336
Ours: 360
SIFT: 213
LDE: 268
Ours: 295
SIFT: 268
LDE: 283
Ours: 301
231
275
425
SIFT: 336
LDE: 371
Ours: 362
>
>
<
246
314
372
>
≈
<
199
264
388
SIFT: 267
LDE: 240
Ours: 257
>
<
<
257
319
405
>
<
<
232
291
335
SIFT: 290
LDE: 305
Ours: 349
>
>
<
221
278
365
>
>
<
Figure 1: Some examples where a local part (center in each triplet) is closer to a non-matching part
(right) than a matching part (left) in terms of the Euclidean distances between their SIFT descriptors.
Using linear discriminant embedding (LDE) [1], non-matching pairs are still closer than matching
pairs in the first three examples. Compared to existing work on metric learning and discriminant
analysis, our learning method focuses more on “far but matching” and “close but non-matching”
training pairs, so that can distinguish look-alike irrelevant parts successfully.
(a) 15 closest SIFT pairs
(b) 15 closest RDE pairs
Figure 2: (a) When two images of the same scene are captured under considerably different con-
ditions, many irrelevant pairs of local parts are chosen as closest pairs in the local feature space,
which may lead to undesirable results of comparison. (b) In our RDE space, matching pairs are
successfully chosen as closest pairs.
2 Proposed Method
In descriptor learning [1, 3], a projection is obtained from training pairs of matching and non-
matching descriptors in order to map given local descriptors (e.g., SIFT) to a new feature space
where matching descriptors are closer to each other and non-matching descriptors are farther from
each other. Traditional techniques for supervised dimensionality reduction, including linear discrim-
inant analysis (LDA) and local Fisher discriminant analysis (LFDA) [4], can be applied to descriptor
learning after a slight modification. For example, linear discriminant embedding (LDE) [1] is come
from LDA with a simple modification for handling pairwise training data.
We propose a regularized learning framework in order to further emphasize (1) matching, but far
apart pairs and (2) non-matching, but look-alike pairs, under wide environmental conditions. First,
we divide given training pairs of local descriptors into four subsets, Relevant-Near (Rel-Near),
Relevant-Far (Rel-Far), Irrelevant-Near (Irr-Near), and Irrelevant-Far (Irr-Far). For example, the
“Irr-Near” subset consists of irrelevant (i.e., non-matching), but near pairs. We define an irrelevant
pair (xi,xj) as “near” ifxi is one of the knearest descriptors1 among all non-matching descriptors
of xj or vice versa. Similarly, a relevant pair (xi,xj) is called “near” if xi is one of knearest de-
scriptors among all matching descriptors of xj. All the other pairs belong to “Irr-Far” or “Rel-Far”.
Then we seek a linear projection T that maximizes the following regularized ratio:
J(T) =
βIN
∑
(i,j)∈PIN
dij(T) +βIF
∑
(i,j)∈PIF
dij(T)
βRN
∑
(i,j)∈PRN
dij(T) +βRF
∑
(i,j)∈PRF
dij(T) , (1)
1In our experiments, setting 1 ≤ k ≤ 10 achieved a reasonable performance improvement.
2
−1 −0.5 0 0.5 1
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
LDE
LFDA
RDE
(a)
−1 −0.5 0 0.5 1
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
LDE
LFDA
RDE (b)
Figure 3: Toy examples of projections learned by LDE, LFDA, and our RDE.
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 15.58%
Err (RFar vs INear) = 29.92%
RelNear
IrrFar
IrrNear
RelFar
(a) SIFT feature space
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 13.99%
Err (RFar vs INear) = 27.00%
RelNear
IrrFar
IrrNear
RelFar (b) LDE feature space
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 8.34%
Err (RFar vs INear) = 16.30%
RelNear
IrrFar
IrrNear
RelFar (c) Our RDE feature space
Figure 4: Distribution of Euclidean distance in a given feature space for each subset of pairs. Err
(Rel vs Irr)measures the proportion of overlapping region between {Rel-Near, Rel-Far}and {Irr-
Near, Irr-Far}, while Err (RFar vs INear)measures the overlap between Rel-Far and Irr-Near. In
our RDE space, non-matching pairs are well distinguished from matching pairs.
where dij(T) denotes the squared distance ||T(xi −xj)||2 between two local descriptors xi and xj
in the projected space, and PRN ,PRF ,PIN ,PIF denote the subsets of Rel-Near, Rel-Far, Irr-Near,
and Irr-Far, respectively. Four regularization constantsβRN ,βRF ,βIN ,βIF control the importance
of each subset.
• In LDE, all pairs are equally important, i.e., βRN = βRF = βIN = βIF = 1.
• In LFDA , “near” pairs are more important, i.e.,βRN ≫βRF and βIN ≫βIF .
• In our method, we propose to emphasize Rel-Far (matching but far apart) and Irr-Near
(non-matching but close) pairs, i.e., βRN ≪βRF and βIN ≫βIF .
Fig. 3 shows when and why our method can better distinguish Irr-Near pairs from Rel-Far pairs.
In Fig. 3(a), the global intra-class distribution forms a diagonal, while each local cluster has no
meaningful direction of scattering. Since LFDA focuses on “near” pairs, it cannot capture the true
intra-class scatter well, leading to the undesirable projection. In Fig. 3(b), LDE obtains a projection
that maximizes the inter-class variance, but the shape of the class boundary cannot be considered
well, leading to an overlap between two classes. In this case, focusing more on Irr-Near pairs (i.e.,
the pairs of opposite clusters near the class boundary) can preserve the separability of classes.
Fig. 4 shows the distance distribution of local descriptors, where 20,000 pairs of each subset are
randomly chosen from 500,000 local patches of Flickr images. As shown in Fig. 4(a), Rel-Near
and Irr-Far pairs are already well separated in the SIFT space, but Rel-Far and Irr-Near pairs are
not distinguished well ( ∼30% overlapped) and many Rel-Far pairs lie farther than Irr-Near pairs.
Learning by LDE can achieve only a marginal improvement (Fig. 4(b)). By contrast, our RDE
achieves a significant improvement in the separability between matching and non-matching pairs,
especially two challenging subsets, Rel-Far and Irr-Near (Fig. 4(c)). Fig. 1 and 2 also show the
superiority of our method over the existing work.
3
References
[1] G. Hua, M. Brown, and S. Winder, “Discriminant embedding for local image descriptors,” in Proceedings
of the International Conference on Computer Vision (ICCV), 2007, pp. 1–8.
[2] D. G. Lowe, “Object recognition from local scale-invariant features,” in Proceedings of the International
Conference on Computer Vision (ICCV), 1999, pp. 1150–1157.
[3] J. Philbin, M. Isard, J. Sivic, and A. Zisserman, “Descriptor learning for efficient retrieval,” inProceedings
of the European Conference on Computer Vision (ECCV), 2010, pp. 677–691.
[4] M. Sugiyama, “Dimensionality reduction of multimodal labeled data by local Fisher discriminant analysis,”
Journal of Machine Learning Research, vol. 5, pp. 1027–1061, 2007.
4
|
Kye-Hyeon Kim, Rui Cai, Lei Zhang, Seungjin Choi
|
Unknown
| 2,013
|
{"id": "zzKhQhsTYlzAZ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358487000000, "tmdate": 1358487000000, "ddate": null, "number": 18, "content": {"title": "Regularized Discriminant Embedding for Visual Descriptor Learning", "decision": "conferencePoster-iclr2013-workshop", "abstract": "Images can vary according to changes in viewpoint, resolution, noise, and illumination. In this paper, we aim to learn representations for an image, which are robust to wide changes in such environmental conditions, using training pairs of matching and non-matching local image patches that are collected under various environmental conditions. We present a regularized discriminant analysis that emphasizes two challenging categories among the given training pairs: (1) matching, but far apart pairs and (2) non-matching, but close pairs in the original feature space (e.g., SIFT feature space). Compared to existing work on metric learning and discriminant analysis, our method can better distinguish relevant images from irrelevant, but look-alike images.", "pdf": "https://arxiv.org/abs/1301.3644", "paperhash": "kim|regularized_discriminant_embedding_for_visual_descriptor_learning", "keywords": [], "conflicts": [], "authors": ["Kye-Hyeon Kim", "Rui Cai", "Lei Zhang", "Seungjin Choi"], "authorids": ["vapnik.chervonenkis@gmail.com", "ruicai@microsoft.com", "leizhang@microsoft.com", "seungjin.choi.mlg@gmail.com"]}, "forum": "zzKhQhsTYlzAZ", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vapnik.chervonenkis@gmail.com"], "writers": []}
|
[Review]:
We sincerely appreciate all the reviewers for their time and comments to this manuscript.
We fully agree that it is really hard to find maningful contributions from this short paper, while we tried our best to emphasize them. As we have noted, the full version of this manuscript is currently under review in an international journal. In order to avoid violating the dual-submission policy of the journal, we could not include most of the details and empirical results - only the main idea and some simple examples could be remained in this workshop track submission.
We promise that all the details omitted in this version will be presented clearly in the workshop, e.g., the choice of the weighting of each split, the training dataset used in our experiments, and conclusive empirical comparisons.
For example, we compared the image retrieval performance for landmark buildings in Oxford (http://www.robots.ox.ac.uk/~vgg/data/oxbuildings/) and Paris (http://www.robots.ox.ac.uk/~vgg/data/parisbuildings/). A nonlinear variant of LFDA implemented using deep belief networks (DBN) and a kernelized version of LDE (KDE) were compared to our method. In terms of the mean average precision (mAP) score, we observed significant improvements using our method (mAP: 0.678 on Oxford / 0.700 on Paris) over raw SIFT (0.611 / 0.649), KDE (0.656 / 0.673), DBN (0.662 / 0.678), under the same number of the learned features and the same size of visual vocabulary.
Thanks to all the reviewers again.
|
Kye-Hyeon Kim, Rui Cai, Lei Zhang, Seungjin Choi
| null | null |
{"id": "Xf5Pf5SWhtEYT", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363779180000, "tmdate": 1363779180000, "ddate": null, "number": 3, "content": {"title": "", "review": "We sincerely appreciate all the reviewers for their time and comments to this manuscript.\r\nWe fully agree that it is really hard to find maningful contributions from this short paper, while we tried our best to emphasize them. As we have noted, the full version of this manuscript is currently under review in an international journal. In order to avoid violating the dual-submission policy of the journal, we could not include most of the details and empirical results - only the main idea and some simple examples could be remained in this workshop track submission.\r\n\r\nWe promise that all the details omitted in this version will be presented clearly in the workshop, e.g., the choice of the weighting of each split, the training dataset used in our experiments, and conclusive empirical comparisons.\r\nFor example, we compared the image retrieval performance for landmark buildings in Oxford (http://www.robots.ox.ac.uk/~vgg/data/oxbuildings/) and Paris (http://www.robots.ox.ac.uk/~vgg/data/parisbuildings/). A nonlinear variant of LFDA implemented using deep belief networks (DBN) and a kernelized version of LDE (KDE) were compared to our method. In terms of the mean average precision (mAP) score, we observed significant improvements using our method (mAP: 0.678 on Oxford / 0.700 on Paris) over raw SIFT (0.611 / 0.649), KDE (0.656 / 0.673), DBN (0.662 / 0.678), under the same number of the learned features and the same size of visual vocabulary.\r\n\r\nThanks to all the reviewers again."}, "forum": "zzKhQhsTYlzAZ", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzKhQhsTYlzAZ", "readers": ["everyone"], "nonreaders": [], "signatures": ["Kye-Hyeon Kim, Rui Cai, Lei Zhang, Seungjin Choi"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 4,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 2,
"suggestion_and_solution": 1,
"total": 9
}
| 1.222222
| 0.969703
| 0.252519
| 1.273886
| 0.487922
| 0.051663
| 0
| 0
| 0.111111
| 0.444444
| 0.222222
| 0.111111
| 0.222222
| 0.111111
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0.1111111111111111,
"materials_and_methods": 0.4444444444444444,
"praise": 0.2222222222222222,
"presentation_and_reporting": 0.1111111111111111,
"results_and_discussion": 0.2222222222222222,
"suggestion_and_solution": 0.1111111111111111
}
| 1.222222
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
zzKhQhsTYlzAZ
|
Regularized Discriminant Embedding for Visual Descriptor Learning
|
Images can vary according to changes in viewpoint, resolution, noise, and illumination. In this paper, we aim to learn representations for an image, which are robust to wide changes in such environmental conditions, using training pairs of matching and non-matching local image patches that are collected under various environmental conditions. We present a regularized discriminant analysis that emphasizes two challenging categories among the given training pairs: (1) matching, but far apart pairs and (2) non-matching, but close pairs in the original feature space (e.g., SIFT feature space). Compared to existing work on metric learning and discriminant analysis, our method can better distinguish relevant images from irrelevant, but look-alike images.
|
Regularized Discriminant Embedding for Visual
Descriptor Learning
Kye-Hyeon Kim,a Rui Cai,b Lei Zhang,b Seungjin Choia∗
a Department of Computer Science, POSTECH, Pohang 790-784, Korea
b Microsoft Research Asia, Beijing 100080, China
fenrir@postech.ac.kr, {ruicai, leizhang}@microsoft.com,
seungjin@postech.ac.kr
Abstract
Images can vary according to changes in viewpoint, resolution, noise, and illu-
mination. In this paper, we aim to learn representations for an image, which are
robust to wide changes in such environmental conditions, using training pairs of
matching and non-matching local image patches that are collected under various
environmental conditions. We present a regularized discriminant analysis that em-
phasizes two challenging categories among the given training pairs: (1) matching,
but far apart pairs and (2) non-matching, but close pairs in the original feature
space (e.g., SIFT feature space). Compared to existing work on metric learning
and discriminant analysis, our method can better distinguish relevant images from
irrelevant, but look-alike images.
1 Introduction
In many computer vision problems, images are compared using their local descriptors. A local
descriptor is a feature vector, representing characteristics of an interesting local partin an image.
Scale-invariant feature transform (SIFT) [2] is popularly used for extracting interesting parts and
their local descriptors from an image. Then comparing two images is done by aggregating pairs
between each local descriptor in one image and its closest local descriptor in another image, whose
pairwise distances are below some threshold. The assumption behind this procedure is that local
descriptors corresponding to the same local part (“matching descriptors”) are usually close enough
in the feature space, whereas local descriptors belonging to different local parts (“non-matching
descriptors”) are far apart.
However, this assumption does not hold when there are significant changes in environmental condi-
tions (e.g., viewpoint, illumination, noise, and resolution) between two images. For the same local
part, varying environment conditions can yield varying local image patches, leading to matching
descriptors far apartin the feature space. On the other hand, for different local parts, their image
patches can look similar to each other in some environmental conditions, leading to non-matching
descriptors close together. Fig. 1 shows some examples: in each triplet, the first two image patches
belong to the same local part but captured under different environment conditions, while the third
patch belongs to a different part but looks similar to the second one, resulting that the SIFT descrip-
tors between non-matching local parts are closer than those between matching parts. Consequently,
comparing two images using their local descriptors cannot be done correctly when their are signifi-
cant differences in environmental conditions between the images. Fig. 2(a) shows the cases.
In this paper, we address this problem by learning more robust representations for local image
patches where matching parts are more similar together than non-matching parts even under widely
varying environmental conditions.
∗The full version of this manuscript is currently under review in an international journal.
1
arXiv:1301.3644v1 [cs.CV] 16 Jan 2013
SIFT: 304
LDE: 336
Ours: 360
SIFT: 213
LDE: 268
Ours: 295
SIFT: 268
LDE: 283
Ours: 301
231
275
425
SIFT: 336
LDE: 371
Ours: 362
>
>
<
246
314
372
>
≈
<
199
264
388
SIFT: 267
LDE: 240
Ours: 257
>
<
<
257
319
405
>
<
<
232
291
335
SIFT: 290
LDE: 305
Ours: 349
>
>
<
221
278
365
>
>
<
Figure 1: Some examples where a local part (center in each triplet) is closer to a non-matching part
(right) than a matching part (left) in terms of the Euclidean distances between their SIFT descriptors.
Using linear discriminant embedding (LDE) [1], non-matching pairs are still closer than matching
pairs in the first three examples. Compared to existing work on metric learning and discriminant
analysis, our learning method focuses more on “far but matching” and “close but non-matching”
training pairs, so that can distinguish look-alike irrelevant parts successfully.
(a) 15 closest SIFT pairs
(b) 15 closest RDE pairs
Figure 2: (a) When two images of the same scene are captured under considerably different con-
ditions, many irrelevant pairs of local parts are chosen as closest pairs in the local feature space,
which may lead to undesirable results of comparison. (b) In our RDE space, matching pairs are
successfully chosen as closest pairs.
2 Proposed Method
In descriptor learning [1, 3], a projection is obtained from training pairs of matching and non-
matching descriptors in order to map given local descriptors (e.g., SIFT) to a new feature space
where matching descriptors are closer to each other and non-matching descriptors are farther from
each other. Traditional techniques for supervised dimensionality reduction, including linear discrim-
inant analysis (LDA) and local Fisher discriminant analysis (LFDA) [4], can be applied to descriptor
learning after a slight modification. For example, linear discriminant embedding (LDE) [1] is come
from LDA with a simple modification for handling pairwise training data.
We propose a regularized learning framework in order to further emphasize (1) matching, but far
apart pairs and (2) non-matching, but look-alike pairs, under wide environmental conditions. First,
we divide given training pairs of local descriptors into four subsets, Relevant-Near (Rel-Near),
Relevant-Far (Rel-Far), Irrelevant-Near (Irr-Near), and Irrelevant-Far (Irr-Far). For example, the
“Irr-Near” subset consists of irrelevant (i.e., non-matching), but near pairs. We define an irrelevant
pair (xi,xj) as “near” ifxi is one of the knearest descriptors1 among all non-matching descriptors
of xj or vice versa. Similarly, a relevant pair (xi,xj) is called “near” if xi is one of knearest de-
scriptors among all matching descriptors of xj. All the other pairs belong to “Irr-Far” or “Rel-Far”.
Then we seek a linear projection T that maximizes the following regularized ratio:
J(T) =
βIN
∑
(i,j)∈PIN
dij(T) +βIF
∑
(i,j)∈PIF
dij(T)
βRN
∑
(i,j)∈PRN
dij(T) +βRF
∑
(i,j)∈PRF
dij(T) , (1)
1In our experiments, setting 1 ≤ k ≤ 10 achieved a reasonable performance improvement.
2
−1 −0.5 0 0.5 1
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
LDE
LFDA
RDE
(a)
−1 −0.5 0 0.5 1
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
LDE
LFDA
RDE (b)
Figure 3: Toy examples of projections learned by LDE, LFDA, and our RDE.
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 15.58%
Err (RFar vs INear) = 29.92%
RelNear
IrrFar
IrrNear
RelFar
(a) SIFT feature space
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 13.99%
Err (RFar vs INear) = 27.00%
RelNear
IrrFar
IrrNear
RelFar (b) LDE feature space
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 8.34%
Err (RFar vs INear) = 16.30%
RelNear
IrrFar
IrrNear
RelFar (c) Our RDE feature space
Figure 4: Distribution of Euclidean distance in a given feature space for each subset of pairs. Err
(Rel vs Irr)measures the proportion of overlapping region between {Rel-Near, Rel-Far}and {Irr-
Near, Irr-Far}, while Err (RFar vs INear)measures the overlap between Rel-Far and Irr-Near. In
our RDE space, non-matching pairs are well distinguished from matching pairs.
where dij(T) denotes the squared distance ||T(xi −xj)||2 between two local descriptors xi and xj
in the projected space, and PRN ,PRF ,PIN ,PIF denote the subsets of Rel-Near, Rel-Far, Irr-Near,
and Irr-Far, respectively. Four regularization constantsβRN ,βRF ,βIN ,βIF control the importance
of each subset.
• In LDE, all pairs are equally important, i.e., βRN = βRF = βIN = βIF = 1.
• In LFDA , “near” pairs are more important, i.e.,βRN ≫βRF and βIN ≫βIF .
• In our method, we propose to emphasize Rel-Far (matching but far apart) and Irr-Near
(non-matching but close) pairs, i.e., βRN ≪βRF and βIN ≫βIF .
Fig. 3 shows when and why our method can better distinguish Irr-Near pairs from Rel-Far pairs.
In Fig. 3(a), the global intra-class distribution forms a diagonal, while each local cluster has no
meaningful direction of scattering. Since LFDA focuses on “near” pairs, it cannot capture the true
intra-class scatter well, leading to the undesirable projection. In Fig. 3(b), LDE obtains a projection
that maximizes the inter-class variance, but the shape of the class boundary cannot be considered
well, leading to an overlap between two classes. In this case, focusing more on Irr-Near pairs (i.e.,
the pairs of opposite clusters near the class boundary) can preserve the separability of classes.
Fig. 4 shows the distance distribution of local descriptors, where 20,000 pairs of each subset are
randomly chosen from 500,000 local patches of Flickr images. As shown in Fig. 4(a), Rel-Near
and Irr-Far pairs are already well separated in the SIFT space, but Rel-Far and Irr-Near pairs are
not distinguished well ( ∼30% overlapped) and many Rel-Far pairs lie farther than Irr-Near pairs.
Learning by LDE can achieve only a marginal improvement (Fig. 4(b)). By contrast, our RDE
achieves a significant improvement in the separability between matching and non-matching pairs,
especially two challenging subsets, Rel-Far and Irr-Near (Fig. 4(c)). Fig. 1 and 2 also show the
superiority of our method over the existing work.
3
References
[1] G. Hua, M. Brown, and S. Winder, “Discriminant embedding for local image descriptors,” in Proceedings
of the International Conference on Computer Vision (ICCV), 2007, pp. 1–8.
[2] D. G. Lowe, “Object recognition from local scale-invariant features,” in Proceedings of the International
Conference on Computer Vision (ICCV), 1999, pp. 1150–1157.
[3] J. Philbin, M. Isard, J. Sivic, and A. Zisserman, “Descriptor learning for efficient retrieval,” inProceedings
of the European Conference on Computer Vision (ECCV), 2010, pp. 677–691.
[4] M. Sugiyama, “Dimensionality reduction of multimodal labeled data by local Fisher discriminant analysis,”
Journal of Machine Learning Research, vol. 5, pp. 1027–1061, 2007.
4
|
Kye-Hyeon Kim, Rui Cai, Lei Zhang, Seungjin Choi
|
Unknown
| 2,013
|
{"id": "zzKhQhsTYlzAZ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358487000000, "tmdate": 1358487000000, "ddate": null, "number": 18, "content": {"title": "Regularized Discriminant Embedding for Visual Descriptor Learning", "decision": "conferencePoster-iclr2013-workshop", "abstract": "Images can vary according to changes in viewpoint, resolution, noise, and illumination. In this paper, we aim to learn representations for an image, which are robust to wide changes in such environmental conditions, using training pairs of matching and non-matching local image patches that are collected under various environmental conditions. We present a regularized discriminant analysis that emphasizes two challenging categories among the given training pairs: (1) matching, but far apart pairs and (2) non-matching, but close pairs in the original feature space (e.g., SIFT feature space). Compared to existing work on metric learning and discriminant analysis, our method can better distinguish relevant images from irrelevant, but look-alike images.", "pdf": "https://arxiv.org/abs/1301.3644", "paperhash": "kim|regularized_discriminant_embedding_for_visual_descriptor_learning", "keywords": [], "conflicts": [], "authors": ["Kye-Hyeon Kim", "Rui Cai", "Lei Zhang", "Seungjin Choi"], "authorids": ["vapnik.chervonenkis@gmail.com", "ruicai@microsoft.com", "leizhang@microsoft.com", "seungjin.choi.mlg@gmail.com"]}, "forum": "zzKhQhsTYlzAZ", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vapnik.chervonenkis@gmail.com"], "writers": []}
|
[Review]:
The paper aims to present a method for discriminant analysis for image
descriptors. The formulation splits a given dataset of labeled images
into 4 categories, Relevant/Irrelevant and Near/Far pairs
(RN,RF,IN,IF). The final form of the objective aims to maximize the
ratio of sum of distances of irrelevant pairs divided by relevant pairs. The distance metric is calculated at the lower dimensional projected space. The
main contribution of this work as suggested in the paper is selecting
the weighting of 4 splits differently from previous work.
The main intuition or reasoning behind this choice is not given,
neither any conclusive emprical evidence. In the only experiment that
contains real images in the paper, data is said to be taken from
Flickr. However, it is not clear if this is a publicly available
dataset or some random images that authors collected. Moreover, for
this experiment, one of the only two relevant methods are not included
for comparison. Neither, any details of the training procedure nor the actual hyper parameters (eta) are explained in the paper.
|
anonymous reviewer 1e7c
| null | null |
{"id": "FBx7CpGZiEA32", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362287940000, "tmdate": 1362287940000, "ddate": null, "number": 1, "content": {"title": "review of Regularized Discriminant Embedding for Visual Descriptor Learning", "review": "The paper aims to present a method for discriminant analysis for image\r\ndescriptors. The formulation splits a given dataset of labeled images\r\ninto 4 categories, Relevant/Irrelevant and Near/Far pairs\r\n(RN,RF,IN,IF). The final form of the objective aims to maximize the\r\nratio of sum of distances of irrelevant pairs divided by relevant pairs. The distance metric is calculated at the lower dimensional projected space. The\r\nmain contribution of this work as suggested in the paper is selecting\r\nthe weighting of 4 splits differently from previous work.\r\n\r\nThe main intuition or reasoning behind this choice is not given,\r\nneither any conclusive emprical evidence. In the only experiment that\r\ncontains real images in the paper, data is said to be taken from\r\nFlickr. However, it is not clear if this is a publicly available\r\ndataset or some random images that authors collected. Moreover, for\r\nthis experiment, one of the only two relevant methods are not included\r\nfor comparison. Neither, any details of the training procedure nor the actual hyper parameters (\beta) are explained in the paper."}, "forum": "zzKhQhsTYlzAZ", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzKhQhsTYlzAZ", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 1e7c"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 9,
"praise": 0,
"presentation_and_reporting": 3,
"results_and_discussion": 2,
"suggestion_and_solution": 0,
"total": 10
}
| 1.7
| 1.557958
| 0.142042
| 1.743967
| 0.408195
| 0.043967
| 0.2
| 0
| 0.1
| 0.9
| 0
| 0.3
| 0.2
| 0
|
{
"criticism": 0.2,
"example": 0,
"importance_and_relevance": 0.1,
"materials_and_methods": 0.9,
"praise": 0,
"presentation_and_reporting": 0.3,
"results_and_discussion": 0.2,
"suggestion_and_solution": 0
}
| 1.7
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
zzKhQhsTYlzAZ
|
Regularized Discriminant Embedding for Visual Descriptor Learning
|
Images can vary according to changes in viewpoint, resolution, noise, and illumination. In this paper, we aim to learn representations for an image, which are robust to wide changes in such environmental conditions, using training pairs of matching and non-matching local image patches that are collected under various environmental conditions. We present a regularized discriminant analysis that emphasizes two challenging categories among the given training pairs: (1) matching, but far apart pairs and (2) non-matching, but close pairs in the original feature space (e.g., SIFT feature space). Compared to existing work on metric learning and discriminant analysis, our method can better distinguish relevant images from irrelevant, but look-alike images.
|
Regularized Discriminant Embedding for Visual
Descriptor Learning
Kye-Hyeon Kim,a Rui Cai,b Lei Zhang,b Seungjin Choia∗
a Department of Computer Science, POSTECH, Pohang 790-784, Korea
b Microsoft Research Asia, Beijing 100080, China
fenrir@postech.ac.kr, {ruicai, leizhang}@microsoft.com,
seungjin@postech.ac.kr
Abstract
Images can vary according to changes in viewpoint, resolution, noise, and illu-
mination. In this paper, we aim to learn representations for an image, which are
robust to wide changes in such environmental conditions, using training pairs of
matching and non-matching local image patches that are collected under various
environmental conditions. We present a regularized discriminant analysis that em-
phasizes two challenging categories among the given training pairs: (1) matching,
but far apart pairs and (2) non-matching, but close pairs in the original feature
space (e.g., SIFT feature space). Compared to existing work on metric learning
and discriminant analysis, our method can better distinguish relevant images from
irrelevant, but look-alike images.
1 Introduction
In many computer vision problems, images are compared using their local descriptors. A local
descriptor is a feature vector, representing characteristics of an interesting local partin an image.
Scale-invariant feature transform (SIFT) [2] is popularly used for extracting interesting parts and
their local descriptors from an image. Then comparing two images is done by aggregating pairs
between each local descriptor in one image and its closest local descriptor in another image, whose
pairwise distances are below some threshold. The assumption behind this procedure is that local
descriptors corresponding to the same local part (“matching descriptors”) are usually close enough
in the feature space, whereas local descriptors belonging to different local parts (“non-matching
descriptors”) are far apart.
However, this assumption does not hold when there are significant changes in environmental condi-
tions (e.g., viewpoint, illumination, noise, and resolution) between two images. For the same local
part, varying environment conditions can yield varying local image patches, leading to matching
descriptors far apartin the feature space. On the other hand, for different local parts, their image
patches can look similar to each other in some environmental conditions, leading to non-matching
descriptors close together. Fig. 1 shows some examples: in each triplet, the first two image patches
belong to the same local part but captured under different environment conditions, while the third
patch belongs to a different part but looks similar to the second one, resulting that the SIFT descrip-
tors between non-matching local parts are closer than those between matching parts. Consequently,
comparing two images using their local descriptors cannot be done correctly when their are signifi-
cant differences in environmental conditions between the images. Fig. 2(a) shows the cases.
In this paper, we address this problem by learning more robust representations for local image
patches where matching parts are more similar together than non-matching parts even under widely
varying environmental conditions.
∗The full version of this manuscript is currently under review in an international journal.
1
arXiv:1301.3644v1 [cs.CV] 16 Jan 2013
SIFT: 304
LDE: 336
Ours: 360
SIFT: 213
LDE: 268
Ours: 295
SIFT: 268
LDE: 283
Ours: 301
231
275
425
SIFT: 336
LDE: 371
Ours: 362
>
>
<
246
314
372
>
≈
<
199
264
388
SIFT: 267
LDE: 240
Ours: 257
>
<
<
257
319
405
>
<
<
232
291
335
SIFT: 290
LDE: 305
Ours: 349
>
>
<
221
278
365
>
>
<
Figure 1: Some examples where a local part (center in each triplet) is closer to a non-matching part
(right) than a matching part (left) in terms of the Euclidean distances between their SIFT descriptors.
Using linear discriminant embedding (LDE) [1], non-matching pairs are still closer than matching
pairs in the first three examples. Compared to existing work on metric learning and discriminant
analysis, our learning method focuses more on “far but matching” and “close but non-matching”
training pairs, so that can distinguish look-alike irrelevant parts successfully.
(a) 15 closest SIFT pairs
(b) 15 closest RDE pairs
Figure 2: (a) When two images of the same scene are captured under considerably different con-
ditions, many irrelevant pairs of local parts are chosen as closest pairs in the local feature space,
which may lead to undesirable results of comparison. (b) In our RDE space, matching pairs are
successfully chosen as closest pairs.
2 Proposed Method
In descriptor learning [1, 3], a projection is obtained from training pairs of matching and non-
matching descriptors in order to map given local descriptors (e.g., SIFT) to a new feature space
where matching descriptors are closer to each other and non-matching descriptors are farther from
each other. Traditional techniques for supervised dimensionality reduction, including linear discrim-
inant analysis (LDA) and local Fisher discriminant analysis (LFDA) [4], can be applied to descriptor
learning after a slight modification. For example, linear discriminant embedding (LDE) [1] is come
from LDA with a simple modification for handling pairwise training data.
We propose a regularized learning framework in order to further emphasize (1) matching, but far
apart pairs and (2) non-matching, but look-alike pairs, under wide environmental conditions. First,
we divide given training pairs of local descriptors into four subsets, Relevant-Near (Rel-Near),
Relevant-Far (Rel-Far), Irrelevant-Near (Irr-Near), and Irrelevant-Far (Irr-Far). For example, the
“Irr-Near” subset consists of irrelevant (i.e., non-matching), but near pairs. We define an irrelevant
pair (xi,xj) as “near” ifxi is one of the knearest descriptors1 among all non-matching descriptors
of xj or vice versa. Similarly, a relevant pair (xi,xj) is called “near” if xi is one of knearest de-
scriptors among all matching descriptors of xj. All the other pairs belong to “Irr-Far” or “Rel-Far”.
Then we seek a linear projection T that maximizes the following regularized ratio:
J(T) =
βIN
∑
(i,j)∈PIN
dij(T) +βIF
∑
(i,j)∈PIF
dij(T)
βRN
∑
(i,j)∈PRN
dij(T) +βRF
∑
(i,j)∈PRF
dij(T) , (1)
1In our experiments, setting 1 ≤ k ≤ 10 achieved a reasonable performance improvement.
2
−1 −0.5 0 0.5 1
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
LDE
LFDA
RDE
(a)
−1 −0.5 0 0.5 1
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
LDE
LFDA
RDE (b)
Figure 3: Toy examples of projections learned by LDE, LFDA, and our RDE.
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 15.58%
Err (RFar vs INear) = 29.92%
RelNear
IrrFar
IrrNear
RelFar
(a) SIFT feature space
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 13.99%
Err (RFar vs INear) = 27.00%
RelNear
IrrFar
IrrNear
RelFar (b) LDE feature space
0 100 200 300 400 500 600 7000
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
Distance
The number of pairs
Err (Rel vs Irr) = 8.34%
Err (RFar vs INear) = 16.30%
RelNear
IrrFar
IrrNear
RelFar (c) Our RDE feature space
Figure 4: Distribution of Euclidean distance in a given feature space for each subset of pairs. Err
(Rel vs Irr)measures the proportion of overlapping region between {Rel-Near, Rel-Far}and {Irr-
Near, Irr-Far}, while Err (RFar vs INear)measures the overlap between Rel-Far and Irr-Near. In
our RDE space, non-matching pairs are well distinguished from matching pairs.
where dij(T) denotes the squared distance ||T(xi −xj)||2 between two local descriptors xi and xj
in the projected space, and PRN ,PRF ,PIN ,PIF denote the subsets of Rel-Near, Rel-Far, Irr-Near,
and Irr-Far, respectively. Four regularization constantsβRN ,βRF ,βIN ,βIF control the importance
of each subset.
• In LDE, all pairs are equally important, i.e., βRN = βRF = βIN = βIF = 1.
• In LFDA , “near” pairs are more important, i.e.,βRN ≫βRF and βIN ≫βIF .
• In our method, we propose to emphasize Rel-Far (matching but far apart) and Irr-Near
(non-matching but close) pairs, i.e., βRN ≪βRF and βIN ≫βIF .
Fig. 3 shows when and why our method can better distinguish Irr-Near pairs from Rel-Far pairs.
In Fig. 3(a), the global intra-class distribution forms a diagonal, while each local cluster has no
meaningful direction of scattering. Since LFDA focuses on “near” pairs, it cannot capture the true
intra-class scatter well, leading to the undesirable projection. In Fig. 3(b), LDE obtains a projection
that maximizes the inter-class variance, but the shape of the class boundary cannot be considered
well, leading to an overlap between two classes. In this case, focusing more on Irr-Near pairs (i.e.,
the pairs of opposite clusters near the class boundary) can preserve the separability of classes.
Fig. 4 shows the distance distribution of local descriptors, where 20,000 pairs of each subset are
randomly chosen from 500,000 local patches of Flickr images. As shown in Fig. 4(a), Rel-Near
and Irr-Far pairs are already well separated in the SIFT space, but Rel-Far and Irr-Near pairs are
not distinguished well ( ∼30% overlapped) and many Rel-Far pairs lie farther than Irr-Near pairs.
Learning by LDE can achieve only a marginal improvement (Fig. 4(b)). By contrast, our RDE
achieves a significant improvement in the separability between matching and non-matching pairs,
especially two challenging subsets, Rel-Far and Irr-Near (Fig. 4(c)). Fig. 1 and 2 also show the
superiority of our method over the existing work.
3
References
[1] G. Hua, M. Brown, and S. Winder, “Discriminant embedding for local image descriptors,” in Proceedings
of the International Conference on Computer Vision (ICCV), 2007, pp. 1–8.
[2] D. G. Lowe, “Object recognition from local scale-invariant features,” in Proceedings of the International
Conference on Computer Vision (ICCV), 1999, pp. 1150–1157.
[3] J. Philbin, M. Isard, J. Sivic, and A. Zisserman, “Descriptor learning for efficient retrieval,” inProceedings
of the European Conference on Computer Vision (ECCV), 2010, pp. 677–691.
[4] M. Sugiyama, “Dimensionality reduction of multimodal labeled data by local Fisher discriminant analysis,”
Journal of Machine Learning Research, vol. 5, pp. 1027–1061, 2007.
4
|
Kye-Hyeon Kim, Rui Cai, Lei Zhang, Seungjin Choi
|
Unknown
| 2,013
|
{"id": "zzKhQhsTYlzAZ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358487000000, "tmdate": 1358487000000, "ddate": null, "number": 18, "content": {"title": "Regularized Discriminant Embedding for Visual Descriptor Learning", "decision": "conferencePoster-iclr2013-workshop", "abstract": "Images can vary according to changes in viewpoint, resolution, noise, and illumination. In this paper, we aim to learn representations for an image, which are robust to wide changes in such environmental conditions, using training pairs of matching and non-matching local image patches that are collected under various environmental conditions. We present a regularized discriminant analysis that emphasizes two challenging categories among the given training pairs: (1) matching, but far apart pairs and (2) non-matching, but close pairs in the original feature space (e.g., SIFT feature space). Compared to existing work on metric learning and discriminant analysis, our method can better distinguish relevant images from irrelevant, but look-alike images.", "pdf": "https://arxiv.org/abs/1301.3644", "paperhash": "kim|regularized_discriminant_embedding_for_visual_descriptor_learning", "keywords": [], "conflicts": [], "authors": ["Kye-Hyeon Kim", "Rui Cai", "Lei Zhang", "Seungjin Choi"], "authorids": ["vapnik.chervonenkis@gmail.com", "ruicai@microsoft.com", "leizhang@microsoft.com", "seungjin.choi.mlg@gmail.com"]}, "forum": "zzKhQhsTYlzAZ", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vapnik.chervonenkis@gmail.com"], "writers": []}
|
[Review]:
This paper describes a method for learning visual feature descriptors that are invariant to changes in illumination, viewpoint, and image quality. The method can be used for multi-view matching and alignment, or for robust image retrieval. The method computes a regularized linear projection of SIFT feature descriptors to optimize a weighted similarity measure. The method is applied to matching and non-matching patches from Flickr images. The primary contribution of this workshop submission is to demonstrate that a coarse weighting of the data samples according to the disparity between their semantic distance and their Euclidean distance in SIFT descriptor space.
The novelty of the paper is minimal, and most details of the method and the validation are not given. The authors focus on the weighting of the sample pairs to emphasize both the furthest similar pairs and the closest dissimilar pairs, but it is not clear that this is provides a substantial gain.
|
anonymous reviewer 39f1
| null | null |
{"id": "-7pc74mqcO-Mr", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362186780000, "tmdate": 1362186780000, "ddate": null, "number": 2, "content": {"title": "review of Regularized Discriminant Embedding for Visual Descriptor Learning", "review": "This paper describes a method for learning visual feature descriptors that are invariant to changes in illumination, viewpoint, and image quality. The method can be used for multi-view matching and alignment, or for robust image retrieval. The method computes a regularized linear projection of SIFT feature descriptors to optimize a weighted similarity measure. The method is applied to matching and non-matching patches from Flickr images. The primary contribution of this workshop submission is to demonstrate that a coarse weighting of the data samples according to the disparity between their semantic distance and their Euclidean distance in SIFT descriptor space.\r\n\r\nThe novelty of the paper is minimal, and most details of the method and the validation are not given. The authors focus on the weighting of the sample pairs to emphasize both the furthest similar pairs and the closest dissimilar pairs, but it is not clear that this is provides a substantial gain."}, "forum": "zzKhQhsTYlzAZ", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzKhQhsTYlzAZ", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 39f1"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 7,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 1,
"total": 7
}
| 1.714286
| 1.146118
| 0.568167
| 1.752292
| 0.382369
| 0.038006
| 0.285714
| 0
| 0.142857
| 1
| 0
| 0
| 0.142857
| 0.142857
|
{
"criticism": 0.2857142857142857,
"example": 0,
"importance_and_relevance": 0.14285714285714285,
"materials_and_methods": 1,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0.14285714285714285,
"suggestion_and_solution": 0.14285714285714285
}
| 1.714286
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
zzEf5eKLmAG0o
|
Learning Features with Structure-Adapting Multi-view Exponential Family
Harmoniums
|
We proposea graphical model for multi-view feature extraction that automatically adapts its structure to achieve better representation of data distribution. The proposed model, structure-adapting multi-view harmonium (SA-MVH) has switch parameters that control the connection between hidden nodes and input views, and learn the switch parameter while training. Numerical experiments on synthetic and a real-world dataset demonstrate the useful behavior of the SA-MVH, compared to existing multi-view feature extraction methods.
|
arXiv:1301.3539v1 [cs.LG] 16 Jan 2013
Learning Features with Structure-Adapting
Multi-view Exponential Family Harmoniums
Yoonseop Kang1 Seungjin Choi1,2,3
Department of Computer Science and Engineering1,
Division of IT Convergence Engineering2,
Department of Creative Excellence Engineering3,
Pohang University of Science and Technology (POSTECH)
Pohang, South Korea, 790-784.
{e0en,seungjin}@postech.ac.kr
Abstract
We propose a graphical model for multi-view feature extraction that automatically
adapts its structure to achieve better representation of da ta distribution. The pro-
posed model, structure-adapting multi-view harmonium (SA-MVH) has switch
parameters that control the connection between hidden nodes and input v iews,
and learn the switch parameter while training. Numerical ex periments on syn-
thetic and a real-world dataset demonstrate the useful beha vior of the SA-MVH,
compared to existing multi-view feature extraction methods.
1 Introduction
Earlier multi-view feature extraction methods including canonical correlation analysis [1] and dual-
wing harmonium (DWH) [2] assume that all views can be describ ed using a single set of shared
hidden nodes. However, these methods fail when real-world data with partially correlated views are
given. More recent methods like factorized orthogonal late nt space [3] or multi-view harmonium
(MVH) [4] assume that views are generated from two sets of hid den nodes: view-specific hidden
nodes and shared ones. Still, these models rely on the pre-defined connection structure, and deciding
the number of shared and view-specific hidden nodes requires a great human effort.
In this paper, we propose structure-adapting multi-view ha rmonium (SA-MVH) which avoids all
of the problems mentioned above. Instead of explicitly defin ing view-specific and hidden nodes in
prior to the training, we only use one set of hidden nodes and l et each one of them to decide the
existence of connection to views using switch parameters during the training. In this manner, SA-
MVH automatically decides the number of view-specific laten t variables and also captures partial
correlation among views.
2 The Proposed Model
The definition of SA-MVH begins with choosing marginal distr ibutions of visible node sets v(k)
and a set of hidden nodes h from exponential family distributions:
p(v(k)
i ) ∝ exp(
∑
a
ξ(k)
ia f(k)
ia (v(k)
i ) − A(k)
i ({ξ(k)
ia })),
p(hj ) ∝ exp(
∑
b
λjb gjb(hj ) − Bj ({λjb })), (1)
f(·), g(·) are sufficient statistics, ξ, λ are natural parameters, and A, B are log-partition functions.
1
...
... ...
(a) DWH
...
... ...
... ...
(b) MVH
...
... ...
(c) SA-MVH
Figure 1: Graphical models of (a) dual-wing harmonium, (b) m ulti-view harmonium, and (c)
structure-adapting multi-view harmonium.
Connections between visible nodes and hidden nodes of SA-MV H are defined by weight matrices
{W (k)} and switch parameters σ(skj ) ∈ [0, 1], where σ(·) is a sigmoid function. A switch skj
controls the connection between k-th view and j-th hidden node by being multiplied to the j-th
column of weight matrix W (k) (Figure 1). When σ(skj ) is large (> 0. 5), we consider the view and
the hidden node to be connected. With the quadratic term including weights and switch parameters,
the joint distribution of SA-MVH is defined as below:
p({v(k)}, h) ∝ exp
( ∑
k,i,j
σ(skj )W (k)
ij f(k)
i (v(k)
i )gj (hj ) −
∑
k,i
ξ(k)
i f(k)
i (v(k)
i ) −
∑
j
λj gj (hj )
)
. (2)
note that indices a and b are omitted to keep the notations uncluttered.
We learn the parameters W (k), ξ(k), λ, and switch parameters skj by maximizing the likelihood of
model via gradient ascent. The likelihood of SA-MVH is define d as the joint distribution of nodes
summed over hidden nodes h:
L = ⟨log p({v(k)})⟩data =
⟨
log
∑
h
p({v(k)}, h)
⟩
data, (3)
where ⟨·⟩data represents expectation over data distribution. Then the gradient of log-likelihood with
respect to the parameters W (k), ξ(k), λ, and skj are derived as follows:
∂L
∂W (k)
ij
∝
⟨
σ(skj )fi(v(k)
i )B′
j (ˆλj )
⟩
data −
⟨
σ(skj )fi(v(k)
i )B′
j (ˆλj )
⟩
model (4)
∂L
∂ξ(k)
i
∝
⟨
f(k)
i (v(k)
i )
⟩
data −
⟨
f(k)
i (v(k)
i )
⟩
model (5)
∂L
∂λ j
∝
⟨
B′
j (ˆλj )
⟩
data −
⟨
B′
j (ˆλj )
⟩
model, (6)
∂L
∂skj
∝
⣨
σ′(skj )W (k)
ij fi(v(k)
i )B′
j (ˆλj )
⟩
data
−
⣨
σ′(skj )W (k)
ij fi(v(k)
i )B′
j (ˆλj )
⟩
model
(7)
where ⟨·⟩model represents expectation over model distribution p({v(k)}, h) and ˆξ(k)
i = ξ(k)
i +∑
j σ(skj )W (k)
ij gj(hj ), ˆλj = λj + ∑
k,i σ(skj )W (k)
ij fi(v(k)
i ) are shifted parameters.
3 Numerical Experiments
3.1 Feature Extraction on Noisy Arabic-Roman Digit Dataset
To simulate the view-specific and shared properties of multi -view data, we designed a synthetic
dataset which contains 11,800 pairs of Arabic digits and the corresponding Roman digits written in
various fonts. For each pair, we added random vertical line n oises to Arabic digits, and horizontal
line noises to Roman digits (Figure 2-(a)). SA-MVH trained with 200 hidden nodes found 95 shared
features (with connection to both views), and 47 view-speci fic features for Roman digits, and 32
for Arabic digits. Remaining 26 were not connected to any vie ws and ignored. Most of the shared
features were noise-free and encoded parts of Roman and Arab ic numbers (Figure 2-(b)). On the
other hand, the view-specific features had components with horizontal or vertical noises, as well as
the parts of the numbers (Figure 2-(c)). In this example, SA- MVH automatically separated view-
specific and shared information without any prior specification of the graph structure.
2
(a)
(b) Shared features
(c) View-specific features
Figure 2: (a) 10 samples from Noisy Arabic-Roman digit dataset, (b) shared features, and (c) view-
specific features learned by SA-MVH.
Table 1: Image classification accuracy of k-nn classifier using feature extraction methods trained on
Caltech-256 dataset. For each value of k, the best result is marked as bold text.
Method # 10-NN 30-NN 50-NN 70-NN 100-NN
Sparse Filtering 0.161 0.165 0.163 0.16 0.155
DWH 0.237 0.231 0.217 0.207 0.194
MVH 0.239 0.225 0.216 0.203 0.191
SA-MVH 0.246 0.232 0.223 0.212 0.198
3.2 Image Classification on Caltech-256 Dataset
We extracted 512 dimensions of GIST features and 1,536 dimen sions of histogram of gradients
(HoG) features from Caltech-256 dataset to simulate multi-view settings. SA-MVH and other multi-
view feature extraction methods based on harmonium – DWH andMVH were trained on the dataset
for comparison. We also compared our method to Sparse Filter ing [5], which is not a harmonium-
based method. We trained the feature extraction methods and tested the methods with k-nearest
neighbor classifiers (Table 1). SA-MVH resulted better than other feature extraction models in this
experiment, regardless of the value of k for nearest neighbor classifier.
4 Conclusion
In this paper, we have proposed the multi-view feature extraction model that automatically decides
relations between latent variables and input views. The pro posed method, SA-MVH models multi-
view data distribution with less restrictive assumption and also reduces the number of parameters to
tune by human hand. SA-MVH introduces switch parameters that control the connections between
hidden nodes and input views, and find the desirable configuration while training. We have demon-
strated the effectiveness of our approach by comparing our model to existing models in experiments
on synthetic dataset, and image classification with simulated multi-view setting.
References
[1] D. R. Hardoon, S. Szedmak, and J. Shawe-Taylor, “Canonical correlation analysis: An overview
with applications to learning methods,” Neural Computation, vol. 16, pp. 2639–2664, 2004.
[2] E. P. Xing, R. Yan, and A. G. Hauptmann, “Mining associate d text and images with dual-wing
harmonium,” in Proceedings of the Annual Conference on Uncertainty in Artificial Intelligence
(UAI), Edinburgh, UK, 2005.
[3] M. Salzmann, C. H. Ek, R. Urtasun, and T. Darrell, “Factor ized orthogonal latent spaces,” in
Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS),
Sardinia, Italy, 2010.
[4] Y . Kang and S. Choi, “Restricted deep belief networks formulti-view learning,” in Proceedings
of the European Conference on Machine Learning and Principl es and Practice of Knowledge
Discovery in Databases (ECML-PKDD), Athens, Greece, 2011.
[5] J. Ngiam, P. W. Koh, Z. Chen, S. A. Bhaskar, and A. Y . Ng, “Sp arse filtering,” in Advances in
Neural Information Processing Systems (NIPS), vol. 23. MIT Press, 2011.
3
|
YoonSeop Kang, Seungjin Choi
|
Unknown
| 2,013
|
{"id": "zzEf5eKLmAG0o", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 47, "content": {"title": "Learning Features with Structure-Adapting Multi-view Exponential Family\r\n Harmoniums", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We proposea graphical model for multi-view feature extraction that automatically adapts its structure to achieve better representation of data distribution. The proposed model, structure-adapting multi-view harmonium (SA-MVH) has switch parameters that control the connection between hidden nodes and input views, and learn the switch parameter while training. Numerical experiments on synthetic and a real-world dataset demonstrate the useful behavior of the SA-MVH, compared to existing multi-view feature extraction methods.", "pdf": "https://arxiv.org/abs/1301.3539", "paperhash": "kang|learning_features_with_structureadapting_multiview_exponential_family_harmoniums", "authors": ["YoonSeop Kang", "Seungjin Choi"], "keywords": [], "conflicts": [], "authorids": ["e0engoon@gmail.com", "seungjin.choi.mlg@gmail.com"]}, "forum": "zzEf5eKLmAG0o", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["e0engoon@gmail.com"], "writers": []}
|
[Review]:
The paper introduces an new algorithm for simultaneously learning a hidden layer (latent representation) for multiple data views as well as automatically segmenting that hidden layer into shared and view-specific nodes. It builds on the previous multi-view harmonium (MVH) algorithm by adding (sigmoidal) switch parameters that turn a connection on or off between a view and hidden node and uses gradient descent to learn those switch parameters. The optimization is similar to MVH, with a slight modification on the joint distribution between views and hidden nodes, resulting in a change in the gradients for all parameters and a new switch variable to descend on.
This new algorithm, therefore, is somewhat novel; the quality of the explanation and writing is high; and the experimental quality is reasonable.
Pros
1. The paper is well-written and organized.
2. The algorithm in the paper proposes a way to avoid hand designing shared and private (view-specific) nodes, which is an important contribution.
3. The experimental results indicate some interesting properties of the algorithm, in particular demonstrating that the algorithm extracts reasonable shared and view-specific hidden nodes.
Cons
1. The descent directions have W and the switch parameters, s_kj, coupled, which might make learning slow. Experimental results should indicate computation time.
2. The results do not have error bars (in Table 1), so it is unclear if they are statistically significant (the small difference suggests that they may not be).
3. The motivation in this paper is to enable learning of the private and shared representations automatically. However, DWH (only a shared representation) actually seems to perform generally better that MVH (shared and private). The experiments should better explore this question. It might also be a good idea to have a baseline comparison with CCA.
4. In light of Con (3), the algorithm should also be compared to multi-view algorithms that learn only shared representations but do not require the size of the hidden-node set to be fixed (such as the recent relaxed-rank convex multi-view approach in 'Convex Multiview Subspace Learning', M. White, Y. Yu, X. Zhang and D. Schuurmans, NIPS 2012). In this case, the relaxed-rank regularizer does not fix the size of the hidden node set, but regularizes to set several hidden nodes to zero. This is similar to the approach proposed in this paper where a node is not used if the sigmoid value is < 0.5.
Note that these relaxed-rank approaches do not explicitly maximize the likelihood for an exponential family distribution; instead, they allow general Bregman divergences which have been shown to have a one-to-one correspondence with exponential family distributions (see 'Clustering with Bregman divergences' A. Banerjee, S. Merugu, I. Dhillon and J. Ghosh, JMLR 2005). Therefore, by selecting a certain Bregman divergence, the approach in this paper can be compared to the relaxed-rank approaches.
|
anonymous reviewer d966
| null | null |
{"id": "UUlHmZjBOIUBb", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362353160000, "tmdate": 1362353160000, "ddate": null, "number": 2, "content": {"title": "review of Learning Features with Structure-Adapting Multi-view Exponential Family\r\n Harmoniums", "review": "The paper introduces an new algorithm for simultaneously learning a hidden layer (latent representation) for multiple data views as well as automatically segmenting that hidden layer into shared and view-specific nodes. It builds on the previous multi-view harmonium (MVH) algorithm by adding (sigmoidal) switch parameters that turn a connection on or off between a view and hidden node and uses gradient descent to learn those switch parameters. The optimization is similar to MVH, with a slight modification on the joint distribution between views and hidden nodes, resulting in a change in the gradients for all parameters and a new switch variable to descend on.\r\n\r\nThis new algorithm, therefore, is somewhat novel; the quality of the explanation and writing is high; and the experimental quality is reasonable.\r\n\r\nPros\r\n\r\n1. The paper is well-written and organized.\r\n\r\n2. The algorithm in the paper proposes a way to avoid hand designing shared and private (view-specific) nodes, which is an important contribution.\r\n\r\n3. The experimental results indicate some interesting properties of the algorithm, in particular demonstrating that the algorithm extracts reasonable shared and view-specific hidden nodes.\r\n\r\nCons\r\n1. The descent directions have W and the switch parameters, s_kj, coupled, which might make learning slow. Experimental results should indicate computation time.\r\n\r\n2. The results do not have error bars (in Table 1), so it is unclear if they are statistically significant (the small difference suggests that they may not be).\r\n\r\n3. The motivation in this paper is to enable learning of the private and shared representations automatically. However, DWH (only a shared representation) actually seems to perform generally better that MVH (shared and private). The experiments should better explore this question. It might also be a good idea to have a baseline comparison with CCA. \r\n\r\n4. In light of Con (3), the algorithm should also be compared to multi-view algorithms that learn only shared representations but do not require the size of the hidden-node set to be fixed (such as the recent relaxed-rank convex multi-view approach in 'Convex Multiview Subspace Learning', M. White, Y. Yu, X. Zhang and D. Schuurmans, NIPS 2012). In this case, the relaxed-rank regularizer does not fix the size of the hidden node set, but regularizes to set several hidden nodes to zero. This is similar to the approach proposed in this paper where a node is not used if the sigmoid value is < 0.5. \r\nNote that these relaxed-rank approaches do not explicitly maximize the likelihood for an exponential family distribution; instead, they allow general Bregman divergences which have been shown to have a one-to-one correspondence with exponential family distributions (see 'Clustering with Bregman divergences' A. Banerjee, S. Merugu, I. Dhillon and J. Ghosh, JMLR 2005). Therefore, by selecting a certain Bregman divergence, the approach in this paper can be compared to the relaxed-rank approaches."}, "forum": "zzEf5eKLmAG0o", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzEf5eKLmAG0o", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer d966"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 1,
"importance_and_relevance": 2,
"materials_and_methods": 14,
"praise": 4,
"presentation_and_reporting": 4,
"results_and_discussion": 5,
"suggestion_and_solution": 5,
"total": 26
}
| 1.461538
| -1.205692
| 2.667231
| 1.573664
| 1.023278
| 0.112125
| 0.115385
| 0.038462
| 0.076923
| 0.538462
| 0.153846
| 0.153846
| 0.192308
| 0.192308
|
{
"criticism": 0.11538461538461539,
"example": 0.038461538461538464,
"importance_and_relevance": 0.07692307692307693,
"materials_and_methods": 0.5384615384615384,
"praise": 0.15384615384615385,
"presentation_and_reporting": 0.15384615384615385,
"results_and_discussion": 0.19230769230769232,
"suggestion_and_solution": 0.19230769230769232
}
| 1.461538
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
zzEf5eKLmAG0o
|
Learning Features with Structure-Adapting Multi-view Exponential Family
Harmoniums
|
We proposea graphical model for multi-view feature extraction that automatically adapts its structure to achieve better representation of data distribution. The proposed model, structure-adapting multi-view harmonium (SA-MVH) has switch parameters that control the connection between hidden nodes and input views, and learn the switch parameter while training. Numerical experiments on synthetic and a real-world dataset demonstrate the useful behavior of the SA-MVH, compared to existing multi-view feature extraction methods.
|
arXiv:1301.3539v1 [cs.LG] 16 Jan 2013
Learning Features with Structure-Adapting
Multi-view Exponential Family Harmoniums
Yoonseop Kang1 Seungjin Choi1,2,3
Department of Computer Science and Engineering1,
Division of IT Convergence Engineering2,
Department of Creative Excellence Engineering3,
Pohang University of Science and Technology (POSTECH)
Pohang, South Korea, 790-784.
{e0en,seungjin}@postech.ac.kr
Abstract
We propose a graphical model for multi-view feature extraction that automatically
adapts its structure to achieve better representation of da ta distribution. The pro-
posed model, structure-adapting multi-view harmonium (SA-MVH) has switch
parameters that control the connection between hidden nodes and input v iews,
and learn the switch parameter while training. Numerical ex periments on syn-
thetic and a real-world dataset demonstrate the useful beha vior of the SA-MVH,
compared to existing multi-view feature extraction methods.
1 Introduction
Earlier multi-view feature extraction methods including canonical correlation analysis [1] and dual-
wing harmonium (DWH) [2] assume that all views can be describ ed using a single set of shared
hidden nodes. However, these methods fail when real-world data with partially correlated views are
given. More recent methods like factorized orthogonal late nt space [3] or multi-view harmonium
(MVH) [4] assume that views are generated from two sets of hid den nodes: view-specific hidden
nodes and shared ones. Still, these models rely on the pre-defined connection structure, and deciding
the number of shared and view-specific hidden nodes requires a great human effort.
In this paper, we propose structure-adapting multi-view ha rmonium (SA-MVH) which avoids all
of the problems mentioned above. Instead of explicitly defin ing view-specific and hidden nodes in
prior to the training, we only use one set of hidden nodes and l et each one of them to decide the
existence of connection to views using switch parameters during the training. In this manner, SA-
MVH automatically decides the number of view-specific laten t variables and also captures partial
correlation among views.
2 The Proposed Model
The definition of SA-MVH begins with choosing marginal distr ibutions of visible node sets v(k)
and a set of hidden nodes h from exponential family distributions:
p(v(k)
i ) ∝ exp(
∑
a
ξ(k)
ia f(k)
ia (v(k)
i ) − A(k)
i ({ξ(k)
ia })),
p(hj ) ∝ exp(
∑
b
λjb gjb(hj ) − Bj ({λjb })), (1)
f(·), g(·) are sufficient statistics, ξ, λ are natural parameters, and A, B are log-partition functions.
1
...
... ...
(a) DWH
...
... ...
... ...
(b) MVH
...
... ...
(c) SA-MVH
Figure 1: Graphical models of (a) dual-wing harmonium, (b) m ulti-view harmonium, and (c)
structure-adapting multi-view harmonium.
Connections between visible nodes and hidden nodes of SA-MV H are defined by weight matrices
{W (k)} and switch parameters σ(skj ) ∈ [0, 1], where σ(·) is a sigmoid function. A switch skj
controls the connection between k-th view and j-th hidden node by being multiplied to the j-th
column of weight matrix W (k) (Figure 1). When σ(skj ) is large (> 0. 5), we consider the view and
the hidden node to be connected. With the quadratic term including weights and switch parameters,
the joint distribution of SA-MVH is defined as below:
p({v(k)}, h) ∝ exp
( ∑
k,i,j
σ(skj )W (k)
ij f(k)
i (v(k)
i )gj (hj ) −
∑
k,i
ξ(k)
i f(k)
i (v(k)
i ) −
∑
j
λj gj (hj )
)
. (2)
note that indices a and b are omitted to keep the notations uncluttered.
We learn the parameters W (k), ξ(k), λ, and switch parameters skj by maximizing the likelihood of
model via gradient ascent. The likelihood of SA-MVH is define d as the joint distribution of nodes
summed over hidden nodes h:
L = ⟨log p({v(k)})⟩data =
⟨
log
∑
h
p({v(k)}, h)
⟩
data, (3)
where ⟨·⟩data represents expectation over data distribution. Then the gradient of log-likelihood with
respect to the parameters W (k), ξ(k), λ, and skj are derived as follows:
∂L
∂W (k)
ij
∝
⟨
σ(skj )fi(v(k)
i )B′
j (ˆλj )
⟩
data −
⟨
σ(skj )fi(v(k)
i )B′
j (ˆλj )
⟩
model (4)
∂L
∂ξ(k)
i
∝
⟨
f(k)
i (v(k)
i )
⟩
data −
⟨
f(k)
i (v(k)
i )
⟩
model (5)
∂L
∂λ j
∝
⟨
B′
j (ˆλj )
⟩
data −
⟨
B′
j (ˆλj )
⟩
model, (6)
∂L
∂skj
∝
⣨
σ′(skj )W (k)
ij fi(v(k)
i )B′
j (ˆλj )
⟩
data
−
⣨
σ′(skj )W (k)
ij fi(v(k)
i )B′
j (ˆλj )
⟩
model
(7)
where ⟨·⟩model represents expectation over model distribution p({v(k)}, h) and ˆξ(k)
i = ξ(k)
i +∑
j σ(skj )W (k)
ij gj(hj ), ˆλj = λj + ∑
k,i σ(skj )W (k)
ij fi(v(k)
i ) are shifted parameters.
3 Numerical Experiments
3.1 Feature Extraction on Noisy Arabic-Roman Digit Dataset
To simulate the view-specific and shared properties of multi -view data, we designed a synthetic
dataset which contains 11,800 pairs of Arabic digits and the corresponding Roman digits written in
various fonts. For each pair, we added random vertical line n oises to Arabic digits, and horizontal
line noises to Roman digits (Figure 2-(a)). SA-MVH trained with 200 hidden nodes found 95 shared
features (with connection to both views), and 47 view-speci fic features for Roman digits, and 32
for Arabic digits. Remaining 26 were not connected to any vie ws and ignored. Most of the shared
features were noise-free and encoded parts of Roman and Arab ic numbers (Figure 2-(b)). On the
other hand, the view-specific features had components with horizontal or vertical noises, as well as
the parts of the numbers (Figure 2-(c)). In this example, SA- MVH automatically separated view-
specific and shared information without any prior specification of the graph structure.
2
(a)
(b) Shared features
(c) View-specific features
Figure 2: (a) 10 samples from Noisy Arabic-Roman digit dataset, (b) shared features, and (c) view-
specific features learned by SA-MVH.
Table 1: Image classification accuracy of k-nn classifier using feature extraction methods trained on
Caltech-256 dataset. For each value of k, the best result is marked as bold text.
Method # 10-NN 30-NN 50-NN 70-NN 100-NN
Sparse Filtering 0.161 0.165 0.163 0.16 0.155
DWH 0.237 0.231 0.217 0.207 0.194
MVH 0.239 0.225 0.216 0.203 0.191
SA-MVH 0.246 0.232 0.223 0.212 0.198
3.2 Image Classification on Caltech-256 Dataset
We extracted 512 dimensions of GIST features and 1,536 dimen sions of histogram of gradients
(HoG) features from Caltech-256 dataset to simulate multi-view settings. SA-MVH and other multi-
view feature extraction methods based on harmonium – DWH andMVH were trained on the dataset
for comparison. We also compared our method to Sparse Filter ing [5], which is not a harmonium-
based method. We trained the feature extraction methods and tested the methods with k-nearest
neighbor classifiers (Table 1). SA-MVH resulted better than other feature extraction models in this
experiment, regardless of the value of k for nearest neighbor classifier.
4 Conclusion
In this paper, we have proposed the multi-view feature extraction model that automatically decides
relations between latent variables and input views. The pro posed method, SA-MVH models multi-
view data distribution with less restrictive assumption and also reduces the number of parameters to
tune by human hand. SA-MVH introduces switch parameters that control the connections between
hidden nodes and input views, and find the desirable configuration while training. We have demon-
strated the effectiveness of our approach by comparing our model to existing models in experiments
on synthetic dataset, and image classification with simulated multi-view setting.
References
[1] D. R. Hardoon, S. Szedmak, and J. Shawe-Taylor, “Canonical correlation analysis: An overview
with applications to learning methods,” Neural Computation, vol. 16, pp. 2639–2664, 2004.
[2] E. P. Xing, R. Yan, and A. G. Hauptmann, “Mining associate d text and images with dual-wing
harmonium,” in Proceedings of the Annual Conference on Uncertainty in Artificial Intelligence
(UAI), Edinburgh, UK, 2005.
[3] M. Salzmann, C. H. Ek, R. Urtasun, and T. Darrell, “Factor ized orthogonal latent spaces,” in
Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS),
Sardinia, Italy, 2010.
[4] Y . Kang and S. Choi, “Restricted deep belief networks formulti-view learning,” in Proceedings
of the European Conference on Machine Learning and Principl es and Practice of Knowledge
Discovery in Databases (ECML-PKDD), Athens, Greece, 2011.
[5] J. Ngiam, P. W. Koh, Z. Chen, S. A. Bhaskar, and A. Y . Ng, “Sp arse filtering,” in Advances in
Neural Information Processing Systems (NIPS), vol. 23. MIT Press, 2011.
3
|
YoonSeop Kang, Seungjin Choi
|
Unknown
| 2,013
|
{"id": "zzEf5eKLmAG0o", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 47, "content": {"title": "Learning Features with Structure-Adapting Multi-view Exponential Family\r\n Harmoniums", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We proposea graphical model for multi-view feature extraction that automatically adapts its structure to achieve better representation of data distribution. The proposed model, structure-adapting multi-view harmonium (SA-MVH) has switch parameters that control the connection between hidden nodes and input views, and learn the switch parameter while training. Numerical experiments on synthetic and a real-world dataset demonstrate the useful behavior of the SA-MVH, compared to existing multi-view feature extraction methods.", "pdf": "https://arxiv.org/abs/1301.3539", "paperhash": "kang|learning_features_with_structureadapting_multiview_exponential_family_harmoniums", "authors": ["YoonSeop Kang", "Seungjin Choi"], "keywords": [], "conflicts": [], "authorids": ["e0engoon@gmail.com", "seungjin.choi.mlg@gmail.com"]}, "forum": "zzEf5eKLmAG0o", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["e0engoon@gmail.com"], "writers": []}
|
[Review]:
The authors propose a bipartite, undirected graphical model for multiview learning, called structure-adapting multiview harmonimum (SA-MVH). The model is based on their earlier model called multiview harmonium (MVH) (Kang&Choi, 2011) where hidden units were separated into a shared set and view-specific sets. Unlike MVH which explicitly restricts edges, the visible and hidden units in the proposed SA-MVH are fully connected to each other with switch parameters s_{kj} indicating how likely the j-th hidden unit corresponds to the k-th view.
It would have been better if the distribution of s_{kj}'s (or sigma(s_{kj})) was provided. Unless the distribution has clear modes near 0 and 1, it would be difficult to tell why this approach of learning w^{(k)}_{ij} and s_{kj} separately is better than just learning ilde{w}^{(k)}_{ij} = w^{(k)}_{ij} sigma s_{kj} all together (as in dual-wing harmonium, DWH). Though, the empirical results (experiment 2) show that the features extracted by SA-MVH outperform both MVH and DWH.
The visualizations of shared and view-specific features from the first experiment do not seem to clearly show the power of the proposed method. For instance, it's difficult to say that the filters of roman digits from the shared features do seem to have horizontal noise. It would be better to try some other tasks with the trained model. Would it be possible to sample clean digits (without horizontal or vertical noise) from the model if the view-speific features were forced off? Would it be possible to denoise the corrupted digits? and so on..
Typo:
- Fig. 1 (c): sigma(s_{1j}) and sigma(s_{2j})
|
anonymous reviewer 0e7e
| null | null |
{"id": "DNKnDqeVJmgPF", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1360866060000, "tmdate": 1360866060000, "ddate": null, "number": 1, "content": {"title": "review of Learning Features with Structure-Adapting Multi-view Exponential Family\r\n Harmoniums", "review": "The authors propose a bipartite, undirected graphical model for multiview learning, called structure-adapting multiview harmonimum (SA-MVH). The model is based on their earlier model called multiview harmonium (MVH) (Kang&Choi, 2011) where hidden units were separated into a shared set and view-specific sets. Unlike MVH which explicitly restricts edges, the visible and hidden units in the proposed SA-MVH are fully connected to each other with switch parameters s_{kj} indicating how likely the j-th hidden unit corresponds to the k-th view.\r\n\r\nIt would have been better if the distribution of s_{kj}'s (or sigma(s_{kj})) was provided. Unless the distribution has clear modes near 0 and 1, it would be difficult to tell why this approach of learning w^{(k)}_{ij} and s_{kj} separately is better than just learning \tilde{w}^{(k)}_{ij} = w^{(k)}_{ij} sigma s_{kj} all together (as in dual-wing harmonium, DWH). Though, the empirical results (experiment 2) show that the features extracted by SA-MVH outperform both MVH and DWH.\r\n\r\nThe visualizations of shared and view-specific features from the first experiment do not seem to clearly show the power of the proposed method. For instance, it's difficult to say that the filters of roman digits from the shared features do seem to have horizontal noise. It would be better to try some other tasks with the trained model. Would it be possible to sample clean digits (without horizontal or vertical noise) from the model if the view-speific features were forced off? Would it be possible to denoise the corrupted digits? and so on..\r\n\r\nTypo:\r\n\r\n- Fig. 1 (c): sigma(s_{1j}) and sigma(s_{2j})"}, "forum": "zzEf5eKLmAG0o", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "zzEf5eKLmAG0o", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 0e7e"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 1,
"importance_and_relevance": 0,
"materials_and_methods": 9,
"praise": 0,
"presentation_and_reporting": 4,
"results_and_discussion": 1,
"suggestion_and_solution": 4,
"total": 13
}
| 1.615385
| 1.615385
| 0
| 1.690931
| 0.717291
| 0.075546
| 0.153846
| 0.076923
| 0
| 0.692308
| 0
| 0.307692
| 0.076923
| 0.307692
|
{
"criticism": 0.15384615384615385,
"example": 0.07692307692307693,
"importance_and_relevance": 0,
"materials_and_methods": 0.6923076923076923,
"praise": 0,
"presentation_and_reporting": 0.3076923076923077,
"results_and_discussion": 0.07692307692307693,
"suggestion_and_solution": 0.3076923076923077
}
| 1.615385
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yyC_7RZTkUD5-
|
Deep Predictive Coding Networks
|
The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.
|
arXiv:1301.3541v3 [cs.LG] 15 Mar 2013
Deep Predictive Coding Networks
Rakesh Chalasani Jose C. Principe
Department of Electrical and Computer Engineering
University of Florida, Gainesville, FL 32611
rakeshch@ufl.edu, principe@cnel.ufl.edu
Abstract
The quality of data representation in deep learning methods is directly related to
the prior model imposed on the representations; however, ge nerally used fixed
priors are not capable of adjusting to the context in the data. To address this issue,
we propose deep predictive coding networks, a hierarchical generative model that
empirically alters priors on the latent representations in a dynamic and context-
sensitive manner. This model captures the temporal dependencies in time-varying
signals and uses top-down information to modulate the repre sentation in lower
layers. The centerpiece of our model is a novel procedure to infer sparse states of a
dynamic network which is used for feature extraction. We also extend this feature
extraction block to introduce a pooling function that captu res locally invariant
representations. When applied on a natural video data, we sh ow that our method
is able to learn high-level visual features. We also demonstrate the role of the top-
down connections by showing the robustness of the proposed model to structured
noise.
1 Introduction
The performance of machine learning algorithms is dependen t on how the data is represented. In
most methods, the quality of a data representation is itselfdependent on prior knowledge imposed on
the representation. Such prior knowledge can be imposed usi ng domain specific information, as in
SIFT [1], HOG [2], etc., or in learning representations usin g fixed priors like sparsity [3], temporal
coherence [4], etc. The use of fixed priors became particularly popular while training deep networks
[5–8]. In spite of the success of these general purpose prior s, they are not capable of adjusting to
the context in the data. On the other hand, there are several a dvantages to having a model that can
“actively” adapt to the context in the data. One way of achiev ing this is to empirically alter the
priors in a dynamic and context-sensitive manner. This will be the m ain focus of this work, with
emphasis on visual perception.
Here we propose a predictive coding framework, where a deep locally-connected generative model
uses “top-down” information to empirically alter the prior s used in the lower layers to perform
“bottom-up” inference. The centerpiece of the proposed mod el is extracting sparse features from
time-varying observations using a linear dynamical model . To this end, we propose a novel proce-
dure to infer sparse states (or features) of a dynamical system. We then extend this feature extraction
block to introduce a pooling strategy to learn invariant feature representations from the data. In line
with other “deep learning” methods, we use these basic build ing blocks to construct a hierarchical
model using greedy layer-wise unsupervised learning. The h ierarchical model is built such that the
output from one layer acts as an input to the layer above. In other words, the layers are arranged in a
Markov chain such that the states at any layer are only dependent on the representations in the layer
below and above, and are independent of the rest of the model. The overall goal of the dynamical
system at any layer is to make the best prediction of the representation in the layer below using the
top-down information from the layers above and the temporal information from the previous states.
Hence, the name deep predictive coding networks (DPCN).
1
1.1 Related W ork
The DPCN proposed here is closely related to models proposed in [9, 10], where predictive cod-
ing is used as a statistical model to explain cortical functi ons in the mammalian brain. Similar to
the proposed model, they construct hierarchical generative models that seek to infer the underlying
causes of the sensory inputs. While Rao and Ballard [9] use an update rule similar to Kalman filter
for inference, Friston [10] proposed a general framework considering all the higher-order moments
in a continuous time dynamic model. However, neither of the m odels is capable of extracting dis-
criminative information, namely a sparse and invariant representation, from an image sequence that
is helpful for high-level tasks like object recognition. Un like these models, here we propose an
efficient inference procedure to extract locally invariant representation from image sequences and
progressively extract more abstract information at higher levels in the model.
Other methods used for building deep models, like restricted Boltzmann machine (RBM) [11], auto-
encoders [8, 12] and predictive sparse decomposition [13], are also related to the model proposed
here. All these models are constructed on similar underlyin g principles: (1) like ours, they also use
greedy layer-wise unsupervised learning to construct a hierarchical model and (2) each layer consists
of an encoder and a decoder. The key to these models is to learn both encoding and decoding
concurrently (with some regularization like sparsity [13] , denoising [8] or weight sharing [11]),
while building the deep network as a feed forward model using only the encoder. The idea is
to approximate the latent representation using only the fee d-forward encoder, while avoiding the
decoder which typically requires a more expensive inference procedure. However in DPCN there is
no encoder. Instead, DPCN relies on an efficient inference pr ocedure to get a more accurate latent
representation. As we will show below, the use of reciprocal top-down and bottom-up connections
make the proposed model more robust to structured noise duri ng recognition and also allows it to
perform low-level tasks like image denoising.
To scale to large images, several convolutional models are also proposed in a similar deep learning
paradigm [5–7]. Inference in these models is applied over anentire image, rather than small parts of
the input. DPCN can also be extended to form a convolutional network, but this will not be discussed
here.
2 Model
In this section, we begin with a brief description of the gene ral predictive coding framework and
proceed to discuss the details of the architecture used in this work. The basic block of the proposed
model that is pervasive across all layers is a generalized state-space model of the form:
˜ yt = F(xt) + nt
xt = G(xt−1, ut) + vt (1)
where ˜ yt is the data and F and G are some functions that can be parameterized, say byθ. The terms
ut are called the unknown causes . Since we are usually interested in obtaining abstract information
from the observations, the causes are encouraged to have a no n-linear relationship with the obser-
vations. The hidden states, xt, then “mediate the influence of the cause on the output and end ow
the system with memory” [10]. The terms vt and nt are stochastic and model uncertainty. Several
such state-space models can now be stacked, with the output from one acting as an input to the layer
above, to form a hierarchy. Such an L-layered hierarchical model at any time ’ t’ can be described
as1:
u(l−1 )
t = F(x(l)
t ) + n(l)
t ∀l ∈ { 1, 2, ..., L}
x(l)
t = G(x(l)
t−1, u(l)
t ) + v(l)
t (2)
The terms v(l)
t and n(l)
t form stochastic fluctuations at the higher layers and enter e ach layer in-
dependently. In other words, this model forms a Markov chain across the layers, simplifying the
inference procedure. Notice how the causes at the lower laye r form the “observations” to the layer
above — the causes form the link between the layers, and the st ates link the dynamics over time.
The important point in this design is that the higher-level p redictions influence the lower levels’
1When l = 1, i.e., at the bottom layer, u(i− 1)
t = yt, where yt the input data.
2
Causes (ut)
States (xt)
Observations (yt)
(a) Shows a single layered dynamic network
depicting a basic computational block.
- States (xt)
- Causes (ut)
(Invariant Units)
{ {Layer 1 Layer 2
(b) Shows the distributive hierarchical model formed by
stacking several basic blocks.
Figure 1: (a) Shows a single layered network on a group of smal l overlapping patches of the input
video. The green bubbles indicate a group of inputs ( y(n)
t , ∀n), red bubbles indicate their corre-
sponding states ( x(n)
t ) and the blue bubbles indicate the causes ( ut) that pool all the states within
the group. (b) Shows a two-layered hierarchical model const ructed by stacking several such basic
blocks. For visualization no overlapping is shown between the image patches here, but overlapping
patches are considered during actual implementation.
inference. The predictions from a higher layer non-linearl y enter into the state space model by em-
pirically altering the prior on the causes. In summary, the t op-down connections and the temporal
dependencies in the state space influence the latent representation at any layer.
In the following sections, we will first describe a basic comp utational network, as in (1) with a
particular form of the functions F and G. Specifically, we will consider a linear dynamical model
with sparse states for encoding the inputs and the state transitions, followed by the non-linear pooling
function to infer the causes. Next, we will discuss how to stack and learn a hierarchical model using
several of these basic networks. Also, we will discuss how to incorporate the top-down information
during inference in the hierarchical model.
2.1 Dynamic network
To begin with, we consider a dynamic network to extract featu res from a small part of a video
sequence. Let {y1, y2, ..., yt, ...} ∈ RP be a P -dimensional sequence of a patch extracted from
the same location across all the frames in a video 2 . To process this, our network consists of two
distinctive parts (see Figure.1a): feature extraction (inferring states) and pooling (inferring causes).
For the first part, sparse coding is used in conjunction with a linear state space model to map the
inputs yt at time t onto an over-complete dictionary of K-filters, C ∈ RP ×K (K > P ), to get
sparse states xt ∈ RK . To keep track of the dynamics in the latent states we use a lin ear function
with state-transition matrix A ∈ RK×K . More formally, inference of the features xt is performed
by finding a representation that minimizes the energy function:
E1(xt, yt, C, A) = ∥yt − Cxt∥2
2 + λ∥xt − Axt−1∥1 + γ ∥xt∥1 (3)
Notice that the second term involving the state-transition is also constrained to be sparse to make
the state-space representation consistent.
Now, to take advantage of the spatial relationships in a loca l neighborhood, a small group of states
x(n)
t , where n ∈ { 1, 2, ...N } represents a set of contiguous patches w.r.t. the position i n the image
space, are added (orsum pooled ) together. Such pooling of the states may be lead to local translation
invariance. On top this, a D-dimensional causes ut ∈ RD are inferred from the pooled states to
obtain representation that is invariant to more complex loc al transformations like rotation, spatial
frequency, etc. In line with [14], this invariant function i s learned such that it can capture the
dependencies between the components in the pooled states. S pecifically, the causes ut are inferred
2Here yt is a vectorized form of
√
P ×
√
P square patch extracted from a frame at time t.
3
by minimizing the energy function:
E2(ut, xt, B) =
N∑
n=1
( K∑
k=1
|γk · x(n)
t,k |
)
+ β∥ut∥1 (4)
γk = γ0
[ 1 + exp(−[But]k)
2
]
where γ0 > 0 is some constant. Notice that here ut multiplicatively interacts with the accumulated
states through B, modeling the shape of the sparse prior on the states. Essent ially, the invariant
matrix B is adapted such that each component ut connects to a group of components in the ac-
cumulated states that co-occur frequently. In other words, whenever a component in ut is active
it lowers the coefficient of a set of components in x(n)
t , ∀n, making them more likely to be active.
Since co-occurring components typically share some common statistical regularity, such activity of
ut typically leads to locally invariant representation [14].
Though the two cost functions are presented separately abov e, we can combine both to devise a
unified energy function of the form:
E(xt, ut, θ) =
N∑
n=1
(1
2∥y(n)
t − Cx(n)
t ∥2
2 + λ∥x(n)
t − Ax(n)
t−1∥1 +
K∑
k=1
|γt,k · x(n)
t,k |
)
+ β∥ut∥1
(5)
γt,k =γ0
[ 1 + exp(−[But]k)
2
]
where θ = {A, B, C}. As we will discuss next, both xt and ut can be inferred concurrently from
(5) by alternatively updating one while keeping the other fix ed using an efficient proximal gradient
method.
2.2 Learning
To learn the parameters in (5), we alternatively minimize E(xt, ut, θ) using a procedure similar to
block co-ordinate descent. We first infer the latent variabl es (xt, ut) while keeping the parameters
fixed and then update the parameters θ while keeping the variables fixed. This is done until the
parameters converge. We now discuss separately the inferen ce procedure and how we update the
parameters using a gradient descent method with the fixed variables.
2.2.1 Inference
We jointly infer bothxt and ut from (5) using proximal gradient methods, taking alternative gradient
descent steps to update one while holding the other fixed. In o ther words, we alternate between
updating xt and ut using a single update step to minimize E1 and E2, respectively. However,
updating xt is relatively more involved. So, keeping aside the causes, w e first focus on inferring
sparse states alone from E1, and then go back to discuss the joint inference of both the st ates and
the causes.
Inferring States: Inferring sparse states, given the parameters, from a linea r dynamical system
forms the crux of our model. This is performed by finding the so lution that minimizes the energy
function E1 in (3) with respect to the states xt (while keeping the sparsity parameter γ fixed).
Here there are two priors of the states: the temporal depende nce and the sparsity term. Although
this energy function E1 is convex in xt, the presence of two non-smooth terms makes it hard to
use standard optimization techniques used for sparse codin g alone. A similar problem is solved
using dynamic programming [15], homotopy [16] and Bayesian sparse coding [17]; however, the
optimization used in these models is computationally expensive for use in large scale problems like
object recognition.
To overcome this, inspired by the method proposed in [18] for structured sparsity, we propose an
approximate solution that is consistent and able to use effic ient solvers like fast iterative shrinkage
thresholding alogorithm (FISTA) [19]. The key to our approach is to first use Nestrov’s smoothness
method [18, 20] to approximate the non-smooth state transition term. The resulting energy function
4
is a convex and continuously differentiable function in xt with a sparsity constraint, and hence, can
be efficiently solved using proximal methods like FISTA.
To begin, letΩ( xt) = ∥et∥1 where et = ( xt − Axt−1). The idea is to find a smooth approximation
to this function Ω( xt) in et. Notice that, since et is a linear function on xt, the approximation will
also be smooth w.r.t. xt. Now, we can re-write Ω( xt) using the dual norm of ℓ1 as
Ω( xt) = arg max
∥α ∥∞ ≤1
α T et
where α ∈ Rk. Using the smoothing approximation from Nesterov [20] on Ω( xt):
Ω( xt) ≈ fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] (6)
where d(·) = 1
2 ∥α ∥2
2 is a smoothing function and µ is a smoothness parameter. From Nestrov’s
theorem [20], it can be shown that fµ (et) is convex and continuously differentiable in et and the
gradient of fµ (et) with respect to et takes the form
∇et fµ (et) = α ∗ (7)
where α ∗ is the optimal solution to fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] 3. This implies, by using
the chain rule, that fµ (et) is also convex and continuously differentiable in xt and with the same
gradient.
With this smoothing approximation, the overall cost function from (3) can now be re-written as
xt = arg min
xt
1
2∥yt − Cxt∥2
2 + λfµ (et) + γ∥xt∥1 (8)
with the smooth part h(xt) = 1
2 ∥yt − Cxt∥2
2 + λfµ (et) whose gradient with respect to xt is given
by
∇xt h(xt) = CT (yt − Cxt) + λα ∗ (9)
Using the gradient information in (9), we solve for xt from (8) using FISTA [19].
Inferring Causes: Given a group of state vectors, ut can be inferred by minimizing E2, where we
define a generative model that modulates the sparsity of thepooled state vector, ∑
n |x(n)|. Here we
observe that FISTA can be readily applied to infer ut, as the smooth part of the function E2:
h(ut) =
K∑
k=1
(
γ0
[ 1 + exp( −[But]k)
2
]
·
N∑
n=1
|x(n)
t,k |
)
(10)
is convex, continuously differentiable and Lipschitz inut [21] 4. Following [19], it is easy to obtain
a bound on the convergence rate of the solution.
Joint Inference: We showed thus far that bothxt and ut can be inferred from their respective energy
functions using a first-order proximal method called FISTA. However, for joint inference we have
to minimize the combined energy function in (5) over both xt and ut. We do this by alternately
updating xt and ut while holding the other fixed and using a single FISTA update step at each
iteration. It is important to point out that the internal FIS TA step size parameters are maintained
between iterations. This procedure is equivalent to alternating minimization using gradient descent.
Although this procedure no longer guarantees convergence of both xt and ut to the optimal solution,
in all of our simulations it lead to a reasonably good solutio n. Please refer to Algorithm. 1 (in the
supplementary material) for details. Note that, with the alternating update procedure, each xt is now
influenced by the feed-forward observations, temporal pred ictions and the feedback connections
from the causes.
3Please refer to the supplementary material for the exact form of α ∗.
4The matrix B is initialized with non-negative entries and continues to b e non-negative without any addi-
tional constraints [21].
5
2.2.2 Parameter Updates
With xt and ut fixed, we update the parameters by minimizing E in (5) with respect to θ. Since the
inputs here are a time-varying sequence, the parameters are updated using dual estimation filtering
[22]; i.e., we put an additional constraint on the parameter s such that they follow a state space
equation of the form:
θt = θt−1 + zt (11)
where zt is Gaussian transition noise over the parameters. This keep s track of their temporal rela-
tionships. Along with this constraint, we update the parame ters using gradient descent. Notice that
with a fixed xt and ut, each of the parameter matrices can be updated independentl y. Matrices C
and B are column normalized after the update to avoid any trivial solution.
Mini-Batch Update: To get faster convergence, the parameters are updated after performing infer-
ence over a large sequence of inputs instead of at every time instance. With this “batch” of signals,
more sophisticated gradient methods, like conjugate gradi ent, can be used and, hence, can lead to
more accurate and faster convergence.
2.3 Building a hierarchy
So far the discussion is focused on encoding a small part of a v ideo frame using a single stage
network. To build a hierarchical model, we use this single st age network as a basic building block
and arrange them up to form a tree structure (see Figure.1b). To learn this hierarchical mode l, we
adopt a greedy layer-wise procedure like many other deep learning methods [6, 8, 11]. Specifically,
we use the following strategy to learn the hierarchical model.
For the first (or bottom) layer, we learn a dynamic network as d escribed above over a group of
small patches from a video. We then take this learned network and replicate it at several places
on a larger part of the input frames (similar to weight sharin g in a convolutional network [23]).
The outputs (causes) from each of these replicated networks are considered as inputs to the layer
above. Similarly, in the second layer the inputs are again grouped together (depending on the spatial
proximity in the image space) and are used to train another dynamic network. Similar procedure can
be followed to build more higher layers.
We again emphasis that the model is learned in a layer-wise ma nner, i.e., there is no top-down
information while learning the network parameters. Also no te that, because of the pooling of the
states at each layers, the receptive field of the causes becomes progressively larger with the depth of
the model.
2.4 Inference with top-down information
With the parameters fixed, we now shift our focus to inference in the hierarchical model with the
top-down information. As we discussed above, the layers in the hierarchy are arranged in a Markov
chain, i.e., the variables at any layer are only influenced by the variables in the layer below and the
layer above. Specifically, the states x(l)
t and the causes u(l)
t at layer l are inferred from u(l−1)
t and
are influenced by x(l+1)
t (through the prediction term C(l+1)x(l+1)
t ) 5. Ideally, to perform inference
in this hierarchical model, all the states and the causes have to be updated simultaneously depending
on the present state of all the other layers until the model re aches equilibrium [10]. However, such
a procedure can be very slow in practice. Instead, we propose an approximate inference procedure
that only requires a single top-down flow of information and then a single bottom-up inference using
this top-down information.
5The suffixes n indicating the group are considered implicit here to simplify the notation.
6
For this we consider that at any layer l a group of input u(l−1,n )
t , ∀n ∈ { 1, 2, ..., N } are encoded
using a group of states x(l,n )
t , ∀n and the causes u(l)
t by minimizing the following energy function:
El(x(l)
t , u(l)
t , θ(l)) =
N∑
n=1
(1
2∥u(l−1,n )
t − C(l)x(l,n )
t ∥2
2 + λ∥x(l,n )
t − A(l)x(l,n )
t−1 ∥1
+
K∑
k=1
|γ(l)
t,k · x(l,n )
t,k |
)
+ β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 (12)
γ(l)
t,k = γ0
[ 1 + exp(−[B(l)u(l)
t ]k)
2
]
where θ(l) = {A(l), B(l), C(l)}. Notice the additional term involving ˆ u(l+1)
t when compared to (5).
This comes from the top-down information, where we call ˆ u(l+1)
t as the top-down prediction of the
causes of layer (l) using the previous states in layer (l + 1) . Specifically, before the “arrival” of a
new observation at time t, at each layer (l) (starting from the top-layer) we first propagate the most
likely causes to the layer below using the state at the previous time instance x(l)
t−1 and the predicted
causes ˆ u(l+1)
t . More formally, the top-down prediction at layer l is obtained as
ˆ u(l)
t = C(l)ˆ x(l)
t
where ˆ x(l)
t = arg min
x(l)
t
λ(l)∥x(l)
t − A(l)x(l)
t−1∥1 + γ0
K∑
k=1
|ˆγt,k · x(l)
t,k | (13)
and ˆγt,k = (exp( −[B(l)ˆ u(l+1)
t ]k))/2
At the top most layer, L, a “bias” is set such that ˆ u(L)
t = ˆ u(L)
t−1, i.e., the top-layer induces some
temporal coherence on the final outputs. From (13), it is easy to show that the predicted states for
layer l can be obtained as
ˆx(l)
t,k =
{
[A(l)x(l)
t−1]k, γ 0γt,k < λ (l)
0, γ 0γt,k ≥ λ(l) (14)
These predicted causesˆ u(l)
t , ∀l ∈ { 1, 2, ..., L} are substituted in (12) and a single layer-wise bottom-
up inference is performed as described in section 2.2.1 6. The combined prior now imposed on the
causes, β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2, is similar to the elastic net prior discussed in [24], leading to
a smoother and biased estimate of the causes.
3 Experiments
3.1 Receptive fields of causes in the hierarchical model
Firstly, we would like to test the ability of the proposed mod el to learn complex features in the
higher-layers of the model. For this we train a two layered ne twork from a natural video. Each
frame in the video was first contrast normalized as described in [13]. Then, we train the first layer
of the model on 4 overlapping contiguous 15 × 15 pixel patches from this video; this layer has
400 dimensional states and 100 dimensional causes. The caus es pool the states related to all the
4 patches. The separation between the overlapping patches he re was 2 pixels, implying that the
receptive field of the causes in the first layer is 17 × 17 pixels. Similarly, the second layer is trained
on 4 causes from the first layer obtained from 4 overlapping 17 × 17 pixel patches from the video.
The separation between the patches here is 3 pixels, implying that the receptive field of the causes
in the second layer is 20 × 20 pixels. The second layer contains 200 dimensional states an d 50
dimensional causes that pools the states related to all the 4 patches.
Figure 2 shows the visualization of the receptive fields of th e invariant units (columns of matrix
B) at each layer. We observe that each dimension of causes in th e first layer represents a group of
6Note that the additional term 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 in the energy function only leads to a minor modification
in the inference procedure, namely this has to be added to h(ut) in (10).
7
(a) Layer 1 invariant matrix, B(1)
(b) Layer 2 invariant matrix, B(2)
Figure 2: Visualization of the receptive fields of the invariant units learned in (a) layer 1 and (b) layer
2 when trained on natural videos. The receptive fields are constructed as a weighted combination of
the dictionary of filters at the bottom layer.
primitive features (like inclined lines) which are localized in orientation or position 7. Whereas, the
causes in the second layer represent more complex features, like corners, angles, etc. These filters
are consistent with the previously proposed methods like Lee et al. [5] and Zeiler et al. [7].
3.2 Role of top-down information
In this section, we show the role of the top-down information during inference, particularly in the
presence of structured noise. Video sequences consisting of objects of three different shapes (Refer
to Figure 3) were constructed. The objective is to classify e ach frame as coming from one of the
three different classes. For this, several 32 × 32 pixel 100 frame long sequences were made using
two objects of the same shape bouncing off each other and the “walls”. Several such sequences were
then concatenated to form a 30,000 long sequence. We train a two layer network using this sequence.
First, we divided each frame into12 × 12 patches with neighboring patches overlapping by 4 pixels;
each frame is divided into 16 patches. The bottom layer was tr ained such the 12 × 12 patches were
used as inputs and were encoded using a 100 dimensional state vector. A 4 contiguous neighboring
patches were pooled to infer the causes that have 40 dimensions. The second layer was trained with
4 first layer causes as inputs, which were itself inferred from20 × 20 contiguous overlapping blocks
of the video frames. The states here are 60 dimensional long and the causes have only 3 dimensions.
It is important to note here that the receptive field of the second layer causes encompasses the entire
frame.
We test the performance of the DPCN in two conditions. The firs t case is with 300 frames of clean
video, with 100 frames per shape, constructed as described above. We consider this as a single video
without considering any discontinuities. In the second case, we corrupt the clean video with “struc-
tured” noise, where we randomly pick a number of objects from same three shapes with a Poisson
distribution (with mean 1.5) and add them to each frame independently at a random locations. There
is no correlation between any two consecutive frames regarding where the “noisy objects” are added
(see Figure.3b).
First we consider the clean video and perform inference with only bottom-up inference, i.e., during
inference we consider ˆ u(l)
t = 0 , ∀l ∈ { 1, 2}. Figure 4a shows the scatter plot of the three dimen-
sional causes at the top layer. Clearly, there are 3 clusters recognizing three different shape in the
video sequence. Figure 4b shows the scatter plot when the sam e procedure is applied on the noisy
video. We observe that 3 shapes here can not be clearly distin guished. Finally, we use top-down
information along with the bottom-up inference as describe d in section 2.4 on the noisy data. We
argue that, since the second layer learned class specific inf ormation, the top-down information can
help the bottom layer units to disambiguate the noisy objects from the true objects. Figure 4c shows
the scatter plot for this case. Clearly, with the top-down in formation, in spite of largely corrupted
sequence, the DPCN is able to separate the frames belonging to the three shapes (the trace from one
cluster to the other is because of the temporal coherence imposed on the causes at the top layer.).
7Please refer to supplementary material for more results.
8
(a) Clear Sequences (b) Corrupted Sequences
Figure 3: Shows part of the (a) clean and (b) corrupted video s equences constructed using three
different shapes. Each row indicates one sequence.
0
5
10
0
2
4
0
2
4
6
Object 1
Object 2
Object 3
(a)
0
5
10
0
2
4
6
0
2
4
6
Object 1
Object 2
Object 3
(b)
0
2
4
6
0
1
2
3
0
2
4
6
Object 1
Object 2
Object 3
(c)
Figure 4: Shows the scatter plot of the 3 dimensional causes a t the top-layer for (a) clean video
with only bottom-up inference, (b) corrupted video with only bottom-up inference and (c) corrupted
video with top-down flow along with bottom-up inference. At e ach point, the shape of the marker
indicates the true shape of the object in the frame.
4 Conclusion
In this paper we proposed the deep predictive coding network , a generative model that empirically
alters the priors in a dynamic and context sensitive manner.This model composes to two main com-
ponents: (a) linear dynamical models with sparse states used for feature extraction, and (b) top-down
information to adapt the empirical priors. The dynamic mode l captures the temporal dependencies
and reduces the instability usually associated with sparse coding 8, while the task specific informa-
tion from the top layers helps to resolve ambiguities in the lower-layer improving data representation
in the presence of noise. We believe that our approach can be extended with convolutional methods,
paving the way for implementation of high-level tasks like o bject recognition, etc., on large scale
videos or images.
Acknowledgments
This work is supported by the Office of Naval Research (ONR) gr ant #N000141010375. We thank
Austin J. Brockmeier and Matthew Emigh for their comments and suggestions.
References
[1] David G. Lowe. Object recognition from local scale-inva riant features. In Proceedings of the
International Conference on Computer V ision-V olume 2 - V ol ume 2 , ICCV ’99, pages 1150–,
1999. ISBN 0-7695-0164-8.
[2] Navneet Dalal and Bill Triggs. Histograms of oriented gr adients for human detection. In
Proceedings of the 2005 IEEE Computer Society Conference on Computer V ision and P attern
Recognition (CVPR’05) - V olume 1 - V olume 01 , CVPR ’05, pages 886–893, 2005. ISBN
0-7695-2372-2.
[3] B. A. Olshausen and D. J. Field. Emergence of simple-cellreceptive field properties by learning
a sparse code for natural images. Nature, 381(6583):607–609, June 1996. ISSN 0028-0836.
[4] L. Wiskott and T.J. Sejnowski. Slow feature analysis: Un supervised learning of invariances.
Neural computation , 14(4):715–770, 2002.
8Please refer to the supplementary material for more details.
9
[5] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y . Ng. Convolutional deep belief
networks for scalable unsupervised learning of hierarchical representations. In Proceedings of
the 26th Annual International Conference on Machine Learni ng, ICML ’09, pages 609–616,
2009. ISBN 978-1-60558-516-1.
[6] K. Kavukcuoglu, P. Sermanet, Y .L. Boureau, K. Gregor, M. Mathieu, and Y . LeCun. Learn-
ing convolutional feature hierarchies for visual recognit ion. Advances in Neural Information
Processing Systems , pages 1090–1098, 2010.
[7] M.D. Zeiler, D. Krishnan, G.W. Taylor, and R. Fergus. Deconvolutional networks. InComputer
V ision and P attern Recognition (CVPR), 2010 IEEE Conferenc e on , pages 2528–2535. IEEE,
2010.
[8] P. Vincent, H. Larochelle, I. Lajoie, Y . Bengio, and P.A.Manzagol. Stacked denoising autoen-
coders: Learning useful representations in a deep network with a local denoising criterion. The
Journal of Machine Learning Research , 11:3371–3408, 2010.
[9] Rajesh P. N. Rao and Dana H. Ballard. Dynamic model of visu al recognition predicts neural
response properties in the visual cortex. Neural Computation , 9:721–763, 1997.
[10] Karl Friston. Hierarchical models in the brain. PLoS Comput Biol , 4(11):e1000211, 11 2008.
[11] Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. AFast Learning Algorithm for Deep
Belief Nets. Neural Comp. , (7):1527–1554, July .
[12] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise train-
ing of deep networks. In In NIPS , 2007.
[13] Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. Fast inference in sparse coding
algorithms with applications to object recognition. CoRR, abs/1010.3467, 2010.
[14] Yan Karklin and Michael S. Lewicki. A hierarchical baye sian model for learning nonlinear
statistical regularities in nonstationary natural signals. Neural Computation , 17:397–423, 2005.
[15] D. Angelosante, G.B. Giannakis, and E. Grossi. Compres sed sensing of time-varying signals.
In Digital Signal Processing, 2009 16th International Confer ence on , pages 1 –8, july 2009.
[16] A. Charles, M.S. Asif, J. Romberg, and C. Rozell. Sparsi ty penalties in dynamical system
estimation. In Information Sciences and Systems (CISS), 2011 45th Annual C onference on ,
pages 1 –6, march 2011.
[17] D. Sejdinovic, C. Andrieu, and R. Piechocki. Bayesian sequential compressed sensing in sparse
dynamical systems. In Communication, Control, and Computing (Allerton), 2010 48 th Annual
Allerton Conference on , pages 1730 –1736, 29 2010-oct. 1 2010. doi: 10.1109/ALLERT ON.
2010.5707125.
[18] X. Chen, Q. Lin, S. Kim, J.G. Carbonell, and E.P. Xing. Sm oothing proximal gradient method
for general structured sparse regression. The Annals of Applied Statistics , 6(2):719–752, 2012.
[19] Amir Beck and Marc Teboulle. A Fast Iterative Shrinkage -Thresholding Algorithm for Linear
Inverse Problems. SIAM Journal on Imaging Sciences , (1):183–202, March . ISSN 19364954.
doi: 10.1137/080716542.
[20] Y . Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming , 103
(1):127–152, 2005.
[21] Karol Gregor and Yann LeCun. Efficient Learning of Sparse Invariant Representations. CoRR,
abs/1105.5307, 2011.
[22] Alex Nelson. Nonlinear estimation and modeling of noisy time-series by d ual Kalman filtering
methods. PhD thesis, 2000.
[23] Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howa rd, W. Hubbard, and L. D.
Jackel. Backpropagation applied to handwritten zip code re cognition. Neural Comput. , 1
(4):541–551, December 1989. ISSN 0899-7667. doi: 10.1162/ neco.1989.1.4.541. URL
http://dx.doi.org/10.1162/neco.1989.1.4.541.
[24] H. Zou and T. Hastie. Regularization and variable selec tion via the elastic net. Journal of the
Royal Statistical Society: Series B (Statistical Methodol ogy), 67(2):301–320, 2005.
10
A Supplementary material for Deep Predictive Coding Networ ks
A.1 From section 2.2.1, computing α ∗
The optimal solution of α in (6) is given by
α ∗ = arg max
∥α ∥∞ ≤1
[α T et − µ
2 ∥α ∥2]
= arg min
∥α ∥∞ ≤1
α − et
µ
2
=S
(et
µ
)
(15)
where S(.) is a function projecting
(
et
µ
)
onto an ℓ∞-ball. This is of the form:
S(x) =
x, −1 ≤ x ≤ 1
1, x > 1
−1, x < −1
A.2 Algorithm for joint inference of the states and the cause s.
Algorithm 1 Updating xt,ut simultaneously using FISTA-like procedure [19].
Require: Take Lx
0,n > 0 ∀n ∈ { 1, 2, ..., N }, Lu
0 > 0 and some η > 1.
1: Initialize x0,n ∈ RK ∀n ∈ { 1, 2, ..., N }, u0 ∈ RD and set ξ1 = u0, z1,n = x0,n .
2: Set step-size parameters: τ1 = 1 .
3: while no convergence do
4: Update
γ = γ0(1 + exp( −[Bui])/2
.
5: for n ∈ { 1, 2, ..., N } do
6: Line search: Find the best step size Lx
k,n .
7: Compute α ∗ from (15)
8: Update xi,n using the gradient from (9) with a soft-thresholding function.
9: Update internal variables zi+1 with step size parameter τi as in [19].
10: end for
11: Compute ∑ N
n=1 |xi,n |
12: Line search: Find the best step size Lu
k .
13: Update ui,n using the gradient of (10) with a soft-thresholding function.
14: Update internal variables ξi+1 with step size parameter τi as in [19].
15: Update
τi+1 =
(
1 +
√
(4τ2
i + 1)
)
/2
.
16: Check for convergence.
17: i = i + 1
18: end while
19: return xi,n ∀n ∈ { 1, 2, ..., N } and ui
11
A.3 Inferring sparse states with known parameters
20 40 60 80 1000
0.5
1
1.5
2
2.5
3
Observation Dimensions
steady state rMSE
Kalman Filter
Proposed
Sparse Coding [20]
Figure 5: Shows the performance of the inference algorithm w ith fixed parameters when compared
with sparse coding and Kalman filtering. For this we first simu late a state sequence with only 20
non-zero elements in a 500-dimensional state vector evolvi ng with a permutation matrix, which is
different for every time instant, followed by a scaling matrix to generate a sequence of observations.
We consider that both the permutation and the scaling matrices are known apriori. The observation
noise is Gaussian zero mean and variance σ2 = 0 .01. We consider sparse state-transition noise,
which is simulated by choosing a subset of active elements in the state vector (number of elements
is chosen randomly via a Poisson distribution with mean 2) an d switching each of them with a
randomly chosen element (with uniform probability over the state vector). This resemble a sparse
innovation in the states. We use these generated observation sequences as inputs and use the apriori
know parameters to infer the states from the dynamic model. F igure 5 shows the results obtained,
where we compare the inferred states from different methodswith the true states in terms of relative
mean squared error (rMSE) (defined as ∥xest
t − xtrue
t ∥/∥xtrue
t ∥). The steady state error (rMSE)
after 50 time instances is plotted versus with the dimension ality of the observation sequence. Each
point is obtained after averaging over 50 runs. We observe th at our model is able to converge to
the true solution even for low dimensional observation, when other methods like sparse coding fail.
We argue that the temporal dependencies considered in our model is able to drive the solution to the
right attractor basin, insulating it from instabilities typically associated with sparse coding [24].
12
A.4 Visualizing first layer of the learned model
(a) Observation matrix (Bases)
Active state
element at (t-1)
Corresponding,
predicted states at (t)
(b) State-transition matrix
Figure 6: Visualization of the parameters. C and A, of the model described in section 3.1. (A)
Shows the learned observation matrix C. Each square block indicates a column of the matrix,
reshaped as √p × √p pixel block. (B) Shows the state transition matrix A using its connections
strength with the observation matrix C. On the left are the basis corresponding to the single active
element in the state at time (t − 1) and on the right are the basis corresponding to the five most
“active” elements in the predicted state (ordered in decreasing order of the magnitude).
(a) Connections
(b) Centers and Orientations (c) Orientations and Frequencies
Figure 7: Connections between the invariant units and the ba sis functions. (A) Shows the connec-
tions between the basis and columns of B. Each row indicates an invariant unit. Here the set of
basis that a strongly correlated to an invariant unit are sho wn, arranged in the decreasing order of
the magnitude. (B) Shows spatially localized grouping of the invariant units. Firstly, we fit a Gabor
function to each of the basis functions. Each subplot here is then obtained by plotting a line indicat-
ing the center and the orientation of the Gabor function. Thecolors indicate the connections strength
with an invariant unit; red indicating stronger connection s and blue indicate almost zero strength.
We randomly select a subset of 25 invariant units here. We obs erve that the invariant unit group
the basis that are local in spatial centers and orientations . (C) Similarly, we show the correspond-
ing orientation and spatial frequency selectivity of the in variant units. Here each plot indicates the
orientation and frequency of each Gabor function color coded according to the connection strengths
with the invariant units. Each subplot is a half-polar plot with the orientation plotted along the angle
ranging from 0 to π and the distance from the center indicating the frequency. A gain, we observe
that the invariant units group the basis that have similar orientation.
13
|
Rakesh Chalasani, Jose C. Principe
|
Unknown
| 2,013
|
{"id": "yyC_7RZTkUD5-", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358405100000, "tmdate": 1358405100000, "ddate": null, "number": 27, "content": {"title": "Deep Predictive Coding Networks", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.", "pdf": "https://arxiv.org/abs/1301.3541", "paperhash": "chalasani|deep_predictive_coding_networks", "authors": ["Rakesh Chalasani", "Jose C. Principe"], "authorids": ["vnit.rakesh@gmail.com", "principe@cnel.ufl.edu"], "keywords": [], "conflicts": []}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vnit.rakesh@gmail.com"], "writers": []}
|
[Review]:
Deep predictive coding networks
This paper introduces a new model which combines bottom-up, top-down, and temporal information to learning a generative model in an unsupervised fashion on videos. The model is formulated in terms of states, which carry temporal consistency information between time steps, and causes which are the latent variables inferred from the input image that attempt to explain what is in the image.
Pros:
Somewhat interesting filters are learned in the second layer of the model, though these have been shown in prior work.
Noise reduction on the toy images seems reasonable.
Cons:
The explanation of the model was overly complicated. After reading the the entire explanation it appears the model is simply doing sparse coding with ISTA alternating on the states and causes. The gradient for ISTA simply has the gradients for the overall cost function, just as in sparse coding but this cost function has some extra temporal terms.
The noise reduction is only on toy images and it is not obvious if this is what you would also get with sparse coding using larger patch sizes and high amounts of sparsity. The explanation of points between clusters coming from change in sequences should also appear in the clean video as well because as the text mentions the video changes as well. This is likely due to multiple objects overlapping instead and confusing the model.
Figure 1 should include the variable names because reading the text and consulting the figure is not very helpful currently.
It is hard to reason what each of the A,B, and C is doing without a picture of what they learn on typical data. The layer 1 features seem fairly complex and noisy for the first layer of an image model which typically learns gabor-like features.
Where did z come from in equation 11?
It is not at all obvious why the states should be temporally consistent and not the causes. The causes are pooled versions of the states and this should be more invariant to changes at the input between frames.
Novelty and Quality:
The paper introduces a novel extension to hierarchical sparse coding method by incorporating temporal information at each layer of the model. The poor explanation of this relatively simple idea holds the paper back slightly.
|
anonymous reviewer ac47
| null | null |
{"id": "d6u7vbCNJV6Q8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361968020000, "tmdate": 1361968020000, "ddate": null, "number": 3, "content": {"title": "review of Deep Predictive Coding Networks", "review": "Deep predictive coding networks\r\n\r\nThis paper introduces a new model which combines bottom-up, top-down, and temporal information to learning a generative model in an unsupervised fashion on videos. The model is formulated in terms of states, which carry temporal consistency information between time steps, and causes which are the latent variables inferred from the input image that attempt to explain what is in the image.\r\n\r\nPros:\r\nSomewhat interesting filters are learned in the second layer of the model, though these have been shown in prior work.\r\n\r\nNoise reduction on the toy images seems reasonable.\r\n\r\nCons:\r\nThe explanation of the model was overly complicated. After reading the the entire explanation it appears the model is simply doing sparse coding with ISTA alternating on the states and causes. The gradient for ISTA simply has the gradients for the overall cost function, just as in sparse coding but this cost function has some extra temporal terms.\r\n\r\nThe noise reduction is only on toy images and it is not obvious if this is what you would also get with sparse coding using larger patch sizes and high amounts of sparsity. The explanation of points between clusters coming from change in sequences should also appear in the clean video as well because as the text mentions the video changes as well. This is likely due to multiple objects overlapping instead and confusing the model.\r\n\r\nFigure 1 should include the variable names because reading the text and consulting the figure is not very helpful currently.\r\n\r\nIt is hard to reason what each of the A,B, and C is doing without a picture of what they learn on typical data. The layer 1 features seem fairly complex and noisy for the first layer of an image model which typically learns gabor-like features.\r\n\r\nWhere did z come from in equation 11?\r\n\r\nIt is not at all obvious why the states should be temporally consistent and not the causes. The causes are pooled versions of the states and this should be more invariant to changes at the input between frames.\r\n\r\nNovelty and Quality:\r\nThe paper introduces a novel extension to hierarchical sparse coding method by incorporating temporal information at each layer of the model. The poor explanation of this relatively simple idea holds the paper back slightly."}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yyC_7RZTkUD5-", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer ac47"], "writers": ["anonymous"]}
|
{
"criticism": 8,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 13,
"praise": 2,
"presentation_and_reporting": 3,
"results_and_discussion": 4,
"suggestion_and_solution": 3,
"total": 18
}
| 1.944444
| 1.549884
| 0.394561
| 1.96768
| 0.25701
| 0.023236
| 0.444444
| 0
| 0.111111
| 0.722222
| 0.111111
| 0.166667
| 0.222222
| 0.166667
|
{
"criticism": 0.4444444444444444,
"example": 0,
"importance_and_relevance": 0.1111111111111111,
"materials_and_methods": 0.7222222222222222,
"praise": 0.1111111111111111,
"presentation_and_reporting": 0.16666666666666666,
"results_and_discussion": 0.2222222222222222,
"suggestion_and_solution": 0.16666666666666666
}
| 1.944444
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yyC_7RZTkUD5-
|
Deep Predictive Coding Networks
|
The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.
|
arXiv:1301.3541v3 [cs.LG] 15 Mar 2013
Deep Predictive Coding Networks
Rakesh Chalasani Jose C. Principe
Department of Electrical and Computer Engineering
University of Florida, Gainesville, FL 32611
rakeshch@ufl.edu, principe@cnel.ufl.edu
Abstract
The quality of data representation in deep learning methods is directly related to
the prior model imposed on the representations; however, ge nerally used fixed
priors are not capable of adjusting to the context in the data. To address this issue,
we propose deep predictive coding networks, a hierarchical generative model that
empirically alters priors on the latent representations in a dynamic and context-
sensitive manner. This model captures the temporal dependencies in time-varying
signals and uses top-down information to modulate the repre sentation in lower
layers. The centerpiece of our model is a novel procedure to infer sparse states of a
dynamic network which is used for feature extraction. We also extend this feature
extraction block to introduce a pooling function that captu res locally invariant
representations. When applied on a natural video data, we sh ow that our method
is able to learn high-level visual features. We also demonstrate the role of the top-
down connections by showing the robustness of the proposed model to structured
noise.
1 Introduction
The performance of machine learning algorithms is dependen t on how the data is represented. In
most methods, the quality of a data representation is itselfdependent on prior knowledge imposed on
the representation. Such prior knowledge can be imposed usi ng domain specific information, as in
SIFT [1], HOG [2], etc., or in learning representations usin g fixed priors like sparsity [3], temporal
coherence [4], etc. The use of fixed priors became particularly popular while training deep networks
[5–8]. In spite of the success of these general purpose prior s, they are not capable of adjusting to
the context in the data. On the other hand, there are several a dvantages to having a model that can
“actively” adapt to the context in the data. One way of achiev ing this is to empirically alter the
priors in a dynamic and context-sensitive manner. This will be the m ain focus of this work, with
emphasis on visual perception.
Here we propose a predictive coding framework, where a deep locally-connected generative model
uses “top-down” information to empirically alter the prior s used in the lower layers to perform
“bottom-up” inference. The centerpiece of the proposed mod el is extracting sparse features from
time-varying observations using a linear dynamical model . To this end, we propose a novel proce-
dure to infer sparse states (or features) of a dynamical system. We then extend this feature extraction
block to introduce a pooling strategy to learn invariant feature representations from the data. In line
with other “deep learning” methods, we use these basic build ing blocks to construct a hierarchical
model using greedy layer-wise unsupervised learning. The h ierarchical model is built such that the
output from one layer acts as an input to the layer above. In other words, the layers are arranged in a
Markov chain such that the states at any layer are only dependent on the representations in the layer
below and above, and are independent of the rest of the model. The overall goal of the dynamical
system at any layer is to make the best prediction of the representation in the layer below using the
top-down information from the layers above and the temporal information from the previous states.
Hence, the name deep predictive coding networks (DPCN).
1
1.1 Related W ork
The DPCN proposed here is closely related to models proposed in [9, 10], where predictive cod-
ing is used as a statistical model to explain cortical functi ons in the mammalian brain. Similar to
the proposed model, they construct hierarchical generative models that seek to infer the underlying
causes of the sensory inputs. While Rao and Ballard [9] use an update rule similar to Kalman filter
for inference, Friston [10] proposed a general framework considering all the higher-order moments
in a continuous time dynamic model. However, neither of the m odels is capable of extracting dis-
criminative information, namely a sparse and invariant representation, from an image sequence that
is helpful for high-level tasks like object recognition. Un like these models, here we propose an
efficient inference procedure to extract locally invariant representation from image sequences and
progressively extract more abstract information at higher levels in the model.
Other methods used for building deep models, like restricted Boltzmann machine (RBM) [11], auto-
encoders [8, 12] and predictive sparse decomposition [13], are also related to the model proposed
here. All these models are constructed on similar underlyin g principles: (1) like ours, they also use
greedy layer-wise unsupervised learning to construct a hierarchical model and (2) each layer consists
of an encoder and a decoder. The key to these models is to learn both encoding and decoding
concurrently (with some regularization like sparsity [13] , denoising [8] or weight sharing [11]),
while building the deep network as a feed forward model using only the encoder. The idea is
to approximate the latent representation using only the fee d-forward encoder, while avoiding the
decoder which typically requires a more expensive inference procedure. However in DPCN there is
no encoder. Instead, DPCN relies on an efficient inference pr ocedure to get a more accurate latent
representation. As we will show below, the use of reciprocal top-down and bottom-up connections
make the proposed model more robust to structured noise duri ng recognition and also allows it to
perform low-level tasks like image denoising.
To scale to large images, several convolutional models are also proposed in a similar deep learning
paradigm [5–7]. Inference in these models is applied over anentire image, rather than small parts of
the input. DPCN can also be extended to form a convolutional network, but this will not be discussed
here.
2 Model
In this section, we begin with a brief description of the gene ral predictive coding framework and
proceed to discuss the details of the architecture used in this work. The basic block of the proposed
model that is pervasive across all layers is a generalized state-space model of the form:
˜ yt = F(xt) + nt
xt = G(xt−1, ut) + vt (1)
where ˜ yt is the data and F and G are some functions that can be parameterized, say byθ. The terms
ut are called the unknown causes . Since we are usually interested in obtaining abstract information
from the observations, the causes are encouraged to have a no n-linear relationship with the obser-
vations. The hidden states, xt, then “mediate the influence of the cause on the output and end ow
the system with memory” [10]. The terms vt and nt are stochastic and model uncertainty. Several
such state-space models can now be stacked, with the output from one acting as an input to the layer
above, to form a hierarchy. Such an L-layered hierarchical model at any time ’ t’ can be described
as1:
u(l−1 )
t = F(x(l)
t ) + n(l)
t ∀l ∈ { 1, 2, ..., L}
x(l)
t = G(x(l)
t−1, u(l)
t ) + v(l)
t (2)
The terms v(l)
t and n(l)
t form stochastic fluctuations at the higher layers and enter e ach layer in-
dependently. In other words, this model forms a Markov chain across the layers, simplifying the
inference procedure. Notice how the causes at the lower laye r form the “observations” to the layer
above — the causes form the link between the layers, and the st ates link the dynamics over time.
The important point in this design is that the higher-level p redictions influence the lower levels’
1When l = 1, i.e., at the bottom layer, u(i− 1)
t = yt, where yt the input data.
2
Causes (ut)
States (xt)
Observations (yt)
(a) Shows a single layered dynamic network
depicting a basic computational block.
- States (xt)
- Causes (ut)
(Invariant Units)
{ {Layer 1 Layer 2
(b) Shows the distributive hierarchical model formed by
stacking several basic blocks.
Figure 1: (a) Shows a single layered network on a group of smal l overlapping patches of the input
video. The green bubbles indicate a group of inputs ( y(n)
t , ∀n), red bubbles indicate their corre-
sponding states ( x(n)
t ) and the blue bubbles indicate the causes ( ut) that pool all the states within
the group. (b) Shows a two-layered hierarchical model const ructed by stacking several such basic
blocks. For visualization no overlapping is shown between the image patches here, but overlapping
patches are considered during actual implementation.
inference. The predictions from a higher layer non-linearl y enter into the state space model by em-
pirically altering the prior on the causes. In summary, the t op-down connections and the temporal
dependencies in the state space influence the latent representation at any layer.
In the following sections, we will first describe a basic comp utational network, as in (1) with a
particular form of the functions F and G. Specifically, we will consider a linear dynamical model
with sparse states for encoding the inputs and the state transitions, followed by the non-linear pooling
function to infer the causes. Next, we will discuss how to stack and learn a hierarchical model using
several of these basic networks. Also, we will discuss how to incorporate the top-down information
during inference in the hierarchical model.
2.1 Dynamic network
To begin with, we consider a dynamic network to extract featu res from a small part of a video
sequence. Let {y1, y2, ..., yt, ...} ∈ RP be a P -dimensional sequence of a patch extracted from
the same location across all the frames in a video 2 . To process this, our network consists of two
distinctive parts (see Figure.1a): feature extraction (inferring states) and pooling (inferring causes).
For the first part, sparse coding is used in conjunction with a linear state space model to map the
inputs yt at time t onto an over-complete dictionary of K-filters, C ∈ RP ×K (K > P ), to get
sparse states xt ∈ RK . To keep track of the dynamics in the latent states we use a lin ear function
with state-transition matrix A ∈ RK×K . More formally, inference of the features xt is performed
by finding a representation that minimizes the energy function:
E1(xt, yt, C, A) = ∥yt − Cxt∥2
2 + λ∥xt − Axt−1∥1 + γ ∥xt∥1 (3)
Notice that the second term involving the state-transition is also constrained to be sparse to make
the state-space representation consistent.
Now, to take advantage of the spatial relationships in a loca l neighborhood, a small group of states
x(n)
t , where n ∈ { 1, 2, ...N } represents a set of contiguous patches w.r.t. the position i n the image
space, are added (orsum pooled ) together. Such pooling of the states may be lead to local translation
invariance. On top this, a D-dimensional causes ut ∈ RD are inferred from the pooled states to
obtain representation that is invariant to more complex loc al transformations like rotation, spatial
frequency, etc. In line with [14], this invariant function i s learned such that it can capture the
dependencies between the components in the pooled states. S pecifically, the causes ut are inferred
2Here yt is a vectorized form of
√
P ×
√
P square patch extracted from a frame at time t.
3
by minimizing the energy function:
E2(ut, xt, B) =
N∑
n=1
( K∑
k=1
|γk · x(n)
t,k |
)
+ β∥ut∥1 (4)
γk = γ0
[ 1 + exp(−[But]k)
2
]
where γ0 > 0 is some constant. Notice that here ut multiplicatively interacts with the accumulated
states through B, modeling the shape of the sparse prior on the states. Essent ially, the invariant
matrix B is adapted such that each component ut connects to a group of components in the ac-
cumulated states that co-occur frequently. In other words, whenever a component in ut is active
it lowers the coefficient of a set of components in x(n)
t , ∀n, making them more likely to be active.
Since co-occurring components typically share some common statistical regularity, such activity of
ut typically leads to locally invariant representation [14].
Though the two cost functions are presented separately abov e, we can combine both to devise a
unified energy function of the form:
E(xt, ut, θ) =
N∑
n=1
(1
2∥y(n)
t − Cx(n)
t ∥2
2 + λ∥x(n)
t − Ax(n)
t−1∥1 +
K∑
k=1
|γt,k · x(n)
t,k |
)
+ β∥ut∥1
(5)
γt,k =γ0
[ 1 + exp(−[But]k)
2
]
where θ = {A, B, C}. As we will discuss next, both xt and ut can be inferred concurrently from
(5) by alternatively updating one while keeping the other fix ed using an efficient proximal gradient
method.
2.2 Learning
To learn the parameters in (5), we alternatively minimize E(xt, ut, θ) using a procedure similar to
block co-ordinate descent. We first infer the latent variabl es (xt, ut) while keeping the parameters
fixed and then update the parameters θ while keeping the variables fixed. This is done until the
parameters converge. We now discuss separately the inferen ce procedure and how we update the
parameters using a gradient descent method with the fixed variables.
2.2.1 Inference
We jointly infer bothxt and ut from (5) using proximal gradient methods, taking alternative gradient
descent steps to update one while holding the other fixed. In o ther words, we alternate between
updating xt and ut using a single update step to minimize E1 and E2, respectively. However,
updating xt is relatively more involved. So, keeping aside the causes, w e first focus on inferring
sparse states alone from E1, and then go back to discuss the joint inference of both the st ates and
the causes.
Inferring States: Inferring sparse states, given the parameters, from a linea r dynamical system
forms the crux of our model. This is performed by finding the so lution that minimizes the energy
function E1 in (3) with respect to the states xt (while keeping the sparsity parameter γ fixed).
Here there are two priors of the states: the temporal depende nce and the sparsity term. Although
this energy function E1 is convex in xt, the presence of two non-smooth terms makes it hard to
use standard optimization techniques used for sparse codin g alone. A similar problem is solved
using dynamic programming [15], homotopy [16] and Bayesian sparse coding [17]; however, the
optimization used in these models is computationally expensive for use in large scale problems like
object recognition.
To overcome this, inspired by the method proposed in [18] for structured sparsity, we propose an
approximate solution that is consistent and able to use effic ient solvers like fast iterative shrinkage
thresholding alogorithm (FISTA) [19]. The key to our approach is to first use Nestrov’s smoothness
method [18, 20] to approximate the non-smooth state transition term. The resulting energy function
4
is a convex and continuously differentiable function in xt with a sparsity constraint, and hence, can
be efficiently solved using proximal methods like FISTA.
To begin, letΩ( xt) = ∥et∥1 where et = ( xt − Axt−1). The idea is to find a smooth approximation
to this function Ω( xt) in et. Notice that, since et is a linear function on xt, the approximation will
also be smooth w.r.t. xt. Now, we can re-write Ω( xt) using the dual norm of ℓ1 as
Ω( xt) = arg max
∥α ∥∞ ≤1
α T et
where α ∈ Rk. Using the smoothing approximation from Nesterov [20] on Ω( xt):
Ω( xt) ≈ fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] (6)
where d(·) = 1
2 ∥α ∥2
2 is a smoothing function and µ is a smoothness parameter. From Nestrov’s
theorem [20], it can be shown that fµ (et) is convex and continuously differentiable in et and the
gradient of fµ (et) with respect to et takes the form
∇et fµ (et) = α ∗ (7)
where α ∗ is the optimal solution to fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] 3. This implies, by using
the chain rule, that fµ (et) is also convex and continuously differentiable in xt and with the same
gradient.
With this smoothing approximation, the overall cost function from (3) can now be re-written as
xt = arg min
xt
1
2∥yt − Cxt∥2
2 + λfµ (et) + γ∥xt∥1 (8)
with the smooth part h(xt) = 1
2 ∥yt − Cxt∥2
2 + λfµ (et) whose gradient with respect to xt is given
by
∇xt h(xt) = CT (yt − Cxt) + λα ∗ (9)
Using the gradient information in (9), we solve for xt from (8) using FISTA [19].
Inferring Causes: Given a group of state vectors, ut can be inferred by minimizing E2, where we
define a generative model that modulates the sparsity of thepooled state vector, ∑
n |x(n)|. Here we
observe that FISTA can be readily applied to infer ut, as the smooth part of the function E2:
h(ut) =
K∑
k=1
(
γ0
[ 1 + exp( −[But]k)
2
]
·
N∑
n=1
|x(n)
t,k |
)
(10)
is convex, continuously differentiable and Lipschitz inut [21] 4. Following [19], it is easy to obtain
a bound on the convergence rate of the solution.
Joint Inference: We showed thus far that bothxt and ut can be inferred from their respective energy
functions using a first-order proximal method called FISTA. However, for joint inference we have
to minimize the combined energy function in (5) over both xt and ut. We do this by alternately
updating xt and ut while holding the other fixed and using a single FISTA update step at each
iteration. It is important to point out that the internal FIS TA step size parameters are maintained
between iterations. This procedure is equivalent to alternating minimization using gradient descent.
Although this procedure no longer guarantees convergence of both xt and ut to the optimal solution,
in all of our simulations it lead to a reasonably good solutio n. Please refer to Algorithm. 1 (in the
supplementary material) for details. Note that, with the alternating update procedure, each xt is now
influenced by the feed-forward observations, temporal pred ictions and the feedback connections
from the causes.
3Please refer to the supplementary material for the exact form of α ∗.
4The matrix B is initialized with non-negative entries and continues to b e non-negative without any addi-
tional constraints [21].
5
2.2.2 Parameter Updates
With xt and ut fixed, we update the parameters by minimizing E in (5) with respect to θ. Since the
inputs here are a time-varying sequence, the parameters are updated using dual estimation filtering
[22]; i.e., we put an additional constraint on the parameter s such that they follow a state space
equation of the form:
θt = θt−1 + zt (11)
where zt is Gaussian transition noise over the parameters. This keep s track of their temporal rela-
tionships. Along with this constraint, we update the parame ters using gradient descent. Notice that
with a fixed xt and ut, each of the parameter matrices can be updated independentl y. Matrices C
and B are column normalized after the update to avoid any trivial solution.
Mini-Batch Update: To get faster convergence, the parameters are updated after performing infer-
ence over a large sequence of inputs instead of at every time instance. With this “batch” of signals,
more sophisticated gradient methods, like conjugate gradi ent, can be used and, hence, can lead to
more accurate and faster convergence.
2.3 Building a hierarchy
So far the discussion is focused on encoding a small part of a v ideo frame using a single stage
network. To build a hierarchical model, we use this single st age network as a basic building block
and arrange them up to form a tree structure (see Figure.1b). To learn this hierarchical mode l, we
adopt a greedy layer-wise procedure like many other deep learning methods [6, 8, 11]. Specifically,
we use the following strategy to learn the hierarchical model.
For the first (or bottom) layer, we learn a dynamic network as d escribed above over a group of
small patches from a video. We then take this learned network and replicate it at several places
on a larger part of the input frames (similar to weight sharin g in a convolutional network [23]).
The outputs (causes) from each of these replicated networks are considered as inputs to the layer
above. Similarly, in the second layer the inputs are again grouped together (depending on the spatial
proximity in the image space) and are used to train another dynamic network. Similar procedure can
be followed to build more higher layers.
We again emphasis that the model is learned in a layer-wise ma nner, i.e., there is no top-down
information while learning the network parameters. Also no te that, because of the pooling of the
states at each layers, the receptive field of the causes becomes progressively larger with the depth of
the model.
2.4 Inference with top-down information
With the parameters fixed, we now shift our focus to inference in the hierarchical model with the
top-down information. As we discussed above, the layers in the hierarchy are arranged in a Markov
chain, i.e., the variables at any layer are only influenced by the variables in the layer below and the
layer above. Specifically, the states x(l)
t and the causes u(l)
t at layer l are inferred from u(l−1)
t and
are influenced by x(l+1)
t (through the prediction term C(l+1)x(l+1)
t ) 5. Ideally, to perform inference
in this hierarchical model, all the states and the causes have to be updated simultaneously depending
on the present state of all the other layers until the model re aches equilibrium [10]. However, such
a procedure can be very slow in practice. Instead, we propose an approximate inference procedure
that only requires a single top-down flow of information and then a single bottom-up inference using
this top-down information.
5The suffixes n indicating the group are considered implicit here to simplify the notation.
6
For this we consider that at any layer l a group of input u(l−1,n )
t , ∀n ∈ { 1, 2, ..., N } are encoded
using a group of states x(l,n )
t , ∀n and the causes u(l)
t by minimizing the following energy function:
El(x(l)
t , u(l)
t , θ(l)) =
N∑
n=1
(1
2∥u(l−1,n )
t − C(l)x(l,n )
t ∥2
2 + λ∥x(l,n )
t − A(l)x(l,n )
t−1 ∥1
+
K∑
k=1
|γ(l)
t,k · x(l,n )
t,k |
)
+ β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 (12)
γ(l)
t,k = γ0
[ 1 + exp(−[B(l)u(l)
t ]k)
2
]
where θ(l) = {A(l), B(l), C(l)}. Notice the additional term involving ˆ u(l+1)
t when compared to (5).
This comes from the top-down information, where we call ˆ u(l+1)
t as the top-down prediction of the
causes of layer (l) using the previous states in layer (l + 1) . Specifically, before the “arrival” of a
new observation at time t, at each layer (l) (starting from the top-layer) we first propagate the most
likely causes to the layer below using the state at the previous time instance x(l)
t−1 and the predicted
causes ˆ u(l+1)
t . More formally, the top-down prediction at layer l is obtained as
ˆ u(l)
t = C(l)ˆ x(l)
t
where ˆ x(l)
t = arg min
x(l)
t
λ(l)∥x(l)
t − A(l)x(l)
t−1∥1 + γ0
K∑
k=1
|ˆγt,k · x(l)
t,k | (13)
and ˆγt,k = (exp( −[B(l)ˆ u(l+1)
t ]k))/2
At the top most layer, L, a “bias” is set such that ˆ u(L)
t = ˆ u(L)
t−1, i.e., the top-layer induces some
temporal coherence on the final outputs. From (13), it is easy to show that the predicted states for
layer l can be obtained as
ˆx(l)
t,k =
{
[A(l)x(l)
t−1]k, γ 0γt,k < λ (l)
0, γ 0γt,k ≥ λ(l) (14)
These predicted causesˆ u(l)
t , ∀l ∈ { 1, 2, ..., L} are substituted in (12) and a single layer-wise bottom-
up inference is performed as described in section 2.2.1 6. The combined prior now imposed on the
causes, β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2, is similar to the elastic net prior discussed in [24], leading to
a smoother and biased estimate of the causes.
3 Experiments
3.1 Receptive fields of causes in the hierarchical model
Firstly, we would like to test the ability of the proposed mod el to learn complex features in the
higher-layers of the model. For this we train a two layered ne twork from a natural video. Each
frame in the video was first contrast normalized as described in [13]. Then, we train the first layer
of the model on 4 overlapping contiguous 15 × 15 pixel patches from this video; this layer has
400 dimensional states and 100 dimensional causes. The caus es pool the states related to all the
4 patches. The separation between the overlapping patches he re was 2 pixels, implying that the
receptive field of the causes in the first layer is 17 × 17 pixels. Similarly, the second layer is trained
on 4 causes from the first layer obtained from 4 overlapping 17 × 17 pixel patches from the video.
The separation between the patches here is 3 pixels, implying that the receptive field of the causes
in the second layer is 20 × 20 pixels. The second layer contains 200 dimensional states an d 50
dimensional causes that pools the states related to all the 4 patches.
Figure 2 shows the visualization of the receptive fields of th e invariant units (columns of matrix
B) at each layer. We observe that each dimension of causes in th e first layer represents a group of
6Note that the additional term 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 in the energy function only leads to a minor modification
in the inference procedure, namely this has to be added to h(ut) in (10).
7
(a) Layer 1 invariant matrix, B(1)
(b) Layer 2 invariant matrix, B(2)
Figure 2: Visualization of the receptive fields of the invariant units learned in (a) layer 1 and (b) layer
2 when trained on natural videos. The receptive fields are constructed as a weighted combination of
the dictionary of filters at the bottom layer.
primitive features (like inclined lines) which are localized in orientation or position 7. Whereas, the
causes in the second layer represent more complex features, like corners, angles, etc. These filters
are consistent with the previously proposed methods like Lee et al. [5] and Zeiler et al. [7].
3.2 Role of top-down information
In this section, we show the role of the top-down information during inference, particularly in the
presence of structured noise. Video sequences consisting of objects of three different shapes (Refer
to Figure 3) were constructed. The objective is to classify e ach frame as coming from one of the
three different classes. For this, several 32 × 32 pixel 100 frame long sequences were made using
two objects of the same shape bouncing off each other and the “walls”. Several such sequences were
then concatenated to form a 30,000 long sequence. We train a two layer network using this sequence.
First, we divided each frame into12 × 12 patches with neighboring patches overlapping by 4 pixels;
each frame is divided into 16 patches. The bottom layer was tr ained such the 12 × 12 patches were
used as inputs and were encoded using a 100 dimensional state vector. A 4 contiguous neighboring
patches were pooled to infer the causes that have 40 dimensions. The second layer was trained with
4 first layer causes as inputs, which were itself inferred from20 × 20 contiguous overlapping blocks
of the video frames. The states here are 60 dimensional long and the causes have only 3 dimensions.
It is important to note here that the receptive field of the second layer causes encompasses the entire
frame.
We test the performance of the DPCN in two conditions. The firs t case is with 300 frames of clean
video, with 100 frames per shape, constructed as described above. We consider this as a single video
without considering any discontinuities. In the second case, we corrupt the clean video with “struc-
tured” noise, where we randomly pick a number of objects from same three shapes with a Poisson
distribution (with mean 1.5) and add them to each frame independently at a random locations. There
is no correlation between any two consecutive frames regarding where the “noisy objects” are added
(see Figure.3b).
First we consider the clean video and perform inference with only bottom-up inference, i.e., during
inference we consider ˆ u(l)
t = 0 , ∀l ∈ { 1, 2}. Figure 4a shows the scatter plot of the three dimen-
sional causes at the top layer. Clearly, there are 3 clusters recognizing three different shape in the
video sequence. Figure 4b shows the scatter plot when the sam e procedure is applied on the noisy
video. We observe that 3 shapes here can not be clearly distin guished. Finally, we use top-down
information along with the bottom-up inference as describe d in section 2.4 on the noisy data. We
argue that, since the second layer learned class specific inf ormation, the top-down information can
help the bottom layer units to disambiguate the noisy objects from the true objects. Figure 4c shows
the scatter plot for this case. Clearly, with the top-down in formation, in spite of largely corrupted
sequence, the DPCN is able to separate the frames belonging to the three shapes (the trace from one
cluster to the other is because of the temporal coherence imposed on the causes at the top layer.).
7Please refer to supplementary material for more results.
8
(a) Clear Sequences (b) Corrupted Sequences
Figure 3: Shows part of the (a) clean and (b) corrupted video s equences constructed using three
different shapes. Each row indicates one sequence.
0
5
10
0
2
4
0
2
4
6
Object 1
Object 2
Object 3
(a)
0
5
10
0
2
4
6
0
2
4
6
Object 1
Object 2
Object 3
(b)
0
2
4
6
0
1
2
3
0
2
4
6
Object 1
Object 2
Object 3
(c)
Figure 4: Shows the scatter plot of the 3 dimensional causes a t the top-layer for (a) clean video
with only bottom-up inference, (b) corrupted video with only bottom-up inference and (c) corrupted
video with top-down flow along with bottom-up inference. At e ach point, the shape of the marker
indicates the true shape of the object in the frame.
4 Conclusion
In this paper we proposed the deep predictive coding network , a generative model that empirically
alters the priors in a dynamic and context sensitive manner.This model composes to two main com-
ponents: (a) linear dynamical models with sparse states used for feature extraction, and (b) top-down
information to adapt the empirical priors. The dynamic mode l captures the temporal dependencies
and reduces the instability usually associated with sparse coding 8, while the task specific informa-
tion from the top layers helps to resolve ambiguities in the lower-layer improving data representation
in the presence of noise. We believe that our approach can be extended with convolutional methods,
paving the way for implementation of high-level tasks like o bject recognition, etc., on large scale
videos or images.
Acknowledgments
This work is supported by the Office of Naval Research (ONR) gr ant #N000141010375. We thank
Austin J. Brockmeier and Matthew Emigh for their comments and suggestions.
References
[1] David G. Lowe. Object recognition from local scale-inva riant features. In Proceedings of the
International Conference on Computer V ision-V olume 2 - V ol ume 2 , ICCV ’99, pages 1150–,
1999. ISBN 0-7695-0164-8.
[2] Navneet Dalal and Bill Triggs. Histograms of oriented gr adients for human detection. In
Proceedings of the 2005 IEEE Computer Society Conference on Computer V ision and P attern
Recognition (CVPR’05) - V olume 1 - V olume 01 , CVPR ’05, pages 886–893, 2005. ISBN
0-7695-2372-2.
[3] B. A. Olshausen and D. J. Field. Emergence of simple-cellreceptive field properties by learning
a sparse code for natural images. Nature, 381(6583):607–609, June 1996. ISSN 0028-0836.
[4] L. Wiskott and T.J. Sejnowski. Slow feature analysis: Un supervised learning of invariances.
Neural computation , 14(4):715–770, 2002.
8Please refer to the supplementary material for more details.
9
[5] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y . Ng. Convolutional deep belief
networks for scalable unsupervised learning of hierarchical representations. In Proceedings of
the 26th Annual International Conference on Machine Learni ng, ICML ’09, pages 609–616,
2009. ISBN 978-1-60558-516-1.
[6] K. Kavukcuoglu, P. Sermanet, Y .L. Boureau, K. Gregor, M. Mathieu, and Y . LeCun. Learn-
ing convolutional feature hierarchies for visual recognit ion. Advances in Neural Information
Processing Systems , pages 1090–1098, 2010.
[7] M.D. Zeiler, D. Krishnan, G.W. Taylor, and R. Fergus. Deconvolutional networks. InComputer
V ision and P attern Recognition (CVPR), 2010 IEEE Conferenc e on , pages 2528–2535. IEEE,
2010.
[8] P. Vincent, H. Larochelle, I. Lajoie, Y . Bengio, and P.A.Manzagol. Stacked denoising autoen-
coders: Learning useful representations in a deep network with a local denoising criterion. The
Journal of Machine Learning Research , 11:3371–3408, 2010.
[9] Rajesh P. N. Rao and Dana H. Ballard. Dynamic model of visu al recognition predicts neural
response properties in the visual cortex. Neural Computation , 9:721–763, 1997.
[10] Karl Friston. Hierarchical models in the brain. PLoS Comput Biol , 4(11):e1000211, 11 2008.
[11] Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. AFast Learning Algorithm for Deep
Belief Nets. Neural Comp. , (7):1527–1554, July .
[12] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise train-
ing of deep networks. In In NIPS , 2007.
[13] Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. Fast inference in sparse coding
algorithms with applications to object recognition. CoRR, abs/1010.3467, 2010.
[14] Yan Karklin and Michael S. Lewicki. A hierarchical baye sian model for learning nonlinear
statistical regularities in nonstationary natural signals. Neural Computation , 17:397–423, 2005.
[15] D. Angelosante, G.B. Giannakis, and E. Grossi. Compres sed sensing of time-varying signals.
In Digital Signal Processing, 2009 16th International Confer ence on , pages 1 –8, july 2009.
[16] A. Charles, M.S. Asif, J. Romberg, and C. Rozell. Sparsi ty penalties in dynamical system
estimation. In Information Sciences and Systems (CISS), 2011 45th Annual C onference on ,
pages 1 –6, march 2011.
[17] D. Sejdinovic, C. Andrieu, and R. Piechocki. Bayesian sequential compressed sensing in sparse
dynamical systems. In Communication, Control, and Computing (Allerton), 2010 48 th Annual
Allerton Conference on , pages 1730 –1736, 29 2010-oct. 1 2010. doi: 10.1109/ALLERT ON.
2010.5707125.
[18] X. Chen, Q. Lin, S. Kim, J.G. Carbonell, and E.P. Xing. Sm oothing proximal gradient method
for general structured sparse regression. The Annals of Applied Statistics , 6(2):719–752, 2012.
[19] Amir Beck and Marc Teboulle. A Fast Iterative Shrinkage -Thresholding Algorithm for Linear
Inverse Problems. SIAM Journal on Imaging Sciences , (1):183–202, March . ISSN 19364954.
doi: 10.1137/080716542.
[20] Y . Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming , 103
(1):127–152, 2005.
[21] Karol Gregor and Yann LeCun. Efficient Learning of Sparse Invariant Representations. CoRR,
abs/1105.5307, 2011.
[22] Alex Nelson. Nonlinear estimation and modeling of noisy time-series by d ual Kalman filtering
methods. PhD thesis, 2000.
[23] Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howa rd, W. Hubbard, and L. D.
Jackel. Backpropagation applied to handwritten zip code re cognition. Neural Comput. , 1
(4):541–551, December 1989. ISSN 0899-7667. doi: 10.1162/ neco.1989.1.4.541. URL
http://dx.doi.org/10.1162/neco.1989.1.4.541.
[24] H. Zou and T. Hastie. Regularization and variable selec tion via the elastic net. Journal of the
Royal Statistical Society: Series B (Statistical Methodol ogy), 67(2):301–320, 2005.
10
A Supplementary material for Deep Predictive Coding Networ ks
A.1 From section 2.2.1, computing α ∗
The optimal solution of α in (6) is given by
α ∗ = arg max
∥α ∥∞ ≤1
[α T et − µ
2 ∥α ∥2]
= arg min
∥α ∥∞ ≤1
α − et
µ
2
=S
(et
µ
)
(15)
where S(.) is a function projecting
(
et
µ
)
onto an ℓ∞-ball. This is of the form:
S(x) =
x, −1 ≤ x ≤ 1
1, x > 1
−1, x < −1
A.2 Algorithm for joint inference of the states and the cause s.
Algorithm 1 Updating xt,ut simultaneously using FISTA-like procedure [19].
Require: Take Lx
0,n > 0 ∀n ∈ { 1, 2, ..., N }, Lu
0 > 0 and some η > 1.
1: Initialize x0,n ∈ RK ∀n ∈ { 1, 2, ..., N }, u0 ∈ RD and set ξ1 = u0, z1,n = x0,n .
2: Set step-size parameters: τ1 = 1 .
3: while no convergence do
4: Update
γ = γ0(1 + exp( −[Bui])/2
.
5: for n ∈ { 1, 2, ..., N } do
6: Line search: Find the best step size Lx
k,n .
7: Compute α ∗ from (15)
8: Update xi,n using the gradient from (9) with a soft-thresholding function.
9: Update internal variables zi+1 with step size parameter τi as in [19].
10: end for
11: Compute ∑ N
n=1 |xi,n |
12: Line search: Find the best step size Lu
k .
13: Update ui,n using the gradient of (10) with a soft-thresholding function.
14: Update internal variables ξi+1 with step size parameter τi as in [19].
15: Update
τi+1 =
(
1 +
√
(4τ2
i + 1)
)
/2
.
16: Check for convergence.
17: i = i + 1
18: end while
19: return xi,n ∀n ∈ { 1, 2, ..., N } and ui
11
A.3 Inferring sparse states with known parameters
20 40 60 80 1000
0.5
1
1.5
2
2.5
3
Observation Dimensions
steady state rMSE
Kalman Filter
Proposed
Sparse Coding [20]
Figure 5: Shows the performance of the inference algorithm w ith fixed parameters when compared
with sparse coding and Kalman filtering. For this we first simu late a state sequence with only 20
non-zero elements in a 500-dimensional state vector evolvi ng with a permutation matrix, which is
different for every time instant, followed by a scaling matrix to generate a sequence of observations.
We consider that both the permutation and the scaling matrices are known apriori. The observation
noise is Gaussian zero mean and variance σ2 = 0 .01. We consider sparse state-transition noise,
which is simulated by choosing a subset of active elements in the state vector (number of elements
is chosen randomly via a Poisson distribution with mean 2) an d switching each of them with a
randomly chosen element (with uniform probability over the state vector). This resemble a sparse
innovation in the states. We use these generated observation sequences as inputs and use the apriori
know parameters to infer the states from the dynamic model. F igure 5 shows the results obtained,
where we compare the inferred states from different methodswith the true states in terms of relative
mean squared error (rMSE) (defined as ∥xest
t − xtrue
t ∥/∥xtrue
t ∥). The steady state error (rMSE)
after 50 time instances is plotted versus with the dimension ality of the observation sequence. Each
point is obtained after averaging over 50 runs. We observe th at our model is able to converge to
the true solution even for low dimensional observation, when other methods like sparse coding fail.
We argue that the temporal dependencies considered in our model is able to drive the solution to the
right attractor basin, insulating it from instabilities typically associated with sparse coding [24].
12
A.4 Visualizing first layer of the learned model
(a) Observation matrix (Bases)
Active state
element at (t-1)
Corresponding,
predicted states at (t)
(b) State-transition matrix
Figure 6: Visualization of the parameters. C and A, of the model described in section 3.1. (A)
Shows the learned observation matrix C. Each square block indicates a column of the matrix,
reshaped as √p × √p pixel block. (B) Shows the state transition matrix A using its connections
strength with the observation matrix C. On the left are the basis corresponding to the single active
element in the state at time (t − 1) and on the right are the basis corresponding to the five most
“active” elements in the predicted state (ordered in decreasing order of the magnitude).
(a) Connections
(b) Centers and Orientations (c) Orientations and Frequencies
Figure 7: Connections between the invariant units and the ba sis functions. (A) Shows the connec-
tions between the basis and columns of B. Each row indicates an invariant unit. Here the set of
basis that a strongly correlated to an invariant unit are sho wn, arranged in the decreasing order of
the magnitude. (B) Shows spatially localized grouping of the invariant units. Firstly, we fit a Gabor
function to each of the basis functions. Each subplot here is then obtained by plotting a line indicat-
ing the center and the orientation of the Gabor function. Thecolors indicate the connections strength
with an invariant unit; red indicating stronger connection s and blue indicate almost zero strength.
We randomly select a subset of 25 invariant units here. We obs erve that the invariant unit group
the basis that are local in spatial centers and orientations . (C) Similarly, we show the correspond-
ing orientation and spatial frequency selectivity of the in variant units. Here each plot indicates the
orientation and frequency of each Gabor function color coded according to the connection strengths
with the invariant units. Each subplot is a half-polar plot with the orientation plotted along the angle
ranging from 0 to π and the distance from the center indicating the frequency. A gain, we observe
that the invariant units group the basis that have similar orientation.
13
|
Rakesh Chalasani, Jose C. Principe
|
Unknown
| 2,013
|
{"id": "yyC_7RZTkUD5-", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358405100000, "tmdate": 1358405100000, "ddate": null, "number": 27, "content": {"title": "Deep Predictive Coding Networks", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.", "pdf": "https://arxiv.org/abs/1301.3541", "paperhash": "chalasani|deep_predictive_coding_networks", "authors": ["Rakesh Chalasani", "Jose C. Principe"], "authorids": ["vnit.rakesh@gmail.com", "principe@cnel.ufl.edu"], "keywords": [], "conflicts": []}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vnit.rakesh@gmail.com"], "writers": []}
|
[Review]:
A brief summary of the paper's contributions, in the context of prior work.
The paper proposes a hierarchical sparse generative model in the context of a dynamical system. The model can capture temporal dependencies in time-varying data, and top-down information (from high-level contextual/causal units) can modulate the states and observations in lower layers.
Experiments were conducted on a natural video dataset, and on a synthetic video dataset with moving geometric shapes. On the natural video dataset, the learned receptive fields represent edge detectors in the first layer, and higher-level concepts such as corners and junctions in the second layer. In the synthetic sequence dataset, hierarchical top-down inference is used to robustly infer about “causal” units associated with object shapes.
An assessment of novelty and quality.
This work can be viewed as a novel extension of hierarchical sparse coding to temporal data. Specifically, it is interesting to see how to incorporate dynamical systems into sparse hierarchical models (that alternate between state units and causal units), and how the model can perform bottom-up/top-down inference. The use of Nestrov’s method to approximate the non-smooth state transition terms in equation 5 is interesting.
The clarity of the paper needs to be improved. For example, it will be helpful to motivate more clearly about the specific formulation of the model (also, see comments below).
The experimental results (identifying high-level causes from corrupted temporal data) seem quite reasonable on the synthetic dataset. However, the results are all too qualitative. The empirical evaluation of the model could be strengthened by directly comparing the DPCN to related works on non-synthetic datasets.
Other questions and comments:
- In the beginning of the section 2.1, please define P, D, K to improve clarity.
- In section 2.2, little explanation about the pooling matrix B is given. Also, more explanations about equation 4 would be desirable.
- What is z_{t} in Equation 11?
- In Section 2.2, it’s not clear how u_hat is computed.
A list of pros and cons (reasons to accept/reject).
Pros:
- The formulation and the proposed solution are technically interesting.
- Experimental results on a synthetic video data set provide a proof-of-concept demonstration.
Cons:
- The significance of the experiments is quite limited. There is no empirical comparison to other models on real tasks.
- Inference seems to be complicated and computationally expensive.
- Unclear presentation
|
anonymous reviewer 1829
| null | null |
{"id": "Za8LX-xwgqXw5", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362498780000, "tmdate": 1362498780000, "ddate": null, "number": 4, "content": {"title": "review of Deep Predictive Coding Networks", "review": "A brief summary of the paper's contributions, in the context of prior work.\r\nThe paper proposes a hierarchical sparse generative model in the context of a dynamical system. The model can capture temporal dependencies in time-varying data, and top-down information (from high-level contextual/causal units) can modulate the states and observations in lower layers. \r\n\r\nExperiments were conducted on a natural video dataset, and on a synthetic video dataset with moving geometric shapes. On the natural video dataset, the learned receptive fields represent edge detectors in the first layer, and higher-level concepts such as corners and junctions in the second layer. In the synthetic sequence dataset, hierarchical top-down inference is used to robustly infer about \u201ccausal\u201d units associated with object shapes.\r\n\r\n\r\nAn assessment of novelty and quality.\r\nThis work can be viewed as a novel extension of hierarchical sparse coding to temporal data. Specifically, it is interesting to see how to incorporate dynamical systems into sparse hierarchical models (that alternate between state units and causal units), and how the model can perform bottom-up/top-down inference. The use of Nestrov\u2019s method to approximate the non-smooth state transition terms in equation 5 is interesting.\r\n\r\nThe clarity of the paper needs to be improved. For example, it will be helpful to motivate more clearly about the specific formulation of the model (also, see comments below). \r\n\r\nThe experimental results (identifying high-level causes from corrupted temporal data) seem quite reasonable on the synthetic dataset. However, the results are all too qualitative. The empirical evaluation of the model could be strengthened by directly comparing the DPCN to related works on non-synthetic datasets.\r\n\r\n\r\nOther questions and comments:\r\n- In the beginning of the section 2.1, please define P, D, K to improve clarity.\r\n- In section 2.2, little explanation about the pooling matrix B is given. Also, more explanations about equation 4 would be desirable.\r\n- What is z_{t} in Equation 11?\r\n- In Section 2.2, it\u2019s not clear how u_hat is computed. \r\n\r\n\r\nA list of pros and cons (reasons to accept/reject).\r\nPros:\r\n- The formulation and the proposed solution are technically interesting. \r\n- Experimental results on a synthetic video data set provide a proof-of-concept demonstration.\r\n\r\nCons:\r\n- The significance of the experiments is quite limited. There is no empirical comparison to other models on real tasks.\r\n- Inference seems to be complicated and computationally expensive. \r\n- Unclear presentation"}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yyC_7RZTkUD5-", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 1829"], "writers": ["anonymous"]}
|
{
"criticism": 7,
"example": 0,
"importance_and_relevance": 5,
"materials_and_methods": 18,
"praise": 3,
"presentation_and_reporting": 5,
"results_and_discussion": 8,
"suggestion_and_solution": 7,
"total": 27
}
| 1.962963
| -1.130393
| 3.093356
| 1.987781
| 0.29221
| 0.024818
| 0.259259
| 0
| 0.185185
| 0.666667
| 0.111111
| 0.185185
| 0.296296
| 0.259259
|
{
"criticism": 0.25925925925925924,
"example": 0,
"importance_and_relevance": 0.18518518518518517,
"materials_and_methods": 0.6666666666666666,
"praise": 0.1111111111111111,
"presentation_and_reporting": 0.18518518518518517,
"results_and_discussion": 0.2962962962962963,
"suggestion_and_solution": 0.25925925925925924
}
| 1.962963
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yyC_7RZTkUD5-
|
Deep Predictive Coding Networks
|
The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.
|
arXiv:1301.3541v3 [cs.LG] 15 Mar 2013
Deep Predictive Coding Networks
Rakesh Chalasani Jose C. Principe
Department of Electrical and Computer Engineering
University of Florida, Gainesville, FL 32611
rakeshch@ufl.edu, principe@cnel.ufl.edu
Abstract
The quality of data representation in deep learning methods is directly related to
the prior model imposed on the representations; however, ge nerally used fixed
priors are not capable of adjusting to the context in the data. To address this issue,
we propose deep predictive coding networks, a hierarchical generative model that
empirically alters priors on the latent representations in a dynamic and context-
sensitive manner. This model captures the temporal dependencies in time-varying
signals and uses top-down information to modulate the repre sentation in lower
layers. The centerpiece of our model is a novel procedure to infer sparse states of a
dynamic network which is used for feature extraction. We also extend this feature
extraction block to introduce a pooling function that captu res locally invariant
representations. When applied on a natural video data, we sh ow that our method
is able to learn high-level visual features. We also demonstrate the role of the top-
down connections by showing the robustness of the proposed model to structured
noise.
1 Introduction
The performance of machine learning algorithms is dependen t on how the data is represented. In
most methods, the quality of a data representation is itselfdependent on prior knowledge imposed on
the representation. Such prior knowledge can be imposed usi ng domain specific information, as in
SIFT [1], HOG [2], etc., or in learning representations usin g fixed priors like sparsity [3], temporal
coherence [4], etc. The use of fixed priors became particularly popular while training deep networks
[5–8]. In spite of the success of these general purpose prior s, they are not capable of adjusting to
the context in the data. On the other hand, there are several a dvantages to having a model that can
“actively” adapt to the context in the data. One way of achiev ing this is to empirically alter the
priors in a dynamic and context-sensitive manner. This will be the m ain focus of this work, with
emphasis on visual perception.
Here we propose a predictive coding framework, where a deep locally-connected generative model
uses “top-down” information to empirically alter the prior s used in the lower layers to perform
“bottom-up” inference. The centerpiece of the proposed mod el is extracting sparse features from
time-varying observations using a linear dynamical model . To this end, we propose a novel proce-
dure to infer sparse states (or features) of a dynamical system. We then extend this feature extraction
block to introduce a pooling strategy to learn invariant feature representations from the data. In line
with other “deep learning” methods, we use these basic build ing blocks to construct a hierarchical
model using greedy layer-wise unsupervised learning. The h ierarchical model is built such that the
output from one layer acts as an input to the layer above. In other words, the layers are arranged in a
Markov chain such that the states at any layer are only dependent on the representations in the layer
below and above, and are independent of the rest of the model. The overall goal of the dynamical
system at any layer is to make the best prediction of the representation in the layer below using the
top-down information from the layers above and the temporal information from the previous states.
Hence, the name deep predictive coding networks (DPCN).
1
1.1 Related W ork
The DPCN proposed here is closely related to models proposed in [9, 10], where predictive cod-
ing is used as a statistical model to explain cortical functi ons in the mammalian brain. Similar to
the proposed model, they construct hierarchical generative models that seek to infer the underlying
causes of the sensory inputs. While Rao and Ballard [9] use an update rule similar to Kalman filter
for inference, Friston [10] proposed a general framework considering all the higher-order moments
in a continuous time dynamic model. However, neither of the m odels is capable of extracting dis-
criminative information, namely a sparse and invariant representation, from an image sequence that
is helpful for high-level tasks like object recognition. Un like these models, here we propose an
efficient inference procedure to extract locally invariant representation from image sequences and
progressively extract more abstract information at higher levels in the model.
Other methods used for building deep models, like restricted Boltzmann machine (RBM) [11], auto-
encoders [8, 12] and predictive sparse decomposition [13], are also related to the model proposed
here. All these models are constructed on similar underlyin g principles: (1) like ours, they also use
greedy layer-wise unsupervised learning to construct a hierarchical model and (2) each layer consists
of an encoder and a decoder. The key to these models is to learn both encoding and decoding
concurrently (with some regularization like sparsity [13] , denoising [8] or weight sharing [11]),
while building the deep network as a feed forward model using only the encoder. The idea is
to approximate the latent representation using only the fee d-forward encoder, while avoiding the
decoder which typically requires a more expensive inference procedure. However in DPCN there is
no encoder. Instead, DPCN relies on an efficient inference pr ocedure to get a more accurate latent
representation. As we will show below, the use of reciprocal top-down and bottom-up connections
make the proposed model more robust to structured noise duri ng recognition and also allows it to
perform low-level tasks like image denoising.
To scale to large images, several convolutional models are also proposed in a similar deep learning
paradigm [5–7]. Inference in these models is applied over anentire image, rather than small parts of
the input. DPCN can also be extended to form a convolutional network, but this will not be discussed
here.
2 Model
In this section, we begin with a brief description of the gene ral predictive coding framework and
proceed to discuss the details of the architecture used in this work. The basic block of the proposed
model that is pervasive across all layers is a generalized state-space model of the form:
˜ yt = F(xt) + nt
xt = G(xt−1, ut) + vt (1)
where ˜ yt is the data and F and G are some functions that can be parameterized, say byθ. The terms
ut are called the unknown causes . Since we are usually interested in obtaining abstract information
from the observations, the causes are encouraged to have a no n-linear relationship with the obser-
vations. The hidden states, xt, then “mediate the influence of the cause on the output and end ow
the system with memory” [10]. The terms vt and nt are stochastic and model uncertainty. Several
such state-space models can now be stacked, with the output from one acting as an input to the layer
above, to form a hierarchy. Such an L-layered hierarchical model at any time ’ t’ can be described
as1:
u(l−1 )
t = F(x(l)
t ) + n(l)
t ∀l ∈ { 1, 2, ..., L}
x(l)
t = G(x(l)
t−1, u(l)
t ) + v(l)
t (2)
The terms v(l)
t and n(l)
t form stochastic fluctuations at the higher layers and enter e ach layer in-
dependently. In other words, this model forms a Markov chain across the layers, simplifying the
inference procedure. Notice how the causes at the lower laye r form the “observations” to the layer
above — the causes form the link between the layers, and the st ates link the dynamics over time.
The important point in this design is that the higher-level p redictions influence the lower levels’
1When l = 1, i.e., at the bottom layer, u(i− 1)
t = yt, where yt the input data.
2
Causes (ut)
States (xt)
Observations (yt)
(a) Shows a single layered dynamic network
depicting a basic computational block.
- States (xt)
- Causes (ut)
(Invariant Units)
{ {Layer 1 Layer 2
(b) Shows the distributive hierarchical model formed by
stacking several basic blocks.
Figure 1: (a) Shows a single layered network on a group of smal l overlapping patches of the input
video. The green bubbles indicate a group of inputs ( y(n)
t , ∀n), red bubbles indicate their corre-
sponding states ( x(n)
t ) and the blue bubbles indicate the causes ( ut) that pool all the states within
the group. (b) Shows a two-layered hierarchical model const ructed by stacking several such basic
blocks. For visualization no overlapping is shown between the image patches here, but overlapping
patches are considered during actual implementation.
inference. The predictions from a higher layer non-linearl y enter into the state space model by em-
pirically altering the prior on the causes. In summary, the t op-down connections and the temporal
dependencies in the state space influence the latent representation at any layer.
In the following sections, we will first describe a basic comp utational network, as in (1) with a
particular form of the functions F and G. Specifically, we will consider a linear dynamical model
with sparse states for encoding the inputs and the state transitions, followed by the non-linear pooling
function to infer the causes. Next, we will discuss how to stack and learn a hierarchical model using
several of these basic networks. Also, we will discuss how to incorporate the top-down information
during inference in the hierarchical model.
2.1 Dynamic network
To begin with, we consider a dynamic network to extract featu res from a small part of a video
sequence. Let {y1, y2, ..., yt, ...} ∈ RP be a P -dimensional sequence of a patch extracted from
the same location across all the frames in a video 2 . To process this, our network consists of two
distinctive parts (see Figure.1a): feature extraction (inferring states) and pooling (inferring causes).
For the first part, sparse coding is used in conjunction with a linear state space model to map the
inputs yt at time t onto an over-complete dictionary of K-filters, C ∈ RP ×K (K > P ), to get
sparse states xt ∈ RK . To keep track of the dynamics in the latent states we use a lin ear function
with state-transition matrix A ∈ RK×K . More formally, inference of the features xt is performed
by finding a representation that minimizes the energy function:
E1(xt, yt, C, A) = ∥yt − Cxt∥2
2 + λ∥xt − Axt−1∥1 + γ ∥xt∥1 (3)
Notice that the second term involving the state-transition is also constrained to be sparse to make
the state-space representation consistent.
Now, to take advantage of the spatial relationships in a loca l neighborhood, a small group of states
x(n)
t , where n ∈ { 1, 2, ...N } represents a set of contiguous patches w.r.t. the position i n the image
space, are added (orsum pooled ) together. Such pooling of the states may be lead to local translation
invariance. On top this, a D-dimensional causes ut ∈ RD are inferred from the pooled states to
obtain representation that is invariant to more complex loc al transformations like rotation, spatial
frequency, etc. In line with [14], this invariant function i s learned such that it can capture the
dependencies between the components in the pooled states. S pecifically, the causes ut are inferred
2Here yt is a vectorized form of
√
P ×
√
P square patch extracted from a frame at time t.
3
by minimizing the energy function:
E2(ut, xt, B) =
N∑
n=1
( K∑
k=1
|γk · x(n)
t,k |
)
+ β∥ut∥1 (4)
γk = γ0
[ 1 + exp(−[But]k)
2
]
where γ0 > 0 is some constant. Notice that here ut multiplicatively interacts with the accumulated
states through B, modeling the shape of the sparse prior on the states. Essent ially, the invariant
matrix B is adapted such that each component ut connects to a group of components in the ac-
cumulated states that co-occur frequently. In other words, whenever a component in ut is active
it lowers the coefficient of a set of components in x(n)
t , ∀n, making them more likely to be active.
Since co-occurring components typically share some common statistical regularity, such activity of
ut typically leads to locally invariant representation [14].
Though the two cost functions are presented separately abov e, we can combine both to devise a
unified energy function of the form:
E(xt, ut, θ) =
N∑
n=1
(1
2∥y(n)
t − Cx(n)
t ∥2
2 + λ∥x(n)
t − Ax(n)
t−1∥1 +
K∑
k=1
|γt,k · x(n)
t,k |
)
+ β∥ut∥1
(5)
γt,k =γ0
[ 1 + exp(−[But]k)
2
]
where θ = {A, B, C}. As we will discuss next, both xt and ut can be inferred concurrently from
(5) by alternatively updating one while keeping the other fix ed using an efficient proximal gradient
method.
2.2 Learning
To learn the parameters in (5), we alternatively minimize E(xt, ut, θ) using a procedure similar to
block co-ordinate descent. We first infer the latent variabl es (xt, ut) while keeping the parameters
fixed and then update the parameters θ while keeping the variables fixed. This is done until the
parameters converge. We now discuss separately the inferen ce procedure and how we update the
parameters using a gradient descent method with the fixed variables.
2.2.1 Inference
We jointly infer bothxt and ut from (5) using proximal gradient methods, taking alternative gradient
descent steps to update one while holding the other fixed. In o ther words, we alternate between
updating xt and ut using a single update step to minimize E1 and E2, respectively. However,
updating xt is relatively more involved. So, keeping aside the causes, w e first focus on inferring
sparse states alone from E1, and then go back to discuss the joint inference of both the st ates and
the causes.
Inferring States: Inferring sparse states, given the parameters, from a linea r dynamical system
forms the crux of our model. This is performed by finding the so lution that minimizes the energy
function E1 in (3) with respect to the states xt (while keeping the sparsity parameter γ fixed).
Here there are two priors of the states: the temporal depende nce and the sparsity term. Although
this energy function E1 is convex in xt, the presence of two non-smooth terms makes it hard to
use standard optimization techniques used for sparse codin g alone. A similar problem is solved
using dynamic programming [15], homotopy [16] and Bayesian sparse coding [17]; however, the
optimization used in these models is computationally expensive for use in large scale problems like
object recognition.
To overcome this, inspired by the method proposed in [18] for structured sparsity, we propose an
approximate solution that is consistent and able to use effic ient solvers like fast iterative shrinkage
thresholding alogorithm (FISTA) [19]. The key to our approach is to first use Nestrov’s smoothness
method [18, 20] to approximate the non-smooth state transition term. The resulting energy function
4
is a convex and continuously differentiable function in xt with a sparsity constraint, and hence, can
be efficiently solved using proximal methods like FISTA.
To begin, letΩ( xt) = ∥et∥1 where et = ( xt − Axt−1). The idea is to find a smooth approximation
to this function Ω( xt) in et. Notice that, since et is a linear function on xt, the approximation will
also be smooth w.r.t. xt. Now, we can re-write Ω( xt) using the dual norm of ℓ1 as
Ω( xt) = arg max
∥α ∥∞ ≤1
α T et
where α ∈ Rk. Using the smoothing approximation from Nesterov [20] on Ω( xt):
Ω( xt) ≈ fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] (6)
where d(·) = 1
2 ∥α ∥2
2 is a smoothing function and µ is a smoothness parameter. From Nestrov’s
theorem [20], it can be shown that fµ (et) is convex and continuously differentiable in et and the
gradient of fµ (et) with respect to et takes the form
∇et fµ (et) = α ∗ (7)
where α ∗ is the optimal solution to fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] 3. This implies, by using
the chain rule, that fµ (et) is also convex and continuously differentiable in xt and with the same
gradient.
With this smoothing approximation, the overall cost function from (3) can now be re-written as
xt = arg min
xt
1
2∥yt − Cxt∥2
2 + λfµ (et) + γ∥xt∥1 (8)
with the smooth part h(xt) = 1
2 ∥yt − Cxt∥2
2 + λfµ (et) whose gradient with respect to xt is given
by
∇xt h(xt) = CT (yt − Cxt) + λα ∗ (9)
Using the gradient information in (9), we solve for xt from (8) using FISTA [19].
Inferring Causes: Given a group of state vectors, ut can be inferred by minimizing E2, where we
define a generative model that modulates the sparsity of thepooled state vector, ∑
n |x(n)|. Here we
observe that FISTA can be readily applied to infer ut, as the smooth part of the function E2:
h(ut) =
K∑
k=1
(
γ0
[ 1 + exp( −[But]k)
2
]
·
N∑
n=1
|x(n)
t,k |
)
(10)
is convex, continuously differentiable and Lipschitz inut [21] 4. Following [19], it is easy to obtain
a bound on the convergence rate of the solution.
Joint Inference: We showed thus far that bothxt and ut can be inferred from their respective energy
functions using a first-order proximal method called FISTA. However, for joint inference we have
to minimize the combined energy function in (5) over both xt and ut. We do this by alternately
updating xt and ut while holding the other fixed and using a single FISTA update step at each
iteration. It is important to point out that the internal FIS TA step size parameters are maintained
between iterations. This procedure is equivalent to alternating minimization using gradient descent.
Although this procedure no longer guarantees convergence of both xt and ut to the optimal solution,
in all of our simulations it lead to a reasonably good solutio n. Please refer to Algorithm. 1 (in the
supplementary material) for details. Note that, with the alternating update procedure, each xt is now
influenced by the feed-forward observations, temporal pred ictions and the feedback connections
from the causes.
3Please refer to the supplementary material for the exact form of α ∗.
4The matrix B is initialized with non-negative entries and continues to b e non-negative without any addi-
tional constraints [21].
5
2.2.2 Parameter Updates
With xt and ut fixed, we update the parameters by minimizing E in (5) with respect to θ. Since the
inputs here are a time-varying sequence, the parameters are updated using dual estimation filtering
[22]; i.e., we put an additional constraint on the parameter s such that they follow a state space
equation of the form:
θt = θt−1 + zt (11)
where zt is Gaussian transition noise over the parameters. This keep s track of their temporal rela-
tionships. Along with this constraint, we update the parame ters using gradient descent. Notice that
with a fixed xt and ut, each of the parameter matrices can be updated independentl y. Matrices C
and B are column normalized after the update to avoid any trivial solution.
Mini-Batch Update: To get faster convergence, the parameters are updated after performing infer-
ence over a large sequence of inputs instead of at every time instance. With this “batch” of signals,
more sophisticated gradient methods, like conjugate gradi ent, can be used and, hence, can lead to
more accurate and faster convergence.
2.3 Building a hierarchy
So far the discussion is focused on encoding a small part of a v ideo frame using a single stage
network. To build a hierarchical model, we use this single st age network as a basic building block
and arrange them up to form a tree structure (see Figure.1b). To learn this hierarchical mode l, we
adopt a greedy layer-wise procedure like many other deep learning methods [6, 8, 11]. Specifically,
we use the following strategy to learn the hierarchical model.
For the first (or bottom) layer, we learn a dynamic network as d escribed above over a group of
small patches from a video. We then take this learned network and replicate it at several places
on a larger part of the input frames (similar to weight sharin g in a convolutional network [23]).
The outputs (causes) from each of these replicated networks are considered as inputs to the layer
above. Similarly, in the second layer the inputs are again grouped together (depending on the spatial
proximity in the image space) and are used to train another dynamic network. Similar procedure can
be followed to build more higher layers.
We again emphasis that the model is learned in a layer-wise ma nner, i.e., there is no top-down
information while learning the network parameters. Also no te that, because of the pooling of the
states at each layers, the receptive field of the causes becomes progressively larger with the depth of
the model.
2.4 Inference with top-down information
With the parameters fixed, we now shift our focus to inference in the hierarchical model with the
top-down information. As we discussed above, the layers in the hierarchy are arranged in a Markov
chain, i.e., the variables at any layer are only influenced by the variables in the layer below and the
layer above. Specifically, the states x(l)
t and the causes u(l)
t at layer l are inferred from u(l−1)
t and
are influenced by x(l+1)
t (through the prediction term C(l+1)x(l+1)
t ) 5. Ideally, to perform inference
in this hierarchical model, all the states and the causes have to be updated simultaneously depending
on the present state of all the other layers until the model re aches equilibrium [10]. However, such
a procedure can be very slow in practice. Instead, we propose an approximate inference procedure
that only requires a single top-down flow of information and then a single bottom-up inference using
this top-down information.
5The suffixes n indicating the group are considered implicit here to simplify the notation.
6
For this we consider that at any layer l a group of input u(l−1,n )
t , ∀n ∈ { 1, 2, ..., N } are encoded
using a group of states x(l,n )
t , ∀n and the causes u(l)
t by minimizing the following energy function:
El(x(l)
t , u(l)
t , θ(l)) =
N∑
n=1
(1
2∥u(l−1,n )
t − C(l)x(l,n )
t ∥2
2 + λ∥x(l,n )
t − A(l)x(l,n )
t−1 ∥1
+
K∑
k=1
|γ(l)
t,k · x(l,n )
t,k |
)
+ β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 (12)
γ(l)
t,k = γ0
[ 1 + exp(−[B(l)u(l)
t ]k)
2
]
where θ(l) = {A(l), B(l), C(l)}. Notice the additional term involving ˆ u(l+1)
t when compared to (5).
This comes from the top-down information, where we call ˆ u(l+1)
t as the top-down prediction of the
causes of layer (l) using the previous states in layer (l + 1) . Specifically, before the “arrival” of a
new observation at time t, at each layer (l) (starting from the top-layer) we first propagate the most
likely causes to the layer below using the state at the previous time instance x(l)
t−1 and the predicted
causes ˆ u(l+1)
t . More formally, the top-down prediction at layer l is obtained as
ˆ u(l)
t = C(l)ˆ x(l)
t
where ˆ x(l)
t = arg min
x(l)
t
λ(l)∥x(l)
t − A(l)x(l)
t−1∥1 + γ0
K∑
k=1
|ˆγt,k · x(l)
t,k | (13)
and ˆγt,k = (exp( −[B(l)ˆ u(l+1)
t ]k))/2
At the top most layer, L, a “bias” is set such that ˆ u(L)
t = ˆ u(L)
t−1, i.e., the top-layer induces some
temporal coherence on the final outputs. From (13), it is easy to show that the predicted states for
layer l can be obtained as
ˆx(l)
t,k =
{
[A(l)x(l)
t−1]k, γ 0γt,k < λ (l)
0, γ 0γt,k ≥ λ(l) (14)
These predicted causesˆ u(l)
t , ∀l ∈ { 1, 2, ..., L} are substituted in (12) and a single layer-wise bottom-
up inference is performed as described in section 2.2.1 6. The combined prior now imposed on the
causes, β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2, is similar to the elastic net prior discussed in [24], leading to
a smoother and biased estimate of the causes.
3 Experiments
3.1 Receptive fields of causes in the hierarchical model
Firstly, we would like to test the ability of the proposed mod el to learn complex features in the
higher-layers of the model. For this we train a two layered ne twork from a natural video. Each
frame in the video was first contrast normalized as described in [13]. Then, we train the first layer
of the model on 4 overlapping contiguous 15 × 15 pixel patches from this video; this layer has
400 dimensional states and 100 dimensional causes. The caus es pool the states related to all the
4 patches. The separation between the overlapping patches he re was 2 pixels, implying that the
receptive field of the causes in the first layer is 17 × 17 pixels. Similarly, the second layer is trained
on 4 causes from the first layer obtained from 4 overlapping 17 × 17 pixel patches from the video.
The separation between the patches here is 3 pixels, implying that the receptive field of the causes
in the second layer is 20 × 20 pixels. The second layer contains 200 dimensional states an d 50
dimensional causes that pools the states related to all the 4 patches.
Figure 2 shows the visualization of the receptive fields of th e invariant units (columns of matrix
B) at each layer. We observe that each dimension of causes in th e first layer represents a group of
6Note that the additional term 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 in the energy function only leads to a minor modification
in the inference procedure, namely this has to be added to h(ut) in (10).
7
(a) Layer 1 invariant matrix, B(1)
(b) Layer 2 invariant matrix, B(2)
Figure 2: Visualization of the receptive fields of the invariant units learned in (a) layer 1 and (b) layer
2 when trained on natural videos. The receptive fields are constructed as a weighted combination of
the dictionary of filters at the bottom layer.
primitive features (like inclined lines) which are localized in orientation or position 7. Whereas, the
causes in the second layer represent more complex features, like corners, angles, etc. These filters
are consistent with the previously proposed methods like Lee et al. [5] and Zeiler et al. [7].
3.2 Role of top-down information
In this section, we show the role of the top-down information during inference, particularly in the
presence of structured noise. Video sequences consisting of objects of three different shapes (Refer
to Figure 3) were constructed. The objective is to classify e ach frame as coming from one of the
three different classes. For this, several 32 × 32 pixel 100 frame long sequences were made using
two objects of the same shape bouncing off each other and the “walls”. Several such sequences were
then concatenated to form a 30,000 long sequence. We train a two layer network using this sequence.
First, we divided each frame into12 × 12 patches with neighboring patches overlapping by 4 pixels;
each frame is divided into 16 patches. The bottom layer was tr ained such the 12 × 12 patches were
used as inputs and were encoded using a 100 dimensional state vector. A 4 contiguous neighboring
patches were pooled to infer the causes that have 40 dimensions. The second layer was trained with
4 first layer causes as inputs, which were itself inferred from20 × 20 contiguous overlapping blocks
of the video frames. The states here are 60 dimensional long and the causes have only 3 dimensions.
It is important to note here that the receptive field of the second layer causes encompasses the entire
frame.
We test the performance of the DPCN in two conditions. The firs t case is with 300 frames of clean
video, with 100 frames per shape, constructed as described above. We consider this as a single video
without considering any discontinuities. In the second case, we corrupt the clean video with “struc-
tured” noise, where we randomly pick a number of objects from same three shapes with a Poisson
distribution (with mean 1.5) and add them to each frame independently at a random locations. There
is no correlation between any two consecutive frames regarding where the “noisy objects” are added
(see Figure.3b).
First we consider the clean video and perform inference with only bottom-up inference, i.e., during
inference we consider ˆ u(l)
t = 0 , ∀l ∈ { 1, 2}. Figure 4a shows the scatter plot of the three dimen-
sional causes at the top layer. Clearly, there are 3 clusters recognizing three different shape in the
video sequence. Figure 4b shows the scatter plot when the sam e procedure is applied on the noisy
video. We observe that 3 shapes here can not be clearly distin guished. Finally, we use top-down
information along with the bottom-up inference as describe d in section 2.4 on the noisy data. We
argue that, since the second layer learned class specific inf ormation, the top-down information can
help the bottom layer units to disambiguate the noisy objects from the true objects. Figure 4c shows
the scatter plot for this case. Clearly, with the top-down in formation, in spite of largely corrupted
sequence, the DPCN is able to separate the frames belonging to the three shapes (the trace from one
cluster to the other is because of the temporal coherence imposed on the causes at the top layer.).
7Please refer to supplementary material for more results.
8
(a) Clear Sequences (b) Corrupted Sequences
Figure 3: Shows part of the (a) clean and (b) corrupted video s equences constructed using three
different shapes. Each row indicates one sequence.
0
5
10
0
2
4
0
2
4
6
Object 1
Object 2
Object 3
(a)
0
5
10
0
2
4
6
0
2
4
6
Object 1
Object 2
Object 3
(b)
0
2
4
6
0
1
2
3
0
2
4
6
Object 1
Object 2
Object 3
(c)
Figure 4: Shows the scatter plot of the 3 dimensional causes a t the top-layer for (a) clean video
with only bottom-up inference, (b) corrupted video with only bottom-up inference and (c) corrupted
video with top-down flow along with bottom-up inference. At e ach point, the shape of the marker
indicates the true shape of the object in the frame.
4 Conclusion
In this paper we proposed the deep predictive coding network , a generative model that empirically
alters the priors in a dynamic and context sensitive manner.This model composes to two main com-
ponents: (a) linear dynamical models with sparse states used for feature extraction, and (b) top-down
information to adapt the empirical priors. The dynamic mode l captures the temporal dependencies
and reduces the instability usually associated with sparse coding 8, while the task specific informa-
tion from the top layers helps to resolve ambiguities in the lower-layer improving data representation
in the presence of noise. We believe that our approach can be extended with convolutional methods,
paving the way for implementation of high-level tasks like o bject recognition, etc., on large scale
videos or images.
Acknowledgments
This work is supported by the Office of Naval Research (ONR) gr ant #N000141010375. We thank
Austin J. Brockmeier and Matthew Emigh for their comments and suggestions.
References
[1] David G. Lowe. Object recognition from local scale-inva riant features. In Proceedings of the
International Conference on Computer V ision-V olume 2 - V ol ume 2 , ICCV ’99, pages 1150–,
1999. ISBN 0-7695-0164-8.
[2] Navneet Dalal and Bill Triggs. Histograms of oriented gr adients for human detection. In
Proceedings of the 2005 IEEE Computer Society Conference on Computer V ision and P attern
Recognition (CVPR’05) - V olume 1 - V olume 01 , CVPR ’05, pages 886–893, 2005. ISBN
0-7695-2372-2.
[3] B. A. Olshausen and D. J. Field. Emergence of simple-cellreceptive field properties by learning
a sparse code for natural images. Nature, 381(6583):607–609, June 1996. ISSN 0028-0836.
[4] L. Wiskott and T.J. Sejnowski. Slow feature analysis: Un supervised learning of invariances.
Neural computation , 14(4):715–770, 2002.
8Please refer to the supplementary material for more details.
9
[5] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y . Ng. Convolutional deep belief
networks for scalable unsupervised learning of hierarchical representations. In Proceedings of
the 26th Annual International Conference on Machine Learni ng, ICML ’09, pages 609–616,
2009. ISBN 978-1-60558-516-1.
[6] K. Kavukcuoglu, P. Sermanet, Y .L. Boureau, K. Gregor, M. Mathieu, and Y . LeCun. Learn-
ing convolutional feature hierarchies for visual recognit ion. Advances in Neural Information
Processing Systems , pages 1090–1098, 2010.
[7] M.D. Zeiler, D. Krishnan, G.W. Taylor, and R. Fergus. Deconvolutional networks. InComputer
V ision and P attern Recognition (CVPR), 2010 IEEE Conferenc e on , pages 2528–2535. IEEE,
2010.
[8] P. Vincent, H. Larochelle, I. Lajoie, Y . Bengio, and P.A.Manzagol. Stacked denoising autoen-
coders: Learning useful representations in a deep network with a local denoising criterion. The
Journal of Machine Learning Research , 11:3371–3408, 2010.
[9] Rajesh P. N. Rao and Dana H. Ballard. Dynamic model of visu al recognition predicts neural
response properties in the visual cortex. Neural Computation , 9:721–763, 1997.
[10] Karl Friston. Hierarchical models in the brain. PLoS Comput Biol , 4(11):e1000211, 11 2008.
[11] Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. AFast Learning Algorithm for Deep
Belief Nets. Neural Comp. , (7):1527–1554, July .
[12] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise train-
ing of deep networks. In In NIPS , 2007.
[13] Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. Fast inference in sparse coding
algorithms with applications to object recognition. CoRR, abs/1010.3467, 2010.
[14] Yan Karklin and Michael S. Lewicki. A hierarchical baye sian model for learning nonlinear
statistical regularities in nonstationary natural signals. Neural Computation , 17:397–423, 2005.
[15] D. Angelosante, G.B. Giannakis, and E. Grossi. Compres sed sensing of time-varying signals.
In Digital Signal Processing, 2009 16th International Confer ence on , pages 1 –8, july 2009.
[16] A. Charles, M.S. Asif, J. Romberg, and C. Rozell. Sparsi ty penalties in dynamical system
estimation. In Information Sciences and Systems (CISS), 2011 45th Annual C onference on ,
pages 1 –6, march 2011.
[17] D. Sejdinovic, C. Andrieu, and R. Piechocki. Bayesian sequential compressed sensing in sparse
dynamical systems. In Communication, Control, and Computing (Allerton), 2010 48 th Annual
Allerton Conference on , pages 1730 –1736, 29 2010-oct. 1 2010. doi: 10.1109/ALLERT ON.
2010.5707125.
[18] X. Chen, Q. Lin, S. Kim, J.G. Carbonell, and E.P. Xing. Sm oothing proximal gradient method
for general structured sparse regression. The Annals of Applied Statistics , 6(2):719–752, 2012.
[19] Amir Beck and Marc Teboulle. A Fast Iterative Shrinkage -Thresholding Algorithm for Linear
Inverse Problems. SIAM Journal on Imaging Sciences , (1):183–202, March . ISSN 19364954.
doi: 10.1137/080716542.
[20] Y . Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming , 103
(1):127–152, 2005.
[21] Karol Gregor and Yann LeCun. Efficient Learning of Sparse Invariant Representations. CoRR,
abs/1105.5307, 2011.
[22] Alex Nelson. Nonlinear estimation and modeling of noisy time-series by d ual Kalman filtering
methods. PhD thesis, 2000.
[23] Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howa rd, W. Hubbard, and L. D.
Jackel. Backpropagation applied to handwritten zip code re cognition. Neural Comput. , 1
(4):541–551, December 1989. ISSN 0899-7667. doi: 10.1162/ neco.1989.1.4.541. URL
http://dx.doi.org/10.1162/neco.1989.1.4.541.
[24] H. Zou and T. Hastie. Regularization and variable selec tion via the elastic net. Journal of the
Royal Statistical Society: Series B (Statistical Methodol ogy), 67(2):301–320, 2005.
10
A Supplementary material for Deep Predictive Coding Networ ks
A.1 From section 2.2.1, computing α ∗
The optimal solution of α in (6) is given by
α ∗ = arg max
∥α ∥∞ ≤1
[α T et − µ
2 ∥α ∥2]
= arg min
∥α ∥∞ ≤1
α − et
µ
2
=S
(et
µ
)
(15)
where S(.) is a function projecting
(
et
µ
)
onto an ℓ∞-ball. This is of the form:
S(x) =
x, −1 ≤ x ≤ 1
1, x > 1
−1, x < −1
A.2 Algorithm for joint inference of the states and the cause s.
Algorithm 1 Updating xt,ut simultaneously using FISTA-like procedure [19].
Require: Take Lx
0,n > 0 ∀n ∈ { 1, 2, ..., N }, Lu
0 > 0 and some η > 1.
1: Initialize x0,n ∈ RK ∀n ∈ { 1, 2, ..., N }, u0 ∈ RD and set ξ1 = u0, z1,n = x0,n .
2: Set step-size parameters: τ1 = 1 .
3: while no convergence do
4: Update
γ = γ0(1 + exp( −[Bui])/2
.
5: for n ∈ { 1, 2, ..., N } do
6: Line search: Find the best step size Lx
k,n .
7: Compute α ∗ from (15)
8: Update xi,n using the gradient from (9) with a soft-thresholding function.
9: Update internal variables zi+1 with step size parameter τi as in [19].
10: end for
11: Compute ∑ N
n=1 |xi,n |
12: Line search: Find the best step size Lu
k .
13: Update ui,n using the gradient of (10) with a soft-thresholding function.
14: Update internal variables ξi+1 with step size parameter τi as in [19].
15: Update
τi+1 =
(
1 +
√
(4τ2
i + 1)
)
/2
.
16: Check for convergence.
17: i = i + 1
18: end while
19: return xi,n ∀n ∈ { 1, 2, ..., N } and ui
11
A.3 Inferring sparse states with known parameters
20 40 60 80 1000
0.5
1
1.5
2
2.5
3
Observation Dimensions
steady state rMSE
Kalman Filter
Proposed
Sparse Coding [20]
Figure 5: Shows the performance of the inference algorithm w ith fixed parameters when compared
with sparse coding and Kalman filtering. For this we first simu late a state sequence with only 20
non-zero elements in a 500-dimensional state vector evolvi ng with a permutation matrix, which is
different for every time instant, followed by a scaling matrix to generate a sequence of observations.
We consider that both the permutation and the scaling matrices are known apriori. The observation
noise is Gaussian zero mean and variance σ2 = 0 .01. We consider sparse state-transition noise,
which is simulated by choosing a subset of active elements in the state vector (number of elements
is chosen randomly via a Poisson distribution with mean 2) an d switching each of them with a
randomly chosen element (with uniform probability over the state vector). This resemble a sparse
innovation in the states. We use these generated observation sequences as inputs and use the apriori
know parameters to infer the states from the dynamic model. F igure 5 shows the results obtained,
where we compare the inferred states from different methodswith the true states in terms of relative
mean squared error (rMSE) (defined as ∥xest
t − xtrue
t ∥/∥xtrue
t ∥). The steady state error (rMSE)
after 50 time instances is plotted versus with the dimension ality of the observation sequence. Each
point is obtained after averaging over 50 runs. We observe th at our model is able to converge to
the true solution even for low dimensional observation, when other methods like sparse coding fail.
We argue that the temporal dependencies considered in our model is able to drive the solution to the
right attractor basin, insulating it from instabilities typically associated with sparse coding [24].
12
A.4 Visualizing first layer of the learned model
(a) Observation matrix (Bases)
Active state
element at (t-1)
Corresponding,
predicted states at (t)
(b) State-transition matrix
Figure 6: Visualization of the parameters. C and A, of the model described in section 3.1. (A)
Shows the learned observation matrix C. Each square block indicates a column of the matrix,
reshaped as √p × √p pixel block. (B) Shows the state transition matrix A using its connections
strength with the observation matrix C. On the left are the basis corresponding to the single active
element in the state at time (t − 1) and on the right are the basis corresponding to the five most
“active” elements in the predicted state (ordered in decreasing order of the magnitude).
(a) Connections
(b) Centers and Orientations (c) Orientations and Frequencies
Figure 7: Connections between the invariant units and the ba sis functions. (A) Shows the connec-
tions between the basis and columns of B. Each row indicates an invariant unit. Here the set of
basis that a strongly correlated to an invariant unit are sho wn, arranged in the decreasing order of
the magnitude. (B) Shows spatially localized grouping of the invariant units. Firstly, we fit a Gabor
function to each of the basis functions. Each subplot here is then obtained by plotting a line indicat-
ing the center and the orientation of the Gabor function. Thecolors indicate the connections strength
with an invariant unit; red indicating stronger connection s and blue indicate almost zero strength.
We randomly select a subset of 25 invariant units here. We obs erve that the invariant unit group
the basis that are local in spatial centers and orientations . (C) Similarly, we show the correspond-
ing orientation and spatial frequency selectivity of the in variant units. Here each plot indicates the
orientation and frequency of each Gabor function color coded according to the connection strengths
with the invariant units. Each subplot is a half-polar plot with the orientation plotted along the angle
ranging from 0 to π and the distance from the center indicating the frequency. A gain, we observe
that the invariant units group the basis that have similar orientation.
13
|
Rakesh Chalasani, Jose C. Principe
|
Unknown
| 2,013
|
{"id": "yyC_7RZTkUD5-", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358405100000, "tmdate": 1358405100000, "ddate": null, "number": 27, "content": {"title": "Deep Predictive Coding Networks", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.", "pdf": "https://arxiv.org/abs/1301.3541", "paperhash": "chalasani|deep_predictive_coding_networks", "authors": ["Rakesh Chalasani", "Jose C. Principe"], "authorids": ["vnit.rakesh@gmail.com", "principe@cnel.ufl.edu"], "keywords": [], "conflicts": []}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vnit.rakesh@gmail.com"], "writers": []}
|
[Review]:
The revised paper is uploaded onto arXiv. It will be announced on 18th March.
In the mean time, the paper is also made available at
https://www.dropbox.com/s/klmpu482q6nt1ws/DPCN.pdf
|
Rakesh Chalasani, Jose C. Principe
| null | null |
{"id": "Xu4KaWxqIDurf", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363393200000, "tmdate": 1363393200000, "ddate": null, "number": 2, "content": {"title": "", "review": "The revised paper is uploaded onto arXiv. It will be announced on 18th March.\r\n\r\nIn the mean time, the paper is also made available at \r\nhttps://www.dropbox.com/s/klmpu482q6nt1ws/DPCN.pdf"}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yyC_7RZTkUD5-", "readers": ["everyone"], "nonreaders": [], "signatures": ["Rakesh Chalasani, Jose C. Principe"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 3
}
| 0
| -1.578243
| 1.578243
| 0.001723
| 0.014942
| 0.001723
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 0
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yyC_7RZTkUD5-
|
Deep Predictive Coding Networks
|
The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.
|
arXiv:1301.3541v3 [cs.LG] 15 Mar 2013
Deep Predictive Coding Networks
Rakesh Chalasani Jose C. Principe
Department of Electrical and Computer Engineering
University of Florida, Gainesville, FL 32611
rakeshch@ufl.edu, principe@cnel.ufl.edu
Abstract
The quality of data representation in deep learning methods is directly related to
the prior model imposed on the representations; however, ge nerally used fixed
priors are not capable of adjusting to the context in the data. To address this issue,
we propose deep predictive coding networks, a hierarchical generative model that
empirically alters priors on the latent representations in a dynamic and context-
sensitive manner. This model captures the temporal dependencies in time-varying
signals and uses top-down information to modulate the repre sentation in lower
layers. The centerpiece of our model is a novel procedure to infer sparse states of a
dynamic network which is used for feature extraction. We also extend this feature
extraction block to introduce a pooling function that captu res locally invariant
representations. When applied on a natural video data, we sh ow that our method
is able to learn high-level visual features. We also demonstrate the role of the top-
down connections by showing the robustness of the proposed model to structured
noise.
1 Introduction
The performance of machine learning algorithms is dependen t on how the data is represented. In
most methods, the quality of a data representation is itselfdependent on prior knowledge imposed on
the representation. Such prior knowledge can be imposed usi ng domain specific information, as in
SIFT [1], HOG [2], etc., or in learning representations usin g fixed priors like sparsity [3], temporal
coherence [4], etc. The use of fixed priors became particularly popular while training deep networks
[5–8]. In spite of the success of these general purpose prior s, they are not capable of adjusting to
the context in the data. On the other hand, there are several a dvantages to having a model that can
“actively” adapt to the context in the data. One way of achiev ing this is to empirically alter the
priors in a dynamic and context-sensitive manner. This will be the m ain focus of this work, with
emphasis on visual perception.
Here we propose a predictive coding framework, where a deep locally-connected generative model
uses “top-down” information to empirically alter the prior s used in the lower layers to perform
“bottom-up” inference. The centerpiece of the proposed mod el is extracting sparse features from
time-varying observations using a linear dynamical model . To this end, we propose a novel proce-
dure to infer sparse states (or features) of a dynamical system. We then extend this feature extraction
block to introduce a pooling strategy to learn invariant feature representations from the data. In line
with other “deep learning” methods, we use these basic build ing blocks to construct a hierarchical
model using greedy layer-wise unsupervised learning. The h ierarchical model is built such that the
output from one layer acts as an input to the layer above. In other words, the layers are arranged in a
Markov chain such that the states at any layer are only dependent on the representations in the layer
below and above, and are independent of the rest of the model. The overall goal of the dynamical
system at any layer is to make the best prediction of the representation in the layer below using the
top-down information from the layers above and the temporal information from the previous states.
Hence, the name deep predictive coding networks (DPCN).
1
1.1 Related W ork
The DPCN proposed here is closely related to models proposed in [9, 10], where predictive cod-
ing is used as a statistical model to explain cortical functi ons in the mammalian brain. Similar to
the proposed model, they construct hierarchical generative models that seek to infer the underlying
causes of the sensory inputs. While Rao and Ballard [9] use an update rule similar to Kalman filter
for inference, Friston [10] proposed a general framework considering all the higher-order moments
in a continuous time dynamic model. However, neither of the m odels is capable of extracting dis-
criminative information, namely a sparse and invariant representation, from an image sequence that
is helpful for high-level tasks like object recognition. Un like these models, here we propose an
efficient inference procedure to extract locally invariant representation from image sequences and
progressively extract more abstract information at higher levels in the model.
Other methods used for building deep models, like restricted Boltzmann machine (RBM) [11], auto-
encoders [8, 12] and predictive sparse decomposition [13], are also related to the model proposed
here. All these models are constructed on similar underlyin g principles: (1) like ours, they also use
greedy layer-wise unsupervised learning to construct a hierarchical model and (2) each layer consists
of an encoder and a decoder. The key to these models is to learn both encoding and decoding
concurrently (with some regularization like sparsity [13] , denoising [8] or weight sharing [11]),
while building the deep network as a feed forward model using only the encoder. The idea is
to approximate the latent representation using only the fee d-forward encoder, while avoiding the
decoder which typically requires a more expensive inference procedure. However in DPCN there is
no encoder. Instead, DPCN relies on an efficient inference pr ocedure to get a more accurate latent
representation. As we will show below, the use of reciprocal top-down and bottom-up connections
make the proposed model more robust to structured noise duri ng recognition and also allows it to
perform low-level tasks like image denoising.
To scale to large images, several convolutional models are also proposed in a similar deep learning
paradigm [5–7]. Inference in these models is applied over anentire image, rather than small parts of
the input. DPCN can also be extended to form a convolutional network, but this will not be discussed
here.
2 Model
In this section, we begin with a brief description of the gene ral predictive coding framework and
proceed to discuss the details of the architecture used in this work. The basic block of the proposed
model that is pervasive across all layers is a generalized state-space model of the form:
˜ yt = F(xt) + nt
xt = G(xt−1, ut) + vt (1)
where ˜ yt is the data and F and G are some functions that can be parameterized, say byθ. The terms
ut are called the unknown causes . Since we are usually interested in obtaining abstract information
from the observations, the causes are encouraged to have a no n-linear relationship with the obser-
vations. The hidden states, xt, then “mediate the influence of the cause on the output and end ow
the system with memory” [10]. The terms vt and nt are stochastic and model uncertainty. Several
such state-space models can now be stacked, with the output from one acting as an input to the layer
above, to form a hierarchy. Such an L-layered hierarchical model at any time ’ t’ can be described
as1:
u(l−1 )
t = F(x(l)
t ) + n(l)
t ∀l ∈ { 1, 2, ..., L}
x(l)
t = G(x(l)
t−1, u(l)
t ) + v(l)
t (2)
The terms v(l)
t and n(l)
t form stochastic fluctuations at the higher layers and enter e ach layer in-
dependently. In other words, this model forms a Markov chain across the layers, simplifying the
inference procedure. Notice how the causes at the lower laye r form the “observations” to the layer
above — the causes form the link between the layers, and the st ates link the dynamics over time.
The important point in this design is that the higher-level p redictions influence the lower levels’
1When l = 1, i.e., at the bottom layer, u(i− 1)
t = yt, where yt the input data.
2
Causes (ut)
States (xt)
Observations (yt)
(a) Shows a single layered dynamic network
depicting a basic computational block.
- States (xt)
- Causes (ut)
(Invariant Units)
{ {Layer 1 Layer 2
(b) Shows the distributive hierarchical model formed by
stacking several basic blocks.
Figure 1: (a) Shows a single layered network on a group of smal l overlapping patches of the input
video. The green bubbles indicate a group of inputs ( y(n)
t , ∀n), red bubbles indicate their corre-
sponding states ( x(n)
t ) and the blue bubbles indicate the causes ( ut) that pool all the states within
the group. (b) Shows a two-layered hierarchical model const ructed by stacking several such basic
blocks. For visualization no overlapping is shown between the image patches here, but overlapping
patches are considered during actual implementation.
inference. The predictions from a higher layer non-linearl y enter into the state space model by em-
pirically altering the prior on the causes. In summary, the t op-down connections and the temporal
dependencies in the state space influence the latent representation at any layer.
In the following sections, we will first describe a basic comp utational network, as in (1) with a
particular form of the functions F and G. Specifically, we will consider a linear dynamical model
with sparse states for encoding the inputs and the state transitions, followed by the non-linear pooling
function to infer the causes. Next, we will discuss how to stack and learn a hierarchical model using
several of these basic networks. Also, we will discuss how to incorporate the top-down information
during inference in the hierarchical model.
2.1 Dynamic network
To begin with, we consider a dynamic network to extract featu res from a small part of a video
sequence. Let {y1, y2, ..., yt, ...} ∈ RP be a P -dimensional sequence of a patch extracted from
the same location across all the frames in a video 2 . To process this, our network consists of two
distinctive parts (see Figure.1a): feature extraction (inferring states) and pooling (inferring causes).
For the first part, sparse coding is used in conjunction with a linear state space model to map the
inputs yt at time t onto an over-complete dictionary of K-filters, C ∈ RP ×K (K > P ), to get
sparse states xt ∈ RK . To keep track of the dynamics in the latent states we use a lin ear function
with state-transition matrix A ∈ RK×K . More formally, inference of the features xt is performed
by finding a representation that minimizes the energy function:
E1(xt, yt, C, A) = ∥yt − Cxt∥2
2 + λ∥xt − Axt−1∥1 + γ ∥xt∥1 (3)
Notice that the second term involving the state-transition is also constrained to be sparse to make
the state-space representation consistent.
Now, to take advantage of the spatial relationships in a loca l neighborhood, a small group of states
x(n)
t , where n ∈ { 1, 2, ...N } represents a set of contiguous patches w.r.t. the position i n the image
space, are added (orsum pooled ) together. Such pooling of the states may be lead to local translation
invariance. On top this, a D-dimensional causes ut ∈ RD are inferred from the pooled states to
obtain representation that is invariant to more complex loc al transformations like rotation, spatial
frequency, etc. In line with [14], this invariant function i s learned such that it can capture the
dependencies between the components in the pooled states. S pecifically, the causes ut are inferred
2Here yt is a vectorized form of
√
P ×
√
P square patch extracted from a frame at time t.
3
by minimizing the energy function:
E2(ut, xt, B) =
N∑
n=1
( K∑
k=1
|γk · x(n)
t,k |
)
+ β∥ut∥1 (4)
γk = γ0
[ 1 + exp(−[But]k)
2
]
where γ0 > 0 is some constant. Notice that here ut multiplicatively interacts with the accumulated
states through B, modeling the shape of the sparse prior on the states. Essent ially, the invariant
matrix B is adapted such that each component ut connects to a group of components in the ac-
cumulated states that co-occur frequently. In other words, whenever a component in ut is active
it lowers the coefficient of a set of components in x(n)
t , ∀n, making them more likely to be active.
Since co-occurring components typically share some common statistical regularity, such activity of
ut typically leads to locally invariant representation [14].
Though the two cost functions are presented separately abov e, we can combine both to devise a
unified energy function of the form:
E(xt, ut, θ) =
N∑
n=1
(1
2∥y(n)
t − Cx(n)
t ∥2
2 + λ∥x(n)
t − Ax(n)
t−1∥1 +
K∑
k=1
|γt,k · x(n)
t,k |
)
+ β∥ut∥1
(5)
γt,k =γ0
[ 1 + exp(−[But]k)
2
]
where θ = {A, B, C}. As we will discuss next, both xt and ut can be inferred concurrently from
(5) by alternatively updating one while keeping the other fix ed using an efficient proximal gradient
method.
2.2 Learning
To learn the parameters in (5), we alternatively minimize E(xt, ut, θ) using a procedure similar to
block co-ordinate descent. We first infer the latent variabl es (xt, ut) while keeping the parameters
fixed and then update the parameters θ while keeping the variables fixed. This is done until the
parameters converge. We now discuss separately the inferen ce procedure and how we update the
parameters using a gradient descent method with the fixed variables.
2.2.1 Inference
We jointly infer bothxt and ut from (5) using proximal gradient methods, taking alternative gradient
descent steps to update one while holding the other fixed. In o ther words, we alternate between
updating xt and ut using a single update step to minimize E1 and E2, respectively. However,
updating xt is relatively more involved. So, keeping aside the causes, w e first focus on inferring
sparse states alone from E1, and then go back to discuss the joint inference of both the st ates and
the causes.
Inferring States: Inferring sparse states, given the parameters, from a linea r dynamical system
forms the crux of our model. This is performed by finding the so lution that minimizes the energy
function E1 in (3) with respect to the states xt (while keeping the sparsity parameter γ fixed).
Here there are two priors of the states: the temporal depende nce and the sparsity term. Although
this energy function E1 is convex in xt, the presence of two non-smooth terms makes it hard to
use standard optimization techniques used for sparse codin g alone. A similar problem is solved
using dynamic programming [15], homotopy [16] and Bayesian sparse coding [17]; however, the
optimization used in these models is computationally expensive for use in large scale problems like
object recognition.
To overcome this, inspired by the method proposed in [18] for structured sparsity, we propose an
approximate solution that is consistent and able to use effic ient solvers like fast iterative shrinkage
thresholding alogorithm (FISTA) [19]. The key to our approach is to first use Nestrov’s smoothness
method [18, 20] to approximate the non-smooth state transition term. The resulting energy function
4
is a convex and continuously differentiable function in xt with a sparsity constraint, and hence, can
be efficiently solved using proximal methods like FISTA.
To begin, letΩ( xt) = ∥et∥1 where et = ( xt − Axt−1). The idea is to find a smooth approximation
to this function Ω( xt) in et. Notice that, since et is a linear function on xt, the approximation will
also be smooth w.r.t. xt. Now, we can re-write Ω( xt) using the dual norm of ℓ1 as
Ω( xt) = arg max
∥α ∥∞ ≤1
α T et
where α ∈ Rk. Using the smoothing approximation from Nesterov [20] on Ω( xt):
Ω( xt) ≈ fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] (6)
where d(·) = 1
2 ∥α ∥2
2 is a smoothing function and µ is a smoothness parameter. From Nestrov’s
theorem [20], it can be shown that fµ (et) is convex and continuously differentiable in et and the
gradient of fµ (et) with respect to et takes the form
∇et fµ (et) = α ∗ (7)
where α ∗ is the optimal solution to fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] 3. This implies, by using
the chain rule, that fµ (et) is also convex and continuously differentiable in xt and with the same
gradient.
With this smoothing approximation, the overall cost function from (3) can now be re-written as
xt = arg min
xt
1
2∥yt − Cxt∥2
2 + λfµ (et) + γ∥xt∥1 (8)
with the smooth part h(xt) = 1
2 ∥yt − Cxt∥2
2 + λfµ (et) whose gradient with respect to xt is given
by
∇xt h(xt) = CT (yt − Cxt) + λα ∗ (9)
Using the gradient information in (9), we solve for xt from (8) using FISTA [19].
Inferring Causes: Given a group of state vectors, ut can be inferred by minimizing E2, where we
define a generative model that modulates the sparsity of thepooled state vector, ∑
n |x(n)|. Here we
observe that FISTA can be readily applied to infer ut, as the smooth part of the function E2:
h(ut) =
K∑
k=1
(
γ0
[ 1 + exp( −[But]k)
2
]
·
N∑
n=1
|x(n)
t,k |
)
(10)
is convex, continuously differentiable and Lipschitz inut [21] 4. Following [19], it is easy to obtain
a bound on the convergence rate of the solution.
Joint Inference: We showed thus far that bothxt and ut can be inferred from their respective energy
functions using a first-order proximal method called FISTA. However, for joint inference we have
to minimize the combined energy function in (5) over both xt and ut. We do this by alternately
updating xt and ut while holding the other fixed and using a single FISTA update step at each
iteration. It is important to point out that the internal FIS TA step size parameters are maintained
between iterations. This procedure is equivalent to alternating minimization using gradient descent.
Although this procedure no longer guarantees convergence of both xt and ut to the optimal solution,
in all of our simulations it lead to a reasonably good solutio n. Please refer to Algorithm. 1 (in the
supplementary material) for details. Note that, with the alternating update procedure, each xt is now
influenced by the feed-forward observations, temporal pred ictions and the feedback connections
from the causes.
3Please refer to the supplementary material for the exact form of α ∗.
4The matrix B is initialized with non-negative entries and continues to b e non-negative without any addi-
tional constraints [21].
5
2.2.2 Parameter Updates
With xt and ut fixed, we update the parameters by minimizing E in (5) with respect to θ. Since the
inputs here are a time-varying sequence, the parameters are updated using dual estimation filtering
[22]; i.e., we put an additional constraint on the parameter s such that they follow a state space
equation of the form:
θt = θt−1 + zt (11)
where zt is Gaussian transition noise over the parameters. This keep s track of their temporal rela-
tionships. Along with this constraint, we update the parame ters using gradient descent. Notice that
with a fixed xt and ut, each of the parameter matrices can be updated independentl y. Matrices C
and B are column normalized after the update to avoid any trivial solution.
Mini-Batch Update: To get faster convergence, the parameters are updated after performing infer-
ence over a large sequence of inputs instead of at every time instance. With this “batch” of signals,
more sophisticated gradient methods, like conjugate gradi ent, can be used and, hence, can lead to
more accurate and faster convergence.
2.3 Building a hierarchy
So far the discussion is focused on encoding a small part of a v ideo frame using a single stage
network. To build a hierarchical model, we use this single st age network as a basic building block
and arrange them up to form a tree structure (see Figure.1b). To learn this hierarchical mode l, we
adopt a greedy layer-wise procedure like many other deep learning methods [6, 8, 11]. Specifically,
we use the following strategy to learn the hierarchical model.
For the first (or bottom) layer, we learn a dynamic network as d escribed above over a group of
small patches from a video. We then take this learned network and replicate it at several places
on a larger part of the input frames (similar to weight sharin g in a convolutional network [23]).
The outputs (causes) from each of these replicated networks are considered as inputs to the layer
above. Similarly, in the second layer the inputs are again grouped together (depending on the spatial
proximity in the image space) and are used to train another dynamic network. Similar procedure can
be followed to build more higher layers.
We again emphasis that the model is learned in a layer-wise ma nner, i.e., there is no top-down
information while learning the network parameters. Also no te that, because of the pooling of the
states at each layers, the receptive field of the causes becomes progressively larger with the depth of
the model.
2.4 Inference with top-down information
With the parameters fixed, we now shift our focus to inference in the hierarchical model with the
top-down information. As we discussed above, the layers in the hierarchy are arranged in a Markov
chain, i.e., the variables at any layer are only influenced by the variables in the layer below and the
layer above. Specifically, the states x(l)
t and the causes u(l)
t at layer l are inferred from u(l−1)
t and
are influenced by x(l+1)
t (through the prediction term C(l+1)x(l+1)
t ) 5. Ideally, to perform inference
in this hierarchical model, all the states and the causes have to be updated simultaneously depending
on the present state of all the other layers until the model re aches equilibrium [10]. However, such
a procedure can be very slow in practice. Instead, we propose an approximate inference procedure
that only requires a single top-down flow of information and then a single bottom-up inference using
this top-down information.
5The suffixes n indicating the group are considered implicit here to simplify the notation.
6
For this we consider that at any layer l a group of input u(l−1,n )
t , ∀n ∈ { 1, 2, ..., N } are encoded
using a group of states x(l,n )
t , ∀n and the causes u(l)
t by minimizing the following energy function:
El(x(l)
t , u(l)
t , θ(l)) =
N∑
n=1
(1
2∥u(l−1,n )
t − C(l)x(l,n )
t ∥2
2 + λ∥x(l,n )
t − A(l)x(l,n )
t−1 ∥1
+
K∑
k=1
|γ(l)
t,k · x(l,n )
t,k |
)
+ β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 (12)
γ(l)
t,k = γ0
[ 1 + exp(−[B(l)u(l)
t ]k)
2
]
where θ(l) = {A(l), B(l), C(l)}. Notice the additional term involving ˆ u(l+1)
t when compared to (5).
This comes from the top-down information, where we call ˆ u(l+1)
t as the top-down prediction of the
causes of layer (l) using the previous states in layer (l + 1) . Specifically, before the “arrival” of a
new observation at time t, at each layer (l) (starting from the top-layer) we first propagate the most
likely causes to the layer below using the state at the previous time instance x(l)
t−1 and the predicted
causes ˆ u(l+1)
t . More formally, the top-down prediction at layer l is obtained as
ˆ u(l)
t = C(l)ˆ x(l)
t
where ˆ x(l)
t = arg min
x(l)
t
λ(l)∥x(l)
t − A(l)x(l)
t−1∥1 + γ0
K∑
k=1
|ˆγt,k · x(l)
t,k | (13)
and ˆγt,k = (exp( −[B(l)ˆ u(l+1)
t ]k))/2
At the top most layer, L, a “bias” is set such that ˆ u(L)
t = ˆ u(L)
t−1, i.e., the top-layer induces some
temporal coherence on the final outputs. From (13), it is easy to show that the predicted states for
layer l can be obtained as
ˆx(l)
t,k =
{
[A(l)x(l)
t−1]k, γ 0γt,k < λ (l)
0, γ 0γt,k ≥ λ(l) (14)
These predicted causesˆ u(l)
t , ∀l ∈ { 1, 2, ..., L} are substituted in (12) and a single layer-wise bottom-
up inference is performed as described in section 2.2.1 6. The combined prior now imposed on the
causes, β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2, is similar to the elastic net prior discussed in [24], leading to
a smoother and biased estimate of the causes.
3 Experiments
3.1 Receptive fields of causes in the hierarchical model
Firstly, we would like to test the ability of the proposed mod el to learn complex features in the
higher-layers of the model. For this we train a two layered ne twork from a natural video. Each
frame in the video was first contrast normalized as described in [13]. Then, we train the first layer
of the model on 4 overlapping contiguous 15 × 15 pixel patches from this video; this layer has
400 dimensional states and 100 dimensional causes. The caus es pool the states related to all the
4 patches. The separation between the overlapping patches he re was 2 pixels, implying that the
receptive field of the causes in the first layer is 17 × 17 pixels. Similarly, the second layer is trained
on 4 causes from the first layer obtained from 4 overlapping 17 × 17 pixel patches from the video.
The separation between the patches here is 3 pixels, implying that the receptive field of the causes
in the second layer is 20 × 20 pixels. The second layer contains 200 dimensional states an d 50
dimensional causes that pools the states related to all the 4 patches.
Figure 2 shows the visualization of the receptive fields of th e invariant units (columns of matrix
B) at each layer. We observe that each dimension of causes in th e first layer represents a group of
6Note that the additional term 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 in the energy function only leads to a minor modification
in the inference procedure, namely this has to be added to h(ut) in (10).
7
(a) Layer 1 invariant matrix, B(1)
(b) Layer 2 invariant matrix, B(2)
Figure 2: Visualization of the receptive fields of the invariant units learned in (a) layer 1 and (b) layer
2 when trained on natural videos. The receptive fields are constructed as a weighted combination of
the dictionary of filters at the bottom layer.
primitive features (like inclined lines) which are localized in orientation or position 7. Whereas, the
causes in the second layer represent more complex features, like corners, angles, etc. These filters
are consistent with the previously proposed methods like Lee et al. [5] and Zeiler et al. [7].
3.2 Role of top-down information
In this section, we show the role of the top-down information during inference, particularly in the
presence of structured noise. Video sequences consisting of objects of three different shapes (Refer
to Figure 3) were constructed. The objective is to classify e ach frame as coming from one of the
three different classes. For this, several 32 × 32 pixel 100 frame long sequences were made using
two objects of the same shape bouncing off each other and the “walls”. Several such sequences were
then concatenated to form a 30,000 long sequence. We train a two layer network using this sequence.
First, we divided each frame into12 × 12 patches with neighboring patches overlapping by 4 pixels;
each frame is divided into 16 patches. The bottom layer was tr ained such the 12 × 12 patches were
used as inputs and were encoded using a 100 dimensional state vector. A 4 contiguous neighboring
patches were pooled to infer the causes that have 40 dimensions. The second layer was trained with
4 first layer causes as inputs, which were itself inferred from20 × 20 contiguous overlapping blocks
of the video frames. The states here are 60 dimensional long and the causes have only 3 dimensions.
It is important to note here that the receptive field of the second layer causes encompasses the entire
frame.
We test the performance of the DPCN in two conditions. The firs t case is with 300 frames of clean
video, with 100 frames per shape, constructed as described above. We consider this as a single video
without considering any discontinuities. In the second case, we corrupt the clean video with “struc-
tured” noise, where we randomly pick a number of objects from same three shapes with a Poisson
distribution (with mean 1.5) and add them to each frame independently at a random locations. There
is no correlation between any two consecutive frames regarding where the “noisy objects” are added
(see Figure.3b).
First we consider the clean video and perform inference with only bottom-up inference, i.e., during
inference we consider ˆ u(l)
t = 0 , ∀l ∈ { 1, 2}. Figure 4a shows the scatter plot of the three dimen-
sional causes at the top layer. Clearly, there are 3 clusters recognizing three different shape in the
video sequence. Figure 4b shows the scatter plot when the sam e procedure is applied on the noisy
video. We observe that 3 shapes here can not be clearly distin guished. Finally, we use top-down
information along with the bottom-up inference as describe d in section 2.4 on the noisy data. We
argue that, since the second layer learned class specific inf ormation, the top-down information can
help the bottom layer units to disambiguate the noisy objects from the true objects. Figure 4c shows
the scatter plot for this case. Clearly, with the top-down in formation, in spite of largely corrupted
sequence, the DPCN is able to separate the frames belonging to the three shapes (the trace from one
cluster to the other is because of the temporal coherence imposed on the causes at the top layer.).
7Please refer to supplementary material for more results.
8
(a) Clear Sequences (b) Corrupted Sequences
Figure 3: Shows part of the (a) clean and (b) corrupted video s equences constructed using three
different shapes. Each row indicates one sequence.
0
5
10
0
2
4
0
2
4
6
Object 1
Object 2
Object 3
(a)
0
5
10
0
2
4
6
0
2
4
6
Object 1
Object 2
Object 3
(b)
0
2
4
6
0
1
2
3
0
2
4
6
Object 1
Object 2
Object 3
(c)
Figure 4: Shows the scatter plot of the 3 dimensional causes a t the top-layer for (a) clean video
with only bottom-up inference, (b) corrupted video with only bottom-up inference and (c) corrupted
video with top-down flow along with bottom-up inference. At e ach point, the shape of the marker
indicates the true shape of the object in the frame.
4 Conclusion
In this paper we proposed the deep predictive coding network , a generative model that empirically
alters the priors in a dynamic and context sensitive manner.This model composes to two main com-
ponents: (a) linear dynamical models with sparse states used for feature extraction, and (b) top-down
information to adapt the empirical priors. The dynamic mode l captures the temporal dependencies
and reduces the instability usually associated with sparse coding 8, while the task specific informa-
tion from the top layers helps to resolve ambiguities in the lower-layer improving data representation
in the presence of noise. We believe that our approach can be extended with convolutional methods,
paving the way for implementation of high-level tasks like o bject recognition, etc., on large scale
videos or images.
Acknowledgments
This work is supported by the Office of Naval Research (ONR) gr ant #N000141010375. We thank
Austin J. Brockmeier and Matthew Emigh for their comments and suggestions.
References
[1] David G. Lowe. Object recognition from local scale-inva riant features. In Proceedings of the
International Conference on Computer V ision-V olume 2 - V ol ume 2 , ICCV ’99, pages 1150–,
1999. ISBN 0-7695-0164-8.
[2] Navneet Dalal and Bill Triggs. Histograms of oriented gr adients for human detection. In
Proceedings of the 2005 IEEE Computer Society Conference on Computer V ision and P attern
Recognition (CVPR’05) - V olume 1 - V olume 01 , CVPR ’05, pages 886–893, 2005. ISBN
0-7695-2372-2.
[3] B. A. Olshausen and D. J. Field. Emergence of simple-cellreceptive field properties by learning
a sparse code for natural images. Nature, 381(6583):607–609, June 1996. ISSN 0028-0836.
[4] L. Wiskott and T.J. Sejnowski. Slow feature analysis: Un supervised learning of invariances.
Neural computation , 14(4):715–770, 2002.
8Please refer to the supplementary material for more details.
9
[5] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y . Ng. Convolutional deep belief
networks for scalable unsupervised learning of hierarchical representations. In Proceedings of
the 26th Annual International Conference on Machine Learni ng, ICML ’09, pages 609–616,
2009. ISBN 978-1-60558-516-1.
[6] K. Kavukcuoglu, P. Sermanet, Y .L. Boureau, K. Gregor, M. Mathieu, and Y . LeCun. Learn-
ing convolutional feature hierarchies for visual recognit ion. Advances in Neural Information
Processing Systems , pages 1090–1098, 2010.
[7] M.D. Zeiler, D. Krishnan, G.W. Taylor, and R. Fergus. Deconvolutional networks. InComputer
V ision and P attern Recognition (CVPR), 2010 IEEE Conferenc e on , pages 2528–2535. IEEE,
2010.
[8] P. Vincent, H. Larochelle, I. Lajoie, Y . Bengio, and P.A.Manzagol. Stacked denoising autoen-
coders: Learning useful representations in a deep network with a local denoising criterion. The
Journal of Machine Learning Research , 11:3371–3408, 2010.
[9] Rajesh P. N. Rao and Dana H. Ballard. Dynamic model of visu al recognition predicts neural
response properties in the visual cortex. Neural Computation , 9:721–763, 1997.
[10] Karl Friston. Hierarchical models in the brain. PLoS Comput Biol , 4(11):e1000211, 11 2008.
[11] Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. AFast Learning Algorithm for Deep
Belief Nets. Neural Comp. , (7):1527–1554, July .
[12] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise train-
ing of deep networks. In In NIPS , 2007.
[13] Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. Fast inference in sparse coding
algorithms with applications to object recognition. CoRR, abs/1010.3467, 2010.
[14] Yan Karklin and Michael S. Lewicki. A hierarchical baye sian model for learning nonlinear
statistical regularities in nonstationary natural signals. Neural Computation , 17:397–423, 2005.
[15] D. Angelosante, G.B. Giannakis, and E. Grossi. Compres sed sensing of time-varying signals.
In Digital Signal Processing, 2009 16th International Confer ence on , pages 1 –8, july 2009.
[16] A. Charles, M.S. Asif, J. Romberg, and C. Rozell. Sparsi ty penalties in dynamical system
estimation. In Information Sciences and Systems (CISS), 2011 45th Annual C onference on ,
pages 1 –6, march 2011.
[17] D. Sejdinovic, C. Andrieu, and R. Piechocki. Bayesian sequential compressed sensing in sparse
dynamical systems. In Communication, Control, and Computing (Allerton), 2010 48 th Annual
Allerton Conference on , pages 1730 –1736, 29 2010-oct. 1 2010. doi: 10.1109/ALLERT ON.
2010.5707125.
[18] X. Chen, Q. Lin, S. Kim, J.G. Carbonell, and E.P. Xing. Sm oothing proximal gradient method
for general structured sparse regression. The Annals of Applied Statistics , 6(2):719–752, 2012.
[19] Amir Beck and Marc Teboulle. A Fast Iterative Shrinkage -Thresholding Algorithm for Linear
Inverse Problems. SIAM Journal on Imaging Sciences , (1):183–202, March . ISSN 19364954.
doi: 10.1137/080716542.
[20] Y . Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming , 103
(1):127–152, 2005.
[21] Karol Gregor and Yann LeCun. Efficient Learning of Sparse Invariant Representations. CoRR,
abs/1105.5307, 2011.
[22] Alex Nelson. Nonlinear estimation and modeling of noisy time-series by d ual Kalman filtering
methods. PhD thesis, 2000.
[23] Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howa rd, W. Hubbard, and L. D.
Jackel. Backpropagation applied to handwritten zip code re cognition. Neural Comput. , 1
(4):541–551, December 1989. ISSN 0899-7667. doi: 10.1162/ neco.1989.1.4.541. URL
http://dx.doi.org/10.1162/neco.1989.1.4.541.
[24] H. Zou and T. Hastie. Regularization and variable selec tion via the elastic net. Journal of the
Royal Statistical Society: Series B (Statistical Methodol ogy), 67(2):301–320, 2005.
10
A Supplementary material for Deep Predictive Coding Networ ks
A.1 From section 2.2.1, computing α ∗
The optimal solution of α in (6) is given by
α ∗ = arg max
∥α ∥∞ ≤1
[α T et − µ
2 ∥α ∥2]
= arg min
∥α ∥∞ ≤1
α − et
µ
2
=S
(et
µ
)
(15)
where S(.) is a function projecting
(
et
µ
)
onto an ℓ∞-ball. This is of the form:
S(x) =
x, −1 ≤ x ≤ 1
1, x > 1
−1, x < −1
A.2 Algorithm for joint inference of the states and the cause s.
Algorithm 1 Updating xt,ut simultaneously using FISTA-like procedure [19].
Require: Take Lx
0,n > 0 ∀n ∈ { 1, 2, ..., N }, Lu
0 > 0 and some η > 1.
1: Initialize x0,n ∈ RK ∀n ∈ { 1, 2, ..., N }, u0 ∈ RD and set ξ1 = u0, z1,n = x0,n .
2: Set step-size parameters: τ1 = 1 .
3: while no convergence do
4: Update
γ = γ0(1 + exp( −[Bui])/2
.
5: for n ∈ { 1, 2, ..., N } do
6: Line search: Find the best step size Lx
k,n .
7: Compute α ∗ from (15)
8: Update xi,n using the gradient from (9) with a soft-thresholding function.
9: Update internal variables zi+1 with step size parameter τi as in [19].
10: end for
11: Compute ∑ N
n=1 |xi,n |
12: Line search: Find the best step size Lu
k .
13: Update ui,n using the gradient of (10) with a soft-thresholding function.
14: Update internal variables ξi+1 with step size parameter τi as in [19].
15: Update
τi+1 =
(
1 +
√
(4τ2
i + 1)
)
/2
.
16: Check for convergence.
17: i = i + 1
18: end while
19: return xi,n ∀n ∈ { 1, 2, ..., N } and ui
11
A.3 Inferring sparse states with known parameters
20 40 60 80 1000
0.5
1
1.5
2
2.5
3
Observation Dimensions
steady state rMSE
Kalman Filter
Proposed
Sparse Coding [20]
Figure 5: Shows the performance of the inference algorithm w ith fixed parameters when compared
with sparse coding and Kalman filtering. For this we first simu late a state sequence with only 20
non-zero elements in a 500-dimensional state vector evolvi ng with a permutation matrix, which is
different for every time instant, followed by a scaling matrix to generate a sequence of observations.
We consider that both the permutation and the scaling matrices are known apriori. The observation
noise is Gaussian zero mean and variance σ2 = 0 .01. We consider sparse state-transition noise,
which is simulated by choosing a subset of active elements in the state vector (number of elements
is chosen randomly via a Poisson distribution with mean 2) an d switching each of them with a
randomly chosen element (with uniform probability over the state vector). This resemble a sparse
innovation in the states. We use these generated observation sequences as inputs and use the apriori
know parameters to infer the states from the dynamic model. F igure 5 shows the results obtained,
where we compare the inferred states from different methodswith the true states in terms of relative
mean squared error (rMSE) (defined as ∥xest
t − xtrue
t ∥/∥xtrue
t ∥). The steady state error (rMSE)
after 50 time instances is plotted versus with the dimension ality of the observation sequence. Each
point is obtained after averaging over 50 runs. We observe th at our model is able to converge to
the true solution even for low dimensional observation, when other methods like sparse coding fail.
We argue that the temporal dependencies considered in our model is able to drive the solution to the
right attractor basin, insulating it from instabilities typically associated with sparse coding [24].
12
A.4 Visualizing first layer of the learned model
(a) Observation matrix (Bases)
Active state
element at (t-1)
Corresponding,
predicted states at (t)
(b) State-transition matrix
Figure 6: Visualization of the parameters. C and A, of the model described in section 3.1. (A)
Shows the learned observation matrix C. Each square block indicates a column of the matrix,
reshaped as √p × √p pixel block. (B) Shows the state transition matrix A using its connections
strength with the observation matrix C. On the left are the basis corresponding to the single active
element in the state at time (t − 1) and on the right are the basis corresponding to the five most
“active” elements in the predicted state (ordered in decreasing order of the magnitude).
(a) Connections
(b) Centers and Orientations (c) Orientations and Frequencies
Figure 7: Connections between the invariant units and the ba sis functions. (A) Shows the connec-
tions between the basis and columns of B. Each row indicates an invariant unit. Here the set of
basis that a strongly correlated to an invariant unit are sho wn, arranged in the decreasing order of
the magnitude. (B) Shows spatially localized grouping of the invariant units. Firstly, we fit a Gabor
function to each of the basis functions. Each subplot here is then obtained by plotting a line indicat-
ing the center and the orientation of the Gabor function. Thecolors indicate the connections strength
with an invariant unit; red indicating stronger connection s and blue indicate almost zero strength.
We randomly select a subset of 25 invariant units here. We obs erve that the invariant unit group
the basis that are local in spatial centers and orientations . (C) Similarly, we show the correspond-
ing orientation and spatial frequency selectivity of the in variant units. Here each plot indicates the
orientation and frequency of each Gabor function color coded according to the connection strengths
with the invariant units. Each subplot is a half-polar plot with the orientation plotted along the angle
ranging from 0 to π and the distance from the center indicating the frequency. A gain, we observe
that the invariant units group the basis that have similar orientation.
13
|
Rakesh Chalasani, Jose C. Principe
|
Unknown
| 2,013
|
{"id": "yyC_7RZTkUD5-", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358405100000, "tmdate": 1358405100000, "ddate": null, "number": 27, "content": {"title": "Deep Predictive Coding Networks", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.", "pdf": "https://arxiv.org/abs/1301.3541", "paperhash": "chalasani|deep_predictive_coding_networks", "authors": ["Rakesh Chalasani", "Jose C. Principe"], "authorids": ["vnit.rakesh@gmail.com", "principe@cnel.ufl.edu"], "keywords": [], "conflicts": []}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vnit.rakesh@gmail.com"], "writers": []}
|
[Review]:
This paper attempts to capture both the temporal dynamics of signals and the contribution of top down connections for inference using a deep model. The experimental results are qualitatively encouraging, and the model structure seems like a sensible direction to pursue. I like the connection to dynamical systems. The mathematical presentation is disorganized though, and it would have been nice to see some sort of benchmark or externally meaningful quantitative comparison in the experimental results.
More specific comments:
You should state the functional form for F and G!! Working backwards from the energy function, it looks as if these are just linear functions?
In Eq. 1 should F( x_t, u_t ) instead just be F( x_t )? Eqs. 3 and 4 suggest it should just be F( x_t ), and this would resolve points which I found confusing later in the paper.
The relationship between the energy functions in eqs. 3 and 4 is confusing to me. (this may have to do with the (non?)-dependence of F on u_t)
Section 2.3.1, 'It is easy to show that this is equivalent to finding the mode of the distribution...': You probably mean MAP not mode. Additionally this is non-obvious. It seems like this would especially not be true after marginalizing out u_t. You've never written the joint distributions over p(x_t, y_t, x_t-1), and the role of the different energy functions was unclear.
Section 3.1: In a linear mapping, how are 4 overlapping patches different from a single larger patch?
Section 3.2: Do you do anything about the discontinuities which would occur between the 100-frame sequences?
|
anonymous reviewer 62ac
| null | null |
{"id": "EEhwkCLtAuko7", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362405300000, "tmdate": 1362405300000, "ddate": null, "number": 5, "content": {"title": "review of Deep Predictive Coding Networks", "review": "This paper attempts to capture both the temporal dynamics of signals and the contribution of top down connections for inference using a deep model. The experimental results are qualitatively encouraging, and the model structure seems like a sensible direction to pursue. I like the connection to dynamical systems. The mathematical presentation is disorganized though, and it would have been nice to see some sort of benchmark or externally meaningful quantitative comparison in the experimental results.\r\n\r\nMore specific comments:\r\n\r\nYou should state the functional form for F and G!! Working backwards from the energy function, it looks as if these are just linear functions?\r\n\r\nIn Eq. 1 should F( x_t, u_t ) instead just be F( x_t )? Eqs. 3 and 4 suggest it should just be F( x_t ), and this would resolve points which I found confusing later in the paper.\r\n\r\nThe relationship between the energy functions in eqs. 3 and 4 is confusing to me. (this may have to do with the (non?)-dependence of F on u_t)\r\n\r\nSection 2.3.1, 'It is easy to show that this is equivalent to finding the mode of the distribution...': You probably mean MAP not mode. Additionally this is non-obvious. It seems like this would especially not be true after marginalizing out u_t. You've never written the joint distributions over p(x_t, y_t, x_t-1), and the role of the different energy functions was unclear.\r\n\r\nSection 3.1: In a linear mapping, how are 4 overlapping patches different from a single larger patch?\r\n\r\nSection 3.2: Do you do anything about the discontinuities which would occur between the 100-frame sequences?"}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yyC_7RZTkUD5-", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 62ac"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 1,
"importance_and_relevance": 1,
"materials_and_methods": 7,
"praise": 1,
"presentation_and_reporting": 5,
"results_and_discussion": 4,
"suggestion_and_solution": 4,
"total": 19
}
| 1.421053
| 0.852885
| 0.568167
| 1.43727
| 0.191659
| 0.016218
| 0.210526
| 0.052632
| 0.052632
| 0.368421
| 0.052632
| 0.263158
| 0.210526
| 0.210526
|
{
"criticism": 0.21052631578947367,
"example": 0.05263157894736842,
"importance_and_relevance": 0.05263157894736842,
"materials_and_methods": 0.3684210526315789,
"praise": 0.05263157894736842,
"presentation_and_reporting": 0.2631578947368421,
"results_and_discussion": 0.21052631578947367,
"suggestion_and_solution": 0.21052631578947367
}
| 1.421053
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yyC_7RZTkUD5-
|
Deep Predictive Coding Networks
|
The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.
|
arXiv:1301.3541v3 [cs.LG] 15 Mar 2013
Deep Predictive Coding Networks
Rakesh Chalasani Jose C. Principe
Department of Electrical and Computer Engineering
University of Florida, Gainesville, FL 32611
rakeshch@ufl.edu, principe@cnel.ufl.edu
Abstract
The quality of data representation in deep learning methods is directly related to
the prior model imposed on the representations; however, ge nerally used fixed
priors are not capable of adjusting to the context in the data. To address this issue,
we propose deep predictive coding networks, a hierarchical generative model that
empirically alters priors on the latent representations in a dynamic and context-
sensitive manner. This model captures the temporal dependencies in time-varying
signals and uses top-down information to modulate the repre sentation in lower
layers. The centerpiece of our model is a novel procedure to infer sparse states of a
dynamic network which is used for feature extraction. We also extend this feature
extraction block to introduce a pooling function that captu res locally invariant
representations. When applied on a natural video data, we sh ow that our method
is able to learn high-level visual features. We also demonstrate the role of the top-
down connections by showing the robustness of the proposed model to structured
noise.
1 Introduction
The performance of machine learning algorithms is dependen t on how the data is represented. In
most methods, the quality of a data representation is itselfdependent on prior knowledge imposed on
the representation. Such prior knowledge can be imposed usi ng domain specific information, as in
SIFT [1], HOG [2], etc., or in learning representations usin g fixed priors like sparsity [3], temporal
coherence [4], etc. The use of fixed priors became particularly popular while training deep networks
[5–8]. In spite of the success of these general purpose prior s, they are not capable of adjusting to
the context in the data. On the other hand, there are several a dvantages to having a model that can
“actively” adapt to the context in the data. One way of achiev ing this is to empirically alter the
priors in a dynamic and context-sensitive manner. This will be the m ain focus of this work, with
emphasis on visual perception.
Here we propose a predictive coding framework, where a deep locally-connected generative model
uses “top-down” information to empirically alter the prior s used in the lower layers to perform
“bottom-up” inference. The centerpiece of the proposed mod el is extracting sparse features from
time-varying observations using a linear dynamical model . To this end, we propose a novel proce-
dure to infer sparse states (or features) of a dynamical system. We then extend this feature extraction
block to introduce a pooling strategy to learn invariant feature representations from the data. In line
with other “deep learning” methods, we use these basic build ing blocks to construct a hierarchical
model using greedy layer-wise unsupervised learning. The h ierarchical model is built such that the
output from one layer acts as an input to the layer above. In other words, the layers are arranged in a
Markov chain such that the states at any layer are only dependent on the representations in the layer
below and above, and are independent of the rest of the model. The overall goal of the dynamical
system at any layer is to make the best prediction of the representation in the layer below using the
top-down information from the layers above and the temporal information from the previous states.
Hence, the name deep predictive coding networks (DPCN).
1
1.1 Related W ork
The DPCN proposed here is closely related to models proposed in [9, 10], where predictive cod-
ing is used as a statistical model to explain cortical functi ons in the mammalian brain. Similar to
the proposed model, they construct hierarchical generative models that seek to infer the underlying
causes of the sensory inputs. While Rao and Ballard [9] use an update rule similar to Kalman filter
for inference, Friston [10] proposed a general framework considering all the higher-order moments
in a continuous time dynamic model. However, neither of the m odels is capable of extracting dis-
criminative information, namely a sparse and invariant representation, from an image sequence that
is helpful for high-level tasks like object recognition. Un like these models, here we propose an
efficient inference procedure to extract locally invariant representation from image sequences and
progressively extract more abstract information at higher levels in the model.
Other methods used for building deep models, like restricted Boltzmann machine (RBM) [11], auto-
encoders [8, 12] and predictive sparse decomposition [13], are also related to the model proposed
here. All these models are constructed on similar underlyin g principles: (1) like ours, they also use
greedy layer-wise unsupervised learning to construct a hierarchical model and (2) each layer consists
of an encoder and a decoder. The key to these models is to learn both encoding and decoding
concurrently (with some regularization like sparsity [13] , denoising [8] or weight sharing [11]),
while building the deep network as a feed forward model using only the encoder. The idea is
to approximate the latent representation using only the fee d-forward encoder, while avoiding the
decoder which typically requires a more expensive inference procedure. However in DPCN there is
no encoder. Instead, DPCN relies on an efficient inference pr ocedure to get a more accurate latent
representation. As we will show below, the use of reciprocal top-down and bottom-up connections
make the proposed model more robust to structured noise duri ng recognition and also allows it to
perform low-level tasks like image denoising.
To scale to large images, several convolutional models are also proposed in a similar deep learning
paradigm [5–7]. Inference in these models is applied over anentire image, rather than small parts of
the input. DPCN can also be extended to form a convolutional network, but this will not be discussed
here.
2 Model
In this section, we begin with a brief description of the gene ral predictive coding framework and
proceed to discuss the details of the architecture used in this work. The basic block of the proposed
model that is pervasive across all layers is a generalized state-space model of the form:
˜ yt = F(xt) + nt
xt = G(xt−1, ut) + vt (1)
where ˜ yt is the data and F and G are some functions that can be parameterized, say byθ. The terms
ut are called the unknown causes . Since we are usually interested in obtaining abstract information
from the observations, the causes are encouraged to have a no n-linear relationship with the obser-
vations. The hidden states, xt, then “mediate the influence of the cause on the output and end ow
the system with memory” [10]. The terms vt and nt are stochastic and model uncertainty. Several
such state-space models can now be stacked, with the output from one acting as an input to the layer
above, to form a hierarchy. Such an L-layered hierarchical model at any time ’ t’ can be described
as1:
u(l−1 )
t = F(x(l)
t ) + n(l)
t ∀l ∈ { 1, 2, ..., L}
x(l)
t = G(x(l)
t−1, u(l)
t ) + v(l)
t (2)
The terms v(l)
t and n(l)
t form stochastic fluctuations at the higher layers and enter e ach layer in-
dependently. In other words, this model forms a Markov chain across the layers, simplifying the
inference procedure. Notice how the causes at the lower laye r form the “observations” to the layer
above — the causes form the link between the layers, and the st ates link the dynamics over time.
The important point in this design is that the higher-level p redictions influence the lower levels’
1When l = 1, i.e., at the bottom layer, u(i− 1)
t = yt, where yt the input data.
2
Causes (ut)
States (xt)
Observations (yt)
(a) Shows a single layered dynamic network
depicting a basic computational block.
- States (xt)
- Causes (ut)
(Invariant Units)
{ {Layer 1 Layer 2
(b) Shows the distributive hierarchical model formed by
stacking several basic blocks.
Figure 1: (a) Shows a single layered network on a group of smal l overlapping patches of the input
video. The green bubbles indicate a group of inputs ( y(n)
t , ∀n), red bubbles indicate their corre-
sponding states ( x(n)
t ) and the blue bubbles indicate the causes ( ut) that pool all the states within
the group. (b) Shows a two-layered hierarchical model const ructed by stacking several such basic
blocks. For visualization no overlapping is shown between the image patches here, but overlapping
patches are considered during actual implementation.
inference. The predictions from a higher layer non-linearl y enter into the state space model by em-
pirically altering the prior on the causes. In summary, the t op-down connections and the temporal
dependencies in the state space influence the latent representation at any layer.
In the following sections, we will first describe a basic comp utational network, as in (1) with a
particular form of the functions F and G. Specifically, we will consider a linear dynamical model
with sparse states for encoding the inputs and the state transitions, followed by the non-linear pooling
function to infer the causes. Next, we will discuss how to stack and learn a hierarchical model using
several of these basic networks. Also, we will discuss how to incorporate the top-down information
during inference in the hierarchical model.
2.1 Dynamic network
To begin with, we consider a dynamic network to extract featu res from a small part of a video
sequence. Let {y1, y2, ..., yt, ...} ∈ RP be a P -dimensional sequence of a patch extracted from
the same location across all the frames in a video 2 . To process this, our network consists of two
distinctive parts (see Figure.1a): feature extraction (inferring states) and pooling (inferring causes).
For the first part, sparse coding is used in conjunction with a linear state space model to map the
inputs yt at time t onto an over-complete dictionary of K-filters, C ∈ RP ×K (K > P ), to get
sparse states xt ∈ RK . To keep track of the dynamics in the latent states we use a lin ear function
with state-transition matrix A ∈ RK×K . More formally, inference of the features xt is performed
by finding a representation that minimizes the energy function:
E1(xt, yt, C, A) = ∥yt − Cxt∥2
2 + λ∥xt − Axt−1∥1 + γ ∥xt∥1 (3)
Notice that the second term involving the state-transition is also constrained to be sparse to make
the state-space representation consistent.
Now, to take advantage of the spatial relationships in a loca l neighborhood, a small group of states
x(n)
t , where n ∈ { 1, 2, ...N } represents a set of contiguous patches w.r.t. the position i n the image
space, are added (orsum pooled ) together. Such pooling of the states may be lead to local translation
invariance. On top this, a D-dimensional causes ut ∈ RD are inferred from the pooled states to
obtain representation that is invariant to more complex loc al transformations like rotation, spatial
frequency, etc. In line with [14], this invariant function i s learned such that it can capture the
dependencies between the components in the pooled states. S pecifically, the causes ut are inferred
2Here yt is a vectorized form of
√
P ×
√
P square patch extracted from a frame at time t.
3
by minimizing the energy function:
E2(ut, xt, B) =
N∑
n=1
( K∑
k=1
|γk · x(n)
t,k |
)
+ β∥ut∥1 (4)
γk = γ0
[ 1 + exp(−[But]k)
2
]
where γ0 > 0 is some constant. Notice that here ut multiplicatively interacts with the accumulated
states through B, modeling the shape of the sparse prior on the states. Essent ially, the invariant
matrix B is adapted such that each component ut connects to a group of components in the ac-
cumulated states that co-occur frequently. In other words, whenever a component in ut is active
it lowers the coefficient of a set of components in x(n)
t , ∀n, making them more likely to be active.
Since co-occurring components typically share some common statistical regularity, such activity of
ut typically leads to locally invariant representation [14].
Though the two cost functions are presented separately abov e, we can combine both to devise a
unified energy function of the form:
E(xt, ut, θ) =
N∑
n=1
(1
2∥y(n)
t − Cx(n)
t ∥2
2 + λ∥x(n)
t − Ax(n)
t−1∥1 +
K∑
k=1
|γt,k · x(n)
t,k |
)
+ β∥ut∥1
(5)
γt,k =γ0
[ 1 + exp(−[But]k)
2
]
where θ = {A, B, C}. As we will discuss next, both xt and ut can be inferred concurrently from
(5) by alternatively updating one while keeping the other fix ed using an efficient proximal gradient
method.
2.2 Learning
To learn the parameters in (5), we alternatively minimize E(xt, ut, θ) using a procedure similar to
block co-ordinate descent. We first infer the latent variabl es (xt, ut) while keeping the parameters
fixed and then update the parameters θ while keeping the variables fixed. This is done until the
parameters converge. We now discuss separately the inferen ce procedure and how we update the
parameters using a gradient descent method with the fixed variables.
2.2.1 Inference
We jointly infer bothxt and ut from (5) using proximal gradient methods, taking alternative gradient
descent steps to update one while holding the other fixed. In o ther words, we alternate between
updating xt and ut using a single update step to minimize E1 and E2, respectively. However,
updating xt is relatively more involved. So, keeping aside the causes, w e first focus on inferring
sparse states alone from E1, and then go back to discuss the joint inference of both the st ates and
the causes.
Inferring States: Inferring sparse states, given the parameters, from a linea r dynamical system
forms the crux of our model. This is performed by finding the so lution that minimizes the energy
function E1 in (3) with respect to the states xt (while keeping the sparsity parameter γ fixed).
Here there are two priors of the states: the temporal depende nce and the sparsity term. Although
this energy function E1 is convex in xt, the presence of two non-smooth terms makes it hard to
use standard optimization techniques used for sparse codin g alone. A similar problem is solved
using dynamic programming [15], homotopy [16] and Bayesian sparse coding [17]; however, the
optimization used in these models is computationally expensive for use in large scale problems like
object recognition.
To overcome this, inspired by the method proposed in [18] for structured sparsity, we propose an
approximate solution that is consistent and able to use effic ient solvers like fast iterative shrinkage
thresholding alogorithm (FISTA) [19]. The key to our approach is to first use Nestrov’s smoothness
method [18, 20] to approximate the non-smooth state transition term. The resulting energy function
4
is a convex and continuously differentiable function in xt with a sparsity constraint, and hence, can
be efficiently solved using proximal methods like FISTA.
To begin, letΩ( xt) = ∥et∥1 where et = ( xt − Axt−1). The idea is to find a smooth approximation
to this function Ω( xt) in et. Notice that, since et is a linear function on xt, the approximation will
also be smooth w.r.t. xt. Now, we can re-write Ω( xt) using the dual norm of ℓ1 as
Ω( xt) = arg max
∥α ∥∞ ≤1
α T et
where α ∈ Rk. Using the smoothing approximation from Nesterov [20] on Ω( xt):
Ω( xt) ≈ fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] (6)
where d(·) = 1
2 ∥α ∥2
2 is a smoothing function and µ is a smoothness parameter. From Nestrov’s
theorem [20], it can be shown that fµ (et) is convex and continuously differentiable in et and the
gradient of fµ (et) with respect to et takes the form
∇et fµ (et) = α ∗ (7)
where α ∗ is the optimal solution to fµ (et) = arg max
∥α ∥∞ ≤1
[α T et − µd(α )] 3. This implies, by using
the chain rule, that fµ (et) is also convex and continuously differentiable in xt and with the same
gradient.
With this smoothing approximation, the overall cost function from (3) can now be re-written as
xt = arg min
xt
1
2∥yt − Cxt∥2
2 + λfµ (et) + γ∥xt∥1 (8)
with the smooth part h(xt) = 1
2 ∥yt − Cxt∥2
2 + λfµ (et) whose gradient with respect to xt is given
by
∇xt h(xt) = CT (yt − Cxt) + λα ∗ (9)
Using the gradient information in (9), we solve for xt from (8) using FISTA [19].
Inferring Causes: Given a group of state vectors, ut can be inferred by minimizing E2, where we
define a generative model that modulates the sparsity of thepooled state vector, ∑
n |x(n)|. Here we
observe that FISTA can be readily applied to infer ut, as the smooth part of the function E2:
h(ut) =
K∑
k=1
(
γ0
[ 1 + exp( −[But]k)
2
]
·
N∑
n=1
|x(n)
t,k |
)
(10)
is convex, continuously differentiable and Lipschitz inut [21] 4. Following [19], it is easy to obtain
a bound on the convergence rate of the solution.
Joint Inference: We showed thus far that bothxt and ut can be inferred from their respective energy
functions using a first-order proximal method called FISTA. However, for joint inference we have
to minimize the combined energy function in (5) over both xt and ut. We do this by alternately
updating xt and ut while holding the other fixed and using a single FISTA update step at each
iteration. It is important to point out that the internal FIS TA step size parameters are maintained
between iterations. This procedure is equivalent to alternating minimization using gradient descent.
Although this procedure no longer guarantees convergence of both xt and ut to the optimal solution,
in all of our simulations it lead to a reasonably good solutio n. Please refer to Algorithm. 1 (in the
supplementary material) for details. Note that, with the alternating update procedure, each xt is now
influenced by the feed-forward observations, temporal pred ictions and the feedback connections
from the causes.
3Please refer to the supplementary material for the exact form of α ∗.
4The matrix B is initialized with non-negative entries and continues to b e non-negative without any addi-
tional constraints [21].
5
2.2.2 Parameter Updates
With xt and ut fixed, we update the parameters by minimizing E in (5) with respect to θ. Since the
inputs here are a time-varying sequence, the parameters are updated using dual estimation filtering
[22]; i.e., we put an additional constraint on the parameter s such that they follow a state space
equation of the form:
θt = θt−1 + zt (11)
where zt is Gaussian transition noise over the parameters. This keep s track of their temporal rela-
tionships. Along with this constraint, we update the parame ters using gradient descent. Notice that
with a fixed xt and ut, each of the parameter matrices can be updated independentl y. Matrices C
and B are column normalized after the update to avoid any trivial solution.
Mini-Batch Update: To get faster convergence, the parameters are updated after performing infer-
ence over a large sequence of inputs instead of at every time instance. With this “batch” of signals,
more sophisticated gradient methods, like conjugate gradi ent, can be used and, hence, can lead to
more accurate and faster convergence.
2.3 Building a hierarchy
So far the discussion is focused on encoding a small part of a v ideo frame using a single stage
network. To build a hierarchical model, we use this single st age network as a basic building block
and arrange them up to form a tree structure (see Figure.1b). To learn this hierarchical mode l, we
adopt a greedy layer-wise procedure like many other deep learning methods [6, 8, 11]. Specifically,
we use the following strategy to learn the hierarchical model.
For the first (or bottom) layer, we learn a dynamic network as d escribed above over a group of
small patches from a video. We then take this learned network and replicate it at several places
on a larger part of the input frames (similar to weight sharin g in a convolutional network [23]).
The outputs (causes) from each of these replicated networks are considered as inputs to the layer
above. Similarly, in the second layer the inputs are again grouped together (depending on the spatial
proximity in the image space) and are used to train another dynamic network. Similar procedure can
be followed to build more higher layers.
We again emphasis that the model is learned in a layer-wise ma nner, i.e., there is no top-down
information while learning the network parameters. Also no te that, because of the pooling of the
states at each layers, the receptive field of the causes becomes progressively larger with the depth of
the model.
2.4 Inference with top-down information
With the parameters fixed, we now shift our focus to inference in the hierarchical model with the
top-down information. As we discussed above, the layers in the hierarchy are arranged in a Markov
chain, i.e., the variables at any layer are only influenced by the variables in the layer below and the
layer above. Specifically, the states x(l)
t and the causes u(l)
t at layer l are inferred from u(l−1)
t and
are influenced by x(l+1)
t (through the prediction term C(l+1)x(l+1)
t ) 5. Ideally, to perform inference
in this hierarchical model, all the states and the causes have to be updated simultaneously depending
on the present state of all the other layers until the model re aches equilibrium [10]. However, such
a procedure can be very slow in practice. Instead, we propose an approximate inference procedure
that only requires a single top-down flow of information and then a single bottom-up inference using
this top-down information.
5The suffixes n indicating the group are considered implicit here to simplify the notation.
6
For this we consider that at any layer l a group of input u(l−1,n )
t , ∀n ∈ { 1, 2, ..., N } are encoded
using a group of states x(l,n )
t , ∀n and the causes u(l)
t by minimizing the following energy function:
El(x(l)
t , u(l)
t , θ(l)) =
N∑
n=1
(1
2∥u(l−1,n )
t − C(l)x(l,n )
t ∥2
2 + λ∥x(l,n )
t − A(l)x(l,n )
t−1 ∥1
+
K∑
k=1
|γ(l)
t,k · x(l,n )
t,k |
)
+ β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 (12)
γ(l)
t,k = γ0
[ 1 + exp(−[B(l)u(l)
t ]k)
2
]
where θ(l) = {A(l), B(l), C(l)}. Notice the additional term involving ˆ u(l+1)
t when compared to (5).
This comes from the top-down information, where we call ˆ u(l+1)
t as the top-down prediction of the
causes of layer (l) using the previous states in layer (l + 1) . Specifically, before the “arrival” of a
new observation at time t, at each layer (l) (starting from the top-layer) we first propagate the most
likely causes to the layer below using the state at the previous time instance x(l)
t−1 and the predicted
causes ˆ u(l+1)
t . More formally, the top-down prediction at layer l is obtained as
ˆ u(l)
t = C(l)ˆ x(l)
t
where ˆ x(l)
t = arg min
x(l)
t
λ(l)∥x(l)
t − A(l)x(l)
t−1∥1 + γ0
K∑
k=1
|ˆγt,k · x(l)
t,k | (13)
and ˆγt,k = (exp( −[B(l)ˆ u(l+1)
t ]k))/2
At the top most layer, L, a “bias” is set such that ˆ u(L)
t = ˆ u(L)
t−1, i.e., the top-layer induces some
temporal coherence on the final outputs. From (13), it is easy to show that the predicted states for
layer l can be obtained as
ˆx(l)
t,k =
{
[A(l)x(l)
t−1]k, γ 0γt,k < λ (l)
0, γ 0γt,k ≥ λ(l) (14)
These predicted causesˆ u(l)
t , ∀l ∈ { 1, 2, ..., L} are substituted in (12) and a single layer-wise bottom-
up inference is performed as described in section 2.2.1 6. The combined prior now imposed on the
causes, β∥u(l)
t ∥1 + 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2, is similar to the elastic net prior discussed in [24], leading to
a smoother and biased estimate of the causes.
3 Experiments
3.1 Receptive fields of causes in the hierarchical model
Firstly, we would like to test the ability of the proposed mod el to learn complex features in the
higher-layers of the model. For this we train a two layered ne twork from a natural video. Each
frame in the video was first contrast normalized as described in [13]. Then, we train the first layer
of the model on 4 overlapping contiguous 15 × 15 pixel patches from this video; this layer has
400 dimensional states and 100 dimensional causes. The caus es pool the states related to all the
4 patches. The separation between the overlapping patches he re was 2 pixels, implying that the
receptive field of the causes in the first layer is 17 × 17 pixels. Similarly, the second layer is trained
on 4 causes from the first layer obtained from 4 overlapping 17 × 17 pixel patches from the video.
The separation between the patches here is 3 pixels, implying that the receptive field of the causes
in the second layer is 20 × 20 pixels. The second layer contains 200 dimensional states an d 50
dimensional causes that pools the states related to all the 4 patches.
Figure 2 shows the visualization of the receptive fields of th e invariant units (columns of matrix
B) at each layer. We observe that each dimension of causes in th e first layer represents a group of
6Note that the additional term 1
2 ∥u(l)
t − ˆ u(l+1)
t ∥2
2 in the energy function only leads to a minor modification
in the inference procedure, namely this has to be added to h(ut) in (10).
7
(a) Layer 1 invariant matrix, B(1)
(b) Layer 2 invariant matrix, B(2)
Figure 2: Visualization of the receptive fields of the invariant units learned in (a) layer 1 and (b) layer
2 when trained on natural videos. The receptive fields are constructed as a weighted combination of
the dictionary of filters at the bottom layer.
primitive features (like inclined lines) which are localized in orientation or position 7. Whereas, the
causes in the second layer represent more complex features, like corners, angles, etc. These filters
are consistent with the previously proposed methods like Lee et al. [5] and Zeiler et al. [7].
3.2 Role of top-down information
In this section, we show the role of the top-down information during inference, particularly in the
presence of structured noise. Video sequences consisting of objects of three different shapes (Refer
to Figure 3) were constructed. The objective is to classify e ach frame as coming from one of the
three different classes. For this, several 32 × 32 pixel 100 frame long sequences were made using
two objects of the same shape bouncing off each other and the “walls”. Several such sequences were
then concatenated to form a 30,000 long sequence. We train a two layer network using this sequence.
First, we divided each frame into12 × 12 patches with neighboring patches overlapping by 4 pixels;
each frame is divided into 16 patches. The bottom layer was tr ained such the 12 × 12 patches were
used as inputs and were encoded using a 100 dimensional state vector. A 4 contiguous neighboring
patches were pooled to infer the causes that have 40 dimensions. The second layer was trained with
4 first layer causes as inputs, which were itself inferred from20 × 20 contiguous overlapping blocks
of the video frames. The states here are 60 dimensional long and the causes have only 3 dimensions.
It is important to note here that the receptive field of the second layer causes encompasses the entire
frame.
We test the performance of the DPCN in two conditions. The firs t case is with 300 frames of clean
video, with 100 frames per shape, constructed as described above. We consider this as a single video
without considering any discontinuities. In the second case, we corrupt the clean video with “struc-
tured” noise, where we randomly pick a number of objects from same three shapes with a Poisson
distribution (with mean 1.5) and add them to each frame independently at a random locations. There
is no correlation between any two consecutive frames regarding where the “noisy objects” are added
(see Figure.3b).
First we consider the clean video and perform inference with only bottom-up inference, i.e., during
inference we consider ˆ u(l)
t = 0 , ∀l ∈ { 1, 2}. Figure 4a shows the scatter plot of the three dimen-
sional causes at the top layer. Clearly, there are 3 clusters recognizing three different shape in the
video sequence. Figure 4b shows the scatter plot when the sam e procedure is applied on the noisy
video. We observe that 3 shapes here can not be clearly distin guished. Finally, we use top-down
information along with the bottom-up inference as describe d in section 2.4 on the noisy data. We
argue that, since the second layer learned class specific inf ormation, the top-down information can
help the bottom layer units to disambiguate the noisy objects from the true objects. Figure 4c shows
the scatter plot for this case. Clearly, with the top-down in formation, in spite of largely corrupted
sequence, the DPCN is able to separate the frames belonging to the three shapes (the trace from one
cluster to the other is because of the temporal coherence imposed on the causes at the top layer.).
7Please refer to supplementary material for more results.
8
(a) Clear Sequences (b) Corrupted Sequences
Figure 3: Shows part of the (a) clean and (b) corrupted video s equences constructed using three
different shapes. Each row indicates one sequence.
0
5
10
0
2
4
0
2
4
6
Object 1
Object 2
Object 3
(a)
0
5
10
0
2
4
6
0
2
4
6
Object 1
Object 2
Object 3
(b)
0
2
4
6
0
1
2
3
0
2
4
6
Object 1
Object 2
Object 3
(c)
Figure 4: Shows the scatter plot of the 3 dimensional causes a t the top-layer for (a) clean video
with only bottom-up inference, (b) corrupted video with only bottom-up inference and (c) corrupted
video with top-down flow along with bottom-up inference. At e ach point, the shape of the marker
indicates the true shape of the object in the frame.
4 Conclusion
In this paper we proposed the deep predictive coding network , a generative model that empirically
alters the priors in a dynamic and context sensitive manner.This model composes to two main com-
ponents: (a) linear dynamical models with sparse states used for feature extraction, and (b) top-down
information to adapt the empirical priors. The dynamic mode l captures the temporal dependencies
and reduces the instability usually associated with sparse coding 8, while the task specific informa-
tion from the top layers helps to resolve ambiguities in the lower-layer improving data representation
in the presence of noise. We believe that our approach can be extended with convolutional methods,
paving the way for implementation of high-level tasks like o bject recognition, etc., on large scale
videos or images.
Acknowledgments
This work is supported by the Office of Naval Research (ONR) gr ant #N000141010375. We thank
Austin J. Brockmeier and Matthew Emigh for their comments and suggestions.
References
[1] David G. Lowe. Object recognition from local scale-inva riant features. In Proceedings of the
International Conference on Computer V ision-V olume 2 - V ol ume 2 , ICCV ’99, pages 1150–,
1999. ISBN 0-7695-0164-8.
[2] Navneet Dalal and Bill Triggs. Histograms of oriented gr adients for human detection. In
Proceedings of the 2005 IEEE Computer Society Conference on Computer V ision and P attern
Recognition (CVPR’05) - V olume 1 - V olume 01 , CVPR ’05, pages 886–893, 2005. ISBN
0-7695-2372-2.
[3] B. A. Olshausen and D. J. Field. Emergence of simple-cellreceptive field properties by learning
a sparse code for natural images. Nature, 381(6583):607–609, June 1996. ISSN 0028-0836.
[4] L. Wiskott and T.J. Sejnowski. Slow feature analysis: Un supervised learning of invariances.
Neural computation , 14(4):715–770, 2002.
8Please refer to the supplementary material for more details.
9
[5] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y . Ng. Convolutional deep belief
networks for scalable unsupervised learning of hierarchical representations. In Proceedings of
the 26th Annual International Conference on Machine Learni ng, ICML ’09, pages 609–616,
2009. ISBN 978-1-60558-516-1.
[6] K. Kavukcuoglu, P. Sermanet, Y .L. Boureau, K. Gregor, M. Mathieu, and Y . LeCun. Learn-
ing convolutional feature hierarchies for visual recognit ion. Advances in Neural Information
Processing Systems , pages 1090–1098, 2010.
[7] M.D. Zeiler, D. Krishnan, G.W. Taylor, and R. Fergus. Deconvolutional networks. InComputer
V ision and P attern Recognition (CVPR), 2010 IEEE Conferenc e on , pages 2528–2535. IEEE,
2010.
[8] P. Vincent, H. Larochelle, I. Lajoie, Y . Bengio, and P.A.Manzagol. Stacked denoising autoen-
coders: Learning useful representations in a deep network with a local denoising criterion. The
Journal of Machine Learning Research , 11:3371–3408, 2010.
[9] Rajesh P. N. Rao and Dana H. Ballard. Dynamic model of visu al recognition predicts neural
response properties in the visual cortex. Neural Computation , 9:721–763, 1997.
[10] Karl Friston. Hierarchical models in the brain. PLoS Comput Biol , 4(11):e1000211, 11 2008.
[11] Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. AFast Learning Algorithm for Deep
Belief Nets. Neural Comp. , (7):1527–1554, July .
[12] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise train-
ing of deep networks. In In NIPS , 2007.
[13] Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. Fast inference in sparse coding
algorithms with applications to object recognition. CoRR, abs/1010.3467, 2010.
[14] Yan Karklin and Michael S. Lewicki. A hierarchical baye sian model for learning nonlinear
statistical regularities in nonstationary natural signals. Neural Computation , 17:397–423, 2005.
[15] D. Angelosante, G.B. Giannakis, and E. Grossi. Compres sed sensing of time-varying signals.
In Digital Signal Processing, 2009 16th International Confer ence on , pages 1 –8, july 2009.
[16] A. Charles, M.S. Asif, J. Romberg, and C. Rozell. Sparsi ty penalties in dynamical system
estimation. In Information Sciences and Systems (CISS), 2011 45th Annual C onference on ,
pages 1 –6, march 2011.
[17] D. Sejdinovic, C. Andrieu, and R. Piechocki. Bayesian sequential compressed sensing in sparse
dynamical systems. In Communication, Control, and Computing (Allerton), 2010 48 th Annual
Allerton Conference on , pages 1730 –1736, 29 2010-oct. 1 2010. doi: 10.1109/ALLERT ON.
2010.5707125.
[18] X. Chen, Q. Lin, S. Kim, J.G. Carbonell, and E.P. Xing. Sm oothing proximal gradient method
for general structured sparse regression. The Annals of Applied Statistics , 6(2):719–752, 2012.
[19] Amir Beck and Marc Teboulle. A Fast Iterative Shrinkage -Thresholding Algorithm for Linear
Inverse Problems. SIAM Journal on Imaging Sciences , (1):183–202, March . ISSN 19364954.
doi: 10.1137/080716542.
[20] Y . Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming , 103
(1):127–152, 2005.
[21] Karol Gregor and Yann LeCun. Efficient Learning of Sparse Invariant Representations. CoRR,
abs/1105.5307, 2011.
[22] Alex Nelson. Nonlinear estimation and modeling of noisy time-series by d ual Kalman filtering
methods. PhD thesis, 2000.
[23] Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howa rd, W. Hubbard, and L. D.
Jackel. Backpropagation applied to handwritten zip code re cognition. Neural Comput. , 1
(4):541–551, December 1989. ISSN 0899-7667. doi: 10.1162/ neco.1989.1.4.541. URL
http://dx.doi.org/10.1162/neco.1989.1.4.541.
[24] H. Zou and T. Hastie. Regularization and variable selec tion via the elastic net. Journal of the
Royal Statistical Society: Series B (Statistical Methodol ogy), 67(2):301–320, 2005.
10
A Supplementary material for Deep Predictive Coding Networ ks
A.1 From section 2.2.1, computing α ∗
The optimal solution of α in (6) is given by
α ∗ = arg max
∥α ∥∞ ≤1
[α T et − µ
2 ∥α ∥2]
= arg min
∥α ∥∞ ≤1
α − et
µ
2
=S
(et
µ
)
(15)
where S(.) is a function projecting
(
et
µ
)
onto an ℓ∞-ball. This is of the form:
S(x) =
x, −1 ≤ x ≤ 1
1, x > 1
−1, x < −1
A.2 Algorithm for joint inference of the states and the cause s.
Algorithm 1 Updating xt,ut simultaneously using FISTA-like procedure [19].
Require: Take Lx
0,n > 0 ∀n ∈ { 1, 2, ..., N }, Lu
0 > 0 and some η > 1.
1: Initialize x0,n ∈ RK ∀n ∈ { 1, 2, ..., N }, u0 ∈ RD and set ξ1 = u0, z1,n = x0,n .
2: Set step-size parameters: τ1 = 1 .
3: while no convergence do
4: Update
γ = γ0(1 + exp( −[Bui])/2
.
5: for n ∈ { 1, 2, ..., N } do
6: Line search: Find the best step size Lx
k,n .
7: Compute α ∗ from (15)
8: Update xi,n using the gradient from (9) with a soft-thresholding function.
9: Update internal variables zi+1 with step size parameter τi as in [19].
10: end for
11: Compute ∑ N
n=1 |xi,n |
12: Line search: Find the best step size Lu
k .
13: Update ui,n using the gradient of (10) with a soft-thresholding function.
14: Update internal variables ξi+1 with step size parameter τi as in [19].
15: Update
τi+1 =
(
1 +
√
(4τ2
i + 1)
)
/2
.
16: Check for convergence.
17: i = i + 1
18: end while
19: return xi,n ∀n ∈ { 1, 2, ..., N } and ui
11
A.3 Inferring sparse states with known parameters
20 40 60 80 1000
0.5
1
1.5
2
2.5
3
Observation Dimensions
steady state rMSE
Kalman Filter
Proposed
Sparse Coding [20]
Figure 5: Shows the performance of the inference algorithm w ith fixed parameters when compared
with sparse coding and Kalman filtering. For this we first simu late a state sequence with only 20
non-zero elements in a 500-dimensional state vector evolvi ng with a permutation matrix, which is
different for every time instant, followed by a scaling matrix to generate a sequence of observations.
We consider that both the permutation and the scaling matrices are known apriori. The observation
noise is Gaussian zero mean and variance σ2 = 0 .01. We consider sparse state-transition noise,
which is simulated by choosing a subset of active elements in the state vector (number of elements
is chosen randomly via a Poisson distribution with mean 2) an d switching each of them with a
randomly chosen element (with uniform probability over the state vector). This resemble a sparse
innovation in the states. We use these generated observation sequences as inputs and use the apriori
know parameters to infer the states from the dynamic model. F igure 5 shows the results obtained,
where we compare the inferred states from different methodswith the true states in terms of relative
mean squared error (rMSE) (defined as ∥xest
t − xtrue
t ∥/∥xtrue
t ∥). The steady state error (rMSE)
after 50 time instances is plotted versus with the dimension ality of the observation sequence. Each
point is obtained after averaging over 50 runs. We observe th at our model is able to converge to
the true solution even for low dimensional observation, when other methods like sparse coding fail.
We argue that the temporal dependencies considered in our model is able to drive the solution to the
right attractor basin, insulating it from instabilities typically associated with sparse coding [24].
12
A.4 Visualizing first layer of the learned model
(a) Observation matrix (Bases)
Active state
element at (t-1)
Corresponding,
predicted states at (t)
(b) State-transition matrix
Figure 6: Visualization of the parameters. C and A, of the model described in section 3.1. (A)
Shows the learned observation matrix C. Each square block indicates a column of the matrix,
reshaped as √p × √p pixel block. (B) Shows the state transition matrix A using its connections
strength with the observation matrix C. On the left are the basis corresponding to the single active
element in the state at time (t − 1) and on the right are the basis corresponding to the five most
“active” elements in the predicted state (ordered in decreasing order of the magnitude).
(a) Connections
(b) Centers and Orientations (c) Orientations and Frequencies
Figure 7: Connections between the invariant units and the ba sis functions. (A) Shows the connec-
tions between the basis and columns of B. Each row indicates an invariant unit. Here the set of
basis that a strongly correlated to an invariant unit are sho wn, arranged in the decreasing order of
the magnitude. (B) Shows spatially localized grouping of the invariant units. Firstly, we fit a Gabor
function to each of the basis functions. Each subplot here is then obtained by plotting a line indicat-
ing the center and the orientation of the Gabor function. Thecolors indicate the connections strength
with an invariant unit; red indicating stronger connection s and blue indicate almost zero strength.
We randomly select a subset of 25 invariant units here. We obs erve that the invariant unit group
the basis that are local in spatial centers and orientations . (C) Similarly, we show the correspond-
ing orientation and spatial frequency selectivity of the in variant units. Here each plot indicates the
orientation and frequency of each Gabor function color coded according to the connection strengths
with the invariant units. Each subplot is a half-polar plot with the orientation plotted along the angle
ranging from 0 to π and the distance from the center indicating the frequency. A gain, we observe
that the invariant units group the basis that have similar orientation.
13
|
Rakesh Chalasani, Jose C. Principe
|
Unknown
| 2,013
|
{"id": "yyC_7RZTkUD5-", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358405100000, "tmdate": 1358405100000, "ddate": null, "number": 27, "content": {"title": "Deep Predictive Coding Networks", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The quality of data representation in deep learning methods is directly related to the prior model imposed on the representations; however, generally used fixed priors are not capable of adjusting to the context in the data. To address this issue, we propose deep predictive coding networks, a hierarchical generative model that empirically alters priors on the latent representations in a dynamic and context-sensitive manner. This model captures the temporal dependencies in time-varying signals and uses top-down information to modulate the representation in lower layers. The centerpiece of our model is a novel procedure to infer sparse states of a dynamic model; which is used for feature extraction. We also extend this feature extraction block to introduce a pooling function that captures locally invariant representations. When applied on a natural video data, we show that our method is able to learn high-level visual features. We also demonstrate the role of the top-down connections by showing the robustness of the proposed model to structured noise.", "pdf": "https://arxiv.org/abs/1301.3541", "paperhash": "chalasani|deep_predictive_coding_networks", "authors": ["Rakesh Chalasani", "Jose C. Principe"], "authorids": ["vnit.rakesh@gmail.com", "principe@cnel.ufl.edu"], "keywords": [], "conflicts": []}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["vnit.rakesh@gmail.com"], "writers": []}
|
[Review]:
Thank you for review and comments. We revised the paper to address most of your concerns. Following is our response to some specific point you have raised.
>>> ' The clarity of the paper needs to be improved. For example, it will be helpful to motivate more clearly about the specific formulation of the model'
We made some major changes to improve the presentation of the model, with more emphasis on explaining the formulation. Hopefully the revised version will improve the clarity of the paper.
>>> ' The empirical evaluation of the model could be strengthened by directly comparing the DPCN to related works on non-synthetic datasets.'
We agree that the empirical evaluation could be strengthened by comparing DPCN with other models in tasks like denoising, classification etc., on large image and video datasets. However, to scale this model to larger inputs we require convolutional network like models, similar to many other methods. This is an on going work and we are presently working on a convolutional model for DPCN.
>>>'In the beginning of the section 2.1, please define P, D, K to improve clarity.
>>> In section 2.2, little explanation about the pooling matrix B is given. Also, more explanations about equation 4 would be desirable.
>>> What is z_{t} in Equation 11?'
Corrected. These are explained more clearly in the revised paper. z_{t} is the Gaussian transition noise over the parameters.
>>> 'In Section 2.2, its not clear how u_{hat} is computed. '
This is moved into section. 2.4 in the revised paper, where more explanation is provided about u_{hat}.
|
Rakesh Chalasani, Jose C. Principe
| null | null |
{"id": "3vEUvBbCrO8cu", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363392960000, "tmdate": 1363392960000, "ddate": null, "number": 1, "content": {"title": "", "review": "Thank you for review and comments. We revised the paper to address most of your concerns. Following is our response to some specific point you have raised.\r\n\r\n>>> ' The clarity of the paper needs to be improved. For example, it will be helpful to motivate more clearly about the specific formulation of the model'\r\n\r\nWe made some major changes to improve the presentation of the model, with more emphasis on explaining the formulation. Hopefully the revised version will improve the clarity of the paper.\r\n\r\n>>> ' The empirical evaluation of the model could be strengthened by directly comparing the DPCN to related works on non-synthetic datasets.'\r\n\r\nWe agree that the empirical evaluation could be strengthened by comparing DPCN with other models in tasks like denoising, classification etc., on large image and video datasets. However, to scale this model to larger inputs we require convolutional network like models, similar to many other methods. This is an on going work and we are presently working on a convolutional model for DPCN. \r\n\r\n>>>'In the beginning of the section 2.1, please define P, D, K to improve clarity. \r\n>>> In section 2.2, little explanation about the pooling matrix B is given. Also, more explanations about equation 4 would be desirable.\r\n>>> What is z_{t} in Equation 11?'\r\n\r\nCorrected. These are explained more clearly in the revised paper. z_{t} is the Gaussian transition noise over the parameters. \r\n\r\n>>> 'In Section 2.2, its not clear how u_{hat} is computed. '\r\n\r\nThis is moved into section. 2.4 in the revised paper, where more explanation is provided about u_{hat}."}, "forum": "yyC_7RZTkUD5-", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yyC_7RZTkUD5-", "readers": ["everyone"], "nonreaders": [], "signatures": ["Rakesh Chalasani, Jose C. Principe"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 2,
"importance_and_relevance": 2,
"materials_and_methods": 6,
"praise": 0,
"presentation_and_reporting": 10,
"results_and_discussion": 1,
"suggestion_and_solution": 8,
"total": 20
}
| 1.55
| 0.776661
| 0.773339
| 1.566585
| 0.229293
| 0.016585
| 0.1
| 0.1
| 0.1
| 0.3
| 0
| 0.5
| 0.05
| 0.4
|
{
"criticism": 0.1,
"example": 0.1,
"importance_and_relevance": 0.1,
"materials_and_methods": 0.3,
"praise": 0,
"presentation_and_reporting": 0.5,
"results_and_discussion": 0.05,
"suggestion_and_solution": 0.4
}
| 1.55
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yGgjGkkbeFSbt
|
Saturating Auto-Encoder
|
We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.
|
Saturating Auto-Encoders
Rostislav Goroshin∗
Courant Institute of Mathematical Science
New York University
goroshin@cs.nyu.edu
Yann LeCun
Courant Institute of Mathematical Science
New York University
yann@cs.nyu.edu
Abstract
We introduce a simple new regularizer for auto-encoders whose hidden-unit ac-
tivation functions contain at least one zero-gradient (saturated) region. This reg-
ularizer explicitly encourages activations in the saturated region(s) of the corre-
sponding activation function. We call these Saturating Auto-Encoders (SATAE).
We show that the saturation regularizer explicitly limits the SATAE’s ability to
reconstruct inputs which are not near the data manifold. Furthermore, we show
that a wide variety of features can be learned when different activation functions
are used. Finally, connections are established with the Contractive and Sparse
Auto-Encoders.
1 Introduction
An auto-encoder is a conceptually simple neural network used for obtaining useful data rep-
resentations through unsupervised training. It is composed of an encoder which outputs a
hidden (or latent) representation and a decoder which attempts to reconstruct the input using
the hidden representation as its input. Training consists of minimizing a reconstruction cost
such as L2 error. However this cost is merely a proxy for the true objective: to obtain a useful
latent representation. Auto-encoders can implement many dimensionality reduction techniques
such as PCA and Sparse Coding (SC) [5] [6] [7]. This makes the study of auto-encoders very
appealing from a theoretical standpoint. In recent years, renewed interest in auto-encoders net-
works has mainly been due to their empirical success in unsupervised feature learning [1] [2] [3] [4].
When minimizing only reconstruction cost, the standard auto-encoder does not typically learn any
meaningful hidden representation of the data. Well known theoretical and experimental results
show that a linear auto-encoder with trainable encoding and decoding matrices, We and Wd re-
spectively, learns the identity function if We and Wd are full rank or over-complete. The linear
auto-encoder learns the principle variance directions (PCA) if We and Wd are rank deficient [5].
It has been observed that other representations can be obtained by regularizing the latent repre-
sentation. This approach is exemplified by the Contractive and Sparse Auto-Encoders [3] [1] [2].
Intuitively, an auto-encoder with limited capacity will focus its resources on reconstructing portions
of the input space in which data samples occur most frequently. From an energy based perspective,
auto-encoders achieve low reconstruction cost in portions of the input space with high data density
(recently, [8] has examined this perspective in depth). If the data occupies some low dimensional
manifold in the higher dimensional input space then minimizing reconstruction error achieves low
energy on this manifold. Useful latent state regularizers raise the energy of points that do not lie
on the manifold, thus playing an analogous role to minimizing the partition function in maximum
likelihood models. In this work we introduce a new type of regularizer that does this explicitly for
∗The authors thank Joan Bruna and David Eigen for their useful suggestions and comments.
1
arXiv:1301.3577v3 [cs.LG] 20 Mar 2013
auto-encoders with a non-linearity that contains at least one flat (zero gradient) region. We show ex-
amples where this regularizer and the choice of nonlinearity determine the feature set that is learned
by the auto-encoder.
2 Latent State Regularization
Several auto-encoder variants which regularize their latent states have been proposed, they include
the sparse auto-encoder and the contractive auto-encoder [1] [2] [3]. The sparse auto-encoder in-
cludes an over-complete basis in the encoder and imposes a sparsity inducing (usually L1) penalty
on the hidden activations. This penalty prevents the auto-encoder from learning to reconstruct all
possible points in the input space and focuses the expressive power of the auto-encoder on repre-
senting the data-manifold. Similarly, the contractive auto-encoder avoids trivial solutions by intro-
ducing an auxiliary penalty which measures the square Frobenius norm of the Jacobian of the latent
representation with respect to the inputs. This encourages a constant latent representation except
around training samples where it is counteracted by the reconstruction term. It has been noted in [3]
that these two approaches are strongly related. The contractive auto-encoder explicitly encourages
small entries in the Jacobian, whereas the sparse auto-encoder is encouraged to produce mostly zero
(sparse) activations which can be designed to correspond to mostly flat regions of the nonlinearity,
thus also yielding small entries in the Jacobian.
2.1 Saturating Auto-Encoder through Complementary Nonlinearities
Our goal is to introduce a simple new regularizer which explicitly raises reconstruction error for
inputs not near the data manifold. Consider activation functions with at least one flat region; these
include shrink, rectified linear, and saturated linear (Figure 1). Auto-encoders with such nonlineari-
ties lose their ability to accurately reconstruct inputs which produce activations in the zero-gradient
regions of their activation functions. Let us denote the auto-encoding function xr = G(x,W), x
being the input, W the trainable parameters in the auto-encoder, and xr the reconstruction. One can
define an energy surface through the reconstruction error:
EW (x) = ||x−G(x,W)||2
Let’s imagine that G has been trained to produce a low reconstruction error at a particular data
point x∗. If Gis constant when xvaries along a particular direction v, then the energy will grow
quadratically along that particular direction as xmoves away from x∗. If Gis trained to produce
low reconstruction errors on a set of samples while being subject to a regularizer that tries to make
it constant in as many directions as possible, then the reconstruction energy will act as a contrast
function that will take low values around areas of high data density and larger values everywhere
else (similarly to a negative log likelihood function for a density estimator).
The proposed auto-encoder is a simple implementation of this idea. Using the notation W =
{We,Be,Wd,Bd}, the auto-encoder function is defined as
G(x,W) = WdF(Wex+ Be) + Bd
where We, Be, Wd, and Bd are the encoding matrix, encoding bias, decoding matrix, and decoding
bias, respectively, and F is the vector function that applies the scalar function f to each of its
components. f will be designed to have ”flat spots”, i.e. regions where the derivative is zero (also
referred to as the saturation region).
The loss function minimized by training is the sum of the reconstruction energy EW (x) = ||x−
G(x,W)||2 and a term that pushes the components ofWex+ Be towards the flat spots of f. This is
performed through the use of a complementary functionfc, associated with the non-linearity f(z).
The basic idea is to design fc(z) so that its value corresponds to the distance of z to one of the
flat spots of f(z). Minimizing fc(z) will push z towards the flat spots of f(z). With this in mind,
we introduce a penalty of the form fc(∑d
j=1 We
ijxj + be
i ) which encourages the argument to be
in the saturation regime of the activation function ( f). We refer to auto-encoders which include
this regularizer as Saturating Auto-Encoders (SATAEs). For activation functions with zero-gradient
regime(s) the complementary nonlinearity (fc) can be defined as the distance to the nearest saturation
region. Specifically, let S = {z|f′(z) = 0}then we define fc(z) as:
2
Figure 1: Three nonlinearities (top) with their associated complementary regularization func-
tions(bottom).
fc(z) = inf
z′∈S
|z−z′|. (1)
Figure 1 shows three activation functions and their associated complementary nonlinearities. The
complete loss to be minimized by a SATAE with nonlinearityf is:
L=
∑
x∈D
1
2∥x−
(
WdF(Wex+ Be) + Bd)
∥2 + α
dh∑
i=1
fc(We
i x+ be
i ), (2)
where dh denotes the number of hidden units. The hyper-parameterαregulates the trade-off between
reconstruction and saturation.
3 Effect of the Saturation Regularizer
We will examine the effect of the saturation regularizer on auto-encoders with a variety of activation
functions. It will be shown that the choice of activation function is a significant factor in determining
the type of basis the SATAE learns. First, we will present results on toy data in two dimensions
followed by results on higher dimensional image data.
3.1 Visualizing the Energy Landscape
Given a trained auto-encoder the reconstruction error can be evaluated for a given input x. For
low-dimensional spaces (Rn, where n ≤3) we can evaluate the reconstruction error on a regular
grid in order to visualize the portions of the space which are well represented by the auto-encoder.
More specifically we can compute E(x) = 1
2 ∥x−xr∥2 for all xwithin some bounded region of
the input space. Ideally, the reconstruction energy will be low for all xwhich are in the training set
and high elsewhere. Figures 2 and 3 depict the resulting reconstruction energy for inputs x ∈R2,
and −1 ≤xi ≤1. Black corresponds to low reconstruction energy. The training data consists of
a one dimensional manifold shown overlain in yellow. Figure 2 shows a toy example for a SATAE
which uses ten basis vectors and a shrink activation function. Note that adding the saturation regu-
larizer decreases the volume of the space which is well reconstructed, however good reconstruction
is maintained on or near the training data manifold. The auto-encoder in Figure 3 contains two
3
Figure 2: Energy surfaces for unregularized (left), and regularized (right) solutions obtained on
SATAE-shrink and 10 basis vectors. Black corresponds to low reconstruction energy. Training
points lie on a one-dimensional manifold shown in yellow.
Figure 3: SATAE-SL toy example with two basis elements. Top Row: three randomly initialized so-
lutions obtained with no regularization. Bottom Row: three randomly initialized solutions obtained
with regularization.
encoding basis vectors (red), two decoding basis vectors (green), and uses a saturated-linear activa-
tion function. The encoding and decoding bases are unconstrained. The unregularized auto-encoder
learns an orthogonal basis with a random orientation. The region of the space which is well recon-
structed corresponds to the outer product of the linear regions of two activation functions; beyond
that the error increases quadratically with the distance. Including the saturation regularizer induces
the auto-encoder basis to align with the data and to operate in the saturation regime at the extreme
points of the training data, which limits the space which is well reconstructed. Note that because the
encoding and decoding weights are separate and unrestricted, the encoding weights were scaled up
to effectively reduce the width of the linear regime of the nonlinearity.
3.2 SATAE-shrink
Consider a SATAE with a shrink activation function and shrink parameter λ. The corresponding
complementary nonlinearity, derived using Equation 1 is given by:
shrinkc(x) =
{abs(x), |x|>λ
0, elsewhere .
Note that shrinkc(Wex+ be) = abs(shrink(Wex+ be)), which corresponds to an L1 penalty
on the activations. Thus this SATAE is equivalent to a sparse auto-encoder with a shrink activation
function. Given the equivalence to the sparse auto-encoder we anticipate the same scale ambiguity
which occurs with L1 regularization. This ambiguity can be avoided by normalizing the decoder
weights to unit norm. It is expected that the SATAE-shrink will learn similar features to those
obtained with a sparse auto-encoder, and indeed this is what we observe. Figure 4(c) shows the
decoder filters learned by an auto-encoder with shrink nonlinearity trained on gray-scale natural
image patches. One can recognize the expected Gabor-like features when the saturation penalty is
activated. When trained on the binary MNIST dataset the learned basis is comprised of portions of
digits and strokes. Nearly identical results are obtained with a SATAE which uses a rectified-linear
4
activation function. This is because a rectified-linear function with an encoding bias behaves as a
positive only shrink function, similarly the complementary function is equivalent to a positive only
L1 penalty on the activations.
3.3 SATAE-saturated-linear
Unlike the SATAE-shrink, which tries to compress the data by minimizing the number of active
elements; the SATAE saturated-linear (SATAE-SL) tries to compress the data by encouraging the
latent code to be as close to binary as possible. Without a saturation penalty this auto-encoder learns
to encode small groups of neighboring pixels. More precisely, the auto-encoder learns the identity
function on all datasets. An example of such a basis is shown in Figure 4(b). With this basis the
auto-encoder can perfectly reconstruct any input by producing small activations which stay within
the linear region of the nonlinearity. Introducing the saturation penalty does not have any effect
when training on binary MNIST. This is because the scaled identity basis is a global minimizer of
Equation 2 for the SATAE-SL on any binary dataset. Such a basis can perfectly reconstruct any
binary input while operating exclusively in the saturated regions of the activation function, thus
incurring no saturation penalty. On the other hand, introducing the saturation penalty when training
on natural image patches induces the SATAE-SL to learn a more varied basis (Figure 4(d)).
3.4 Experiments on CIFAR-10
SATAE auto-encoders with 100 and 300 basis elements were trained on the CIFAR-10 dataset,
which contains small color images of objects from ten categories. In all of our experiments the auto-
encoders were trained by progressively increasing the saturation penalty (details are provided in the
next section). This allowed us to visually track the effect of the saturation penalty on individual
basis elements. Figure 4(e)-(f) shows the basis learned by SATAE-shrink with small and large
saturation penalty, respectively. Increasing the saturation penalty has the expected effect of reducing
the number of nonzero activations. As the saturation penalty increases, active basis elements become
responsible for reconstructing a larger portion of the input. This induces the basis elements to
become less spatially localized. This effect can be seen by comparing corresponding filters in Figure
4(e) and (f). Figures 4(g)-(h) show the basis elements learned by SATAE-SL with small and large
saturation penalty, respectively. The basis learned by SATAE-SL with a small saturation penalty
resembles the identity basis, as expected (see previous subsection). Once the saturation penalty
is increased small activations become more heavily penalized. To increase their activations the
encoding basis elements may increase in magnitude or align themselves with the input. However, if
the encoding and decoding weights are tied (or fixed in magnitude) then reconstruction error would
increase if the weights were merely scaled up. Thus the basis elements are forced to align with the
data in a way that also facilitates reconstruction. This effect is illustrated in Figure 5 where filters
corresponding to progressively larger values of the regularization parameter are shown. The top
half of the figure shows how an element from the identity basis ( α= 0.1) transforms to a localized
edge (α= 0.5). The bottom half of the figure shows how a localized edge ( α= 0.5) progressively
transforms to a template of a horse (α= 1).
4 Experimental Details
Because the regularizer explicitly encourages activations in the zero gradient regime of the nonlin-
earity, many encoder basis elements would not be updated via back-propagation through the non-
linearity if the saturation penalty were large. In order to allow the basis elements to deviate from
their initial random states we found it necessary to progressively increase the saturation penalty. In
our experiments the weights obtained at a minimum of Equation 2 for a smaller value of α were
used to initialize the optimization for a larger value of α. Typically, the optimization began with
α = 0 and was progressively increased to α = 1 in steps of 0.1. The auto-encoder was trained for
30 epochs at each value of α. This approach also allowed us to track the evolution of basis elements
as a function of α(Figure 5). In all experiments data samples were normalized by subtracting the
mean and dividing by the standard deviation of the dataset. The auto-encoders used to obtain the
results shown in Figure 4 (a),(c)-(f) used 100 basis elements, others used 300 basis elements. In-
creasing the number of elements in the basis did not have a strong qualitative effect except to make
the features represented by the basis more localized. The decoder basis elements of the SATAEs with
5
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 4: Basis elements learned by the SATAE using different nonlinearities on: 28x28 binary
MNIST digits, 12x12 gray scale natural image patches, and CIFAR-10. (a) SATAE-shrink trained on
MNIST, (b) SATAE-saturated-linear trained on MNIST, (c) SATAE-shrink trained on natural image
patches, (d) SATAE-saturated-linear trained on natural image patches, (e)-(f) SATAE-shrink trained
on CIFAR-10 withα= 0.1 and α= 0.5, respectively, (g)-(h) SATAE-SL trained on CIFAR-10 with
α= 0.1 and α= 0.6, respectively. 6
Figure 5: Evolution of two filters with increasing saturation regularization for a SATAE-SL trained
on CIFAR-10. Filters corresponding to larger values of α were initialized using the filter corre-
sponding to the previous α. The regularization parameter was varied from 0.1 to 0.5 (left to right)
in the top five images and 0.5 to 1 in the bottom five
shrink and rectified-linear nonlinearities were reprojected to the unit sphere after every 10 stochastic
gradient updates. The SATAEs which used saturated-linear activation function were trained with
tied weights. All results presented were obtained using stochastic gradient descent with a constant
learning rate of 0.05.
5 Discussion
In this work we have introduced a general and conceptually simple latent state regularizer. It was
demonstrated that a variety of feature sets can be obtained using a single framework. The utility of
these features depend on the application. In this section we extend the definition of the saturation
regularizer to include functions without a zero-gradient region. The relationship of SATAEs with
other regularized auto-encoders will be discussed. We conclude with a discussion on future work.
5.1 Extension to Differentiable Functions
We would like to extend the saturation penalty definition (Equation 1) to differentiable functions
without a zero-gradient region. An appealing first guess for the complimentary function is some
positive function of the first derivative, fc(x) = |f′(x)|for instance. This may be an appropriate
choice for monotonic activation functions which have their lowest gradient regions at the extrema
(e.g. sigmoids). However some activation functions may contain regions of small or zero gradient
which have negligible extent, at the extrema for instance. We would like our definition of the com-
plimentary function to not only measure the local gradient in some region, but to also measure it’s
extent. For this purpose we employ the concept of average variation over a finite interval. We define
the average variation of f at xin the positive and negative directions at scale l, respectively as:
∆+
l f(x) = 1
l
∫ x+l
x
|f′(u)|du= |f′(x)|∗Π+
l (x)
∆−
l f(x) = 1
l
∫ x
x−l
|f′(u)|du= |f′(x)|∗Π−
l (x).
Where ∗denotes the continuous convolution operator. Π+
l (x) and Π−
l (x) are uniform averaging
kernels in the positive and negative directions, respectively. Next, define a directional measure of
variation of f by integrating the average variation at all scales.
7
Figure 6: Illustration of the complimentary function ( fc) as defined by Equation 3 for a non-
monotonic activation function (f). The absolute derivative of f is shown for comparison.
M+f(x) =
∫ +∞
0
∆+
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π+
l (x)dl
]
∗|f′(x)|
M−f(x) =
∫ +∞
0
∆−
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π−
l (x)dl
]
∗|f′(x)|.
Where w(l) is chosen to be a sufficiently fast decreasing function of l to insure convergence of
the integral. The integral with which |f′(x)|is convolved in the above equation evaluates to some
decreasing function of xfor Π+ with support x≥0. Similarly, the integral involving Π−evaluates
to some increasing function of x with support x ≤0. This function will depend on w(l). The
functions M+f(x) and M−f(x) measure the average variation off(x) at all scales lin the positive
and negative direction, respectively. We define the complimentary functionfc(x) as:
fc(x) = min(M+f(x),M−f(x)). (3)
An example of a complimentary function defined using the above formulation is shown in Figure 6.
Whereas |f′(x)|is minimized at the extrema off, the complimentary function only plateaus at these
locations.
5.2 Relationship with the Contractive Auto-Encoder
Let hi be the output of theith hidden unit of a single-layer auto-encoder with point-wise nonlinearity
f(·). The regularizer imposed by the contractive auto-encoder (CAE) can be expressed as follows:
∑
ij
(∂hi
∂xj
)2
=
dh∑
i
f′(
d∑
j=1
We
ijxj + bi)2∥We
i ∥2
,
where x is a d-dimensional data vector, f′(·) is the derivative of f(·), bi is the bias of the ith
encoding unit, andWe
i denotes the ith row of the encoding weight matrix. The first term in the above
equation tries to adjust the weights so as to push the activations into the low gradient (saturation)
regime of the nonlinearity, but is only defined for differentiable activation functions. Therefore the
CAE indirectly encourages operation in the saturation regime. Computing the Jacobian, however,
can be cumbersome for deep networks. Furthermore, the complexity of computing the Jacobian is
O(d×dh), although a more efficient implementation is possible [3], compared to the O(dh) for the
saturation penalty.
8
5.3 Relationship with the Sparse Auto-Encoder
In Section 3.2 it was shown that SATAEs with shrink or rectified-linear activation functions are
equivalent to a sparse auto-encoder. Interestingly, the fact that the saturation penalty happens to
correspond to L1 regularization in the case of SATAE-shrink agrees with the findings in [7]. In their
efforts to find an architecture to approximate inference in sparse coding, Gregor et al. found that
the shrink function is particularly compatible with L1 minimization. Equivalence to sparsity only
for some activation functions suggests that SATAEs are a generalization of sparse auto-encoders.
Like the sparsity penalty, the saturation penalty can be applied at any point in a deep network for the
same computational cost. However, unlike the sparsity penalty the saturation penalty is adapted to
the nonlinearity of the particular layer to which it is applied.
5.4 Future Work
We intend to experimentally demonstrate that the representations learned by SATAEs are useful as
features for learning common tasks such as classification and denoising. We will also address several
open questions, namely: (i) how to select (or learn) the width parameter (λ) of the nonlinearity, and
(ii) how to methodically constrain the weights. We will also explore SATAEs that use a wider class
of non-linearities and architectures.
References
[1] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra and Yann LeCun. Efficient Learn-
ing of Sparse Representations with an Energy- Based Model, in J. Platt et al. (Eds),Advances in
Neural Information Processing Systems (NIPS 2006), 19, MIT Press, 2006.
[2] Marc’Aurelio Ranzato, Fu-Jie Huang, Y-Lan Boureau and Yann LeCun: Unsupervised Learn-
ing of Invariant Feature Hierarchies with Applications to Object Recognition, Proc. Computer
Vision and Pattern Recognition Conference (CVPR’07), IEEE Press, 2007
[3] Rifai, S. and Vincent, P. and Muller, X. and Glorot, X. and Bengio, Y . Contractive auto-encoders:
Explicit invariance during feature extraction, Proceedings of the Twenty-eight International
Conference on Machine Learning, ICML 2011
[4] P. Vincent, H. Larochelle, Y . Bengio, P.A. Manzagol. Extracting and Composing Robust Fea-
tures with Denoising Autoencoders Proceedings of the 25th International Conference on Ma-
chine Learning (ICML’2008), 2008.
[5] R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley & Sons,
2001, pp. xx + 654, ISBN: 0-471-05669-3
[6] Olhausen, Bruno A.; Field, David J. (1997). Sparse Coding with an Overcomplete Basis Set: A
Strategy Employed by V1?. Vision Research 37 (23): 3311-3325.
[7] Karol Gregor and Yann LeCun: Learning Fast Approximations of Sparse Coding, Proc. Inter-
national Conference on Machine learning (ICML’10), 2010
[8] Guillaume Alain and Yoshua Bengio, What Regularized Auto-Encoders Learn from the Data
Generating Distribution. arXiv:1211.4246v3 [cs.LG]
9
|
Ross Goroshin, Yann LeCun
|
Unknown
| 2,013
|
{"id": "yGgjGkkbeFSbt", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358468100000, "tmdate": 1358468100000, "ddate": null, "number": 39, "content": {"title": "Saturating Auto-Encoder", "decision": "conferencePoster-iclr2013-conference", "abstract": "We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.", "pdf": "https://arxiv.org/abs/1301.3577", "paperhash": "goroshin|saturating_autoencoder", "keywords": [], "conflicts": [], "authors": ["Ross Goroshin", "Yann LeCun"], "authorids": ["rgoroshin@gmail.com", "ylecun@gmail.com"]}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rgoroshin@gmail.com"], "writers": []}
|
[Review]:
Although this paper proposes an original (yet trivial) approach to regularize auto-encoders, it does not bring sufficient insights as to why saturating the hidden units should yield a better representation. The authors do not elaborate on whether the SATAE is a more general principle than previously proposed regularized auto-encoders(implying saturation as a collateral effect) or just another auto-encoder in an already well crowded space of models (ie:Auto-encoders and their variants). In the last years, many different types of auto-encoders have been proposed and most of them had no or little theory to justify the need for their existence, and despite all the efforts engaged by some to create a viable theoretical framework (geometric or probabilistic) it seems that the effectiveness of auto-encoders in building representations has more to do with a lucky parametrisation or yet another regularization trick.
I feel the authors should motivate their approach with some intuitions about why should I saturate my auto-encoders, when I can denoise my input, sparsify my latent variables or do space contraction? It's worrisome that most of the research done for auto-encoders has mostly focused in coming up with the right regularization/parametrisation that would yield the best 'filters'. Following this path will ultimately make the majority of people reluctant to use auto-encoders because of their wide variety and little knowledge about when to use what. The auto-encoder community should backtrack and clear the intuitive/theoretical noise left behind, rather than racing for the next new model.
|
anonymous reviewer 5bc2
| null | null |
{"id": "zOUdY11jd_zJr", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362593760000, "tmdate": 1362593760000, "ddate": null, "number": 5, "content": {"title": "review of Saturating Auto-Encoder", "review": "Although this paper proposes an original (yet trivial) approach to regularize auto-encoders, it does not bring sufficient insights as to why saturating the hidden units should yield a better representation. The authors do not elaborate on whether the SATAE is a more general principle than previously proposed regularized auto-encoders(implying saturation as a collateral effect) or just another auto-encoder in an already well crowded space of models (ie:Auto-encoders and their variants). In the last years, many different types of auto-encoders have been proposed and most of them had no or little theory to justify the need for their existence, and despite all the efforts engaged by some to create a viable theoretical framework (geometric or probabilistic) it seems that the effectiveness of auto-encoders in building representations has more to do with a lucky parametrisation or yet another regularization trick.\r\n\r\nI feel the authors should motivate their approach with some intuitions about why should I saturate my auto-encoders, when I can denoise my input, sparsify my latent variables or do space contraction? It's worrisome that most of the research done for auto-encoders has mostly focused in coming up with the right regularization/parametrisation that would yield the best 'filters'. Following this path will ultimately make the majority of people reluctant to use auto-encoders because of their wide variety and little knowledge about when to use what. The auto-encoder community should backtrack and clear the intuitive/theoretical noise left behind, rather than racing for the next new model."}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yGgjGkkbeFSbt", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 5bc2"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 3,
"materials_and_methods": 7,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 2,
"total": 7
}
| 2.142857
| 1.57469
| 0.568167
| 2.16742
| 0.320103
| 0.024563
| 0.428571
| 0
| 0.428571
| 1
| 0
| 0
| 0
| 0.285714
|
{
"criticism": 0.42857142857142855,
"example": 0,
"importance_and_relevance": 0.42857142857142855,
"materials_and_methods": 1,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.2857142857142857
}
| 2.142857
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yGgjGkkbeFSbt
|
Saturating Auto-Encoder
|
We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.
|
Saturating Auto-Encoders
Rostislav Goroshin∗
Courant Institute of Mathematical Science
New York University
goroshin@cs.nyu.edu
Yann LeCun
Courant Institute of Mathematical Science
New York University
yann@cs.nyu.edu
Abstract
We introduce a simple new regularizer for auto-encoders whose hidden-unit ac-
tivation functions contain at least one zero-gradient (saturated) region. This reg-
ularizer explicitly encourages activations in the saturated region(s) of the corre-
sponding activation function. We call these Saturating Auto-Encoders (SATAE).
We show that the saturation regularizer explicitly limits the SATAE’s ability to
reconstruct inputs which are not near the data manifold. Furthermore, we show
that a wide variety of features can be learned when different activation functions
are used. Finally, connections are established with the Contractive and Sparse
Auto-Encoders.
1 Introduction
An auto-encoder is a conceptually simple neural network used for obtaining useful data rep-
resentations through unsupervised training. It is composed of an encoder which outputs a
hidden (or latent) representation and a decoder which attempts to reconstruct the input using
the hidden representation as its input. Training consists of minimizing a reconstruction cost
such as L2 error. However this cost is merely a proxy for the true objective: to obtain a useful
latent representation. Auto-encoders can implement many dimensionality reduction techniques
such as PCA and Sparse Coding (SC) [5] [6] [7]. This makes the study of auto-encoders very
appealing from a theoretical standpoint. In recent years, renewed interest in auto-encoders net-
works has mainly been due to their empirical success in unsupervised feature learning [1] [2] [3] [4].
When minimizing only reconstruction cost, the standard auto-encoder does not typically learn any
meaningful hidden representation of the data. Well known theoretical and experimental results
show that a linear auto-encoder with trainable encoding and decoding matrices, We and Wd re-
spectively, learns the identity function if We and Wd are full rank or over-complete. The linear
auto-encoder learns the principle variance directions (PCA) if We and Wd are rank deficient [5].
It has been observed that other representations can be obtained by regularizing the latent repre-
sentation. This approach is exemplified by the Contractive and Sparse Auto-Encoders [3] [1] [2].
Intuitively, an auto-encoder with limited capacity will focus its resources on reconstructing portions
of the input space in which data samples occur most frequently. From an energy based perspective,
auto-encoders achieve low reconstruction cost in portions of the input space with high data density
(recently, [8] has examined this perspective in depth). If the data occupies some low dimensional
manifold in the higher dimensional input space then minimizing reconstruction error achieves low
energy on this manifold. Useful latent state regularizers raise the energy of points that do not lie
on the manifold, thus playing an analogous role to minimizing the partition function in maximum
likelihood models. In this work we introduce a new type of regularizer that does this explicitly for
∗The authors thank Joan Bruna and David Eigen for their useful suggestions and comments.
1
arXiv:1301.3577v3 [cs.LG] 20 Mar 2013
auto-encoders with a non-linearity that contains at least one flat (zero gradient) region. We show ex-
amples where this regularizer and the choice of nonlinearity determine the feature set that is learned
by the auto-encoder.
2 Latent State Regularization
Several auto-encoder variants which regularize their latent states have been proposed, they include
the sparse auto-encoder and the contractive auto-encoder [1] [2] [3]. The sparse auto-encoder in-
cludes an over-complete basis in the encoder and imposes a sparsity inducing (usually L1) penalty
on the hidden activations. This penalty prevents the auto-encoder from learning to reconstruct all
possible points in the input space and focuses the expressive power of the auto-encoder on repre-
senting the data-manifold. Similarly, the contractive auto-encoder avoids trivial solutions by intro-
ducing an auxiliary penalty which measures the square Frobenius norm of the Jacobian of the latent
representation with respect to the inputs. This encourages a constant latent representation except
around training samples where it is counteracted by the reconstruction term. It has been noted in [3]
that these two approaches are strongly related. The contractive auto-encoder explicitly encourages
small entries in the Jacobian, whereas the sparse auto-encoder is encouraged to produce mostly zero
(sparse) activations which can be designed to correspond to mostly flat regions of the nonlinearity,
thus also yielding small entries in the Jacobian.
2.1 Saturating Auto-Encoder through Complementary Nonlinearities
Our goal is to introduce a simple new regularizer which explicitly raises reconstruction error for
inputs not near the data manifold. Consider activation functions with at least one flat region; these
include shrink, rectified linear, and saturated linear (Figure 1). Auto-encoders with such nonlineari-
ties lose their ability to accurately reconstruct inputs which produce activations in the zero-gradient
regions of their activation functions. Let us denote the auto-encoding function xr = G(x,W), x
being the input, W the trainable parameters in the auto-encoder, and xr the reconstruction. One can
define an energy surface through the reconstruction error:
EW (x) = ||x−G(x,W)||2
Let’s imagine that G has been trained to produce a low reconstruction error at a particular data
point x∗. If Gis constant when xvaries along a particular direction v, then the energy will grow
quadratically along that particular direction as xmoves away from x∗. If Gis trained to produce
low reconstruction errors on a set of samples while being subject to a regularizer that tries to make
it constant in as many directions as possible, then the reconstruction energy will act as a contrast
function that will take low values around areas of high data density and larger values everywhere
else (similarly to a negative log likelihood function for a density estimator).
The proposed auto-encoder is a simple implementation of this idea. Using the notation W =
{We,Be,Wd,Bd}, the auto-encoder function is defined as
G(x,W) = WdF(Wex+ Be) + Bd
where We, Be, Wd, and Bd are the encoding matrix, encoding bias, decoding matrix, and decoding
bias, respectively, and F is the vector function that applies the scalar function f to each of its
components. f will be designed to have ”flat spots”, i.e. regions where the derivative is zero (also
referred to as the saturation region).
The loss function minimized by training is the sum of the reconstruction energy EW (x) = ||x−
G(x,W)||2 and a term that pushes the components ofWex+ Be towards the flat spots of f. This is
performed through the use of a complementary functionfc, associated with the non-linearity f(z).
The basic idea is to design fc(z) so that its value corresponds to the distance of z to one of the
flat spots of f(z). Minimizing fc(z) will push z towards the flat spots of f(z). With this in mind,
we introduce a penalty of the form fc(∑d
j=1 We
ijxj + be
i ) which encourages the argument to be
in the saturation regime of the activation function ( f). We refer to auto-encoders which include
this regularizer as Saturating Auto-Encoders (SATAEs). For activation functions with zero-gradient
regime(s) the complementary nonlinearity (fc) can be defined as the distance to the nearest saturation
region. Specifically, let S = {z|f′(z) = 0}then we define fc(z) as:
2
Figure 1: Three nonlinearities (top) with their associated complementary regularization func-
tions(bottom).
fc(z) = inf
z′∈S
|z−z′|. (1)
Figure 1 shows three activation functions and their associated complementary nonlinearities. The
complete loss to be minimized by a SATAE with nonlinearityf is:
L=
∑
x∈D
1
2∥x−
(
WdF(Wex+ Be) + Bd)
∥2 + α
dh∑
i=1
fc(We
i x+ be
i ), (2)
where dh denotes the number of hidden units. The hyper-parameterαregulates the trade-off between
reconstruction and saturation.
3 Effect of the Saturation Regularizer
We will examine the effect of the saturation regularizer on auto-encoders with a variety of activation
functions. It will be shown that the choice of activation function is a significant factor in determining
the type of basis the SATAE learns. First, we will present results on toy data in two dimensions
followed by results on higher dimensional image data.
3.1 Visualizing the Energy Landscape
Given a trained auto-encoder the reconstruction error can be evaluated for a given input x. For
low-dimensional spaces (Rn, where n ≤3) we can evaluate the reconstruction error on a regular
grid in order to visualize the portions of the space which are well represented by the auto-encoder.
More specifically we can compute E(x) = 1
2 ∥x−xr∥2 for all xwithin some bounded region of
the input space. Ideally, the reconstruction energy will be low for all xwhich are in the training set
and high elsewhere. Figures 2 and 3 depict the resulting reconstruction energy for inputs x ∈R2,
and −1 ≤xi ≤1. Black corresponds to low reconstruction energy. The training data consists of
a one dimensional manifold shown overlain in yellow. Figure 2 shows a toy example for a SATAE
which uses ten basis vectors and a shrink activation function. Note that adding the saturation regu-
larizer decreases the volume of the space which is well reconstructed, however good reconstruction
is maintained on or near the training data manifold. The auto-encoder in Figure 3 contains two
3
Figure 2: Energy surfaces for unregularized (left), and regularized (right) solutions obtained on
SATAE-shrink and 10 basis vectors. Black corresponds to low reconstruction energy. Training
points lie on a one-dimensional manifold shown in yellow.
Figure 3: SATAE-SL toy example with two basis elements. Top Row: three randomly initialized so-
lutions obtained with no regularization. Bottom Row: three randomly initialized solutions obtained
with regularization.
encoding basis vectors (red), two decoding basis vectors (green), and uses a saturated-linear activa-
tion function. The encoding and decoding bases are unconstrained. The unregularized auto-encoder
learns an orthogonal basis with a random orientation. The region of the space which is well recon-
structed corresponds to the outer product of the linear regions of two activation functions; beyond
that the error increases quadratically with the distance. Including the saturation regularizer induces
the auto-encoder basis to align with the data and to operate in the saturation regime at the extreme
points of the training data, which limits the space which is well reconstructed. Note that because the
encoding and decoding weights are separate and unrestricted, the encoding weights were scaled up
to effectively reduce the width of the linear regime of the nonlinearity.
3.2 SATAE-shrink
Consider a SATAE with a shrink activation function and shrink parameter λ. The corresponding
complementary nonlinearity, derived using Equation 1 is given by:
shrinkc(x) =
{abs(x), |x|>λ
0, elsewhere .
Note that shrinkc(Wex+ be) = abs(shrink(Wex+ be)), which corresponds to an L1 penalty
on the activations. Thus this SATAE is equivalent to a sparse auto-encoder with a shrink activation
function. Given the equivalence to the sparse auto-encoder we anticipate the same scale ambiguity
which occurs with L1 regularization. This ambiguity can be avoided by normalizing the decoder
weights to unit norm. It is expected that the SATAE-shrink will learn similar features to those
obtained with a sparse auto-encoder, and indeed this is what we observe. Figure 4(c) shows the
decoder filters learned by an auto-encoder with shrink nonlinearity trained on gray-scale natural
image patches. One can recognize the expected Gabor-like features when the saturation penalty is
activated. When trained on the binary MNIST dataset the learned basis is comprised of portions of
digits and strokes. Nearly identical results are obtained with a SATAE which uses a rectified-linear
4
activation function. This is because a rectified-linear function with an encoding bias behaves as a
positive only shrink function, similarly the complementary function is equivalent to a positive only
L1 penalty on the activations.
3.3 SATAE-saturated-linear
Unlike the SATAE-shrink, which tries to compress the data by minimizing the number of active
elements; the SATAE saturated-linear (SATAE-SL) tries to compress the data by encouraging the
latent code to be as close to binary as possible. Without a saturation penalty this auto-encoder learns
to encode small groups of neighboring pixels. More precisely, the auto-encoder learns the identity
function on all datasets. An example of such a basis is shown in Figure 4(b). With this basis the
auto-encoder can perfectly reconstruct any input by producing small activations which stay within
the linear region of the nonlinearity. Introducing the saturation penalty does not have any effect
when training on binary MNIST. This is because the scaled identity basis is a global minimizer of
Equation 2 for the SATAE-SL on any binary dataset. Such a basis can perfectly reconstruct any
binary input while operating exclusively in the saturated regions of the activation function, thus
incurring no saturation penalty. On the other hand, introducing the saturation penalty when training
on natural image patches induces the SATAE-SL to learn a more varied basis (Figure 4(d)).
3.4 Experiments on CIFAR-10
SATAE auto-encoders with 100 and 300 basis elements were trained on the CIFAR-10 dataset,
which contains small color images of objects from ten categories. In all of our experiments the auto-
encoders were trained by progressively increasing the saturation penalty (details are provided in the
next section). This allowed us to visually track the effect of the saturation penalty on individual
basis elements. Figure 4(e)-(f) shows the basis learned by SATAE-shrink with small and large
saturation penalty, respectively. Increasing the saturation penalty has the expected effect of reducing
the number of nonzero activations. As the saturation penalty increases, active basis elements become
responsible for reconstructing a larger portion of the input. This induces the basis elements to
become less spatially localized. This effect can be seen by comparing corresponding filters in Figure
4(e) and (f). Figures 4(g)-(h) show the basis elements learned by SATAE-SL with small and large
saturation penalty, respectively. The basis learned by SATAE-SL with a small saturation penalty
resembles the identity basis, as expected (see previous subsection). Once the saturation penalty
is increased small activations become more heavily penalized. To increase their activations the
encoding basis elements may increase in magnitude or align themselves with the input. However, if
the encoding and decoding weights are tied (or fixed in magnitude) then reconstruction error would
increase if the weights were merely scaled up. Thus the basis elements are forced to align with the
data in a way that also facilitates reconstruction. This effect is illustrated in Figure 5 where filters
corresponding to progressively larger values of the regularization parameter are shown. The top
half of the figure shows how an element from the identity basis ( α= 0.1) transforms to a localized
edge (α= 0.5). The bottom half of the figure shows how a localized edge ( α= 0.5) progressively
transforms to a template of a horse (α= 1).
4 Experimental Details
Because the regularizer explicitly encourages activations in the zero gradient regime of the nonlin-
earity, many encoder basis elements would not be updated via back-propagation through the non-
linearity if the saturation penalty were large. In order to allow the basis elements to deviate from
their initial random states we found it necessary to progressively increase the saturation penalty. In
our experiments the weights obtained at a minimum of Equation 2 for a smaller value of α were
used to initialize the optimization for a larger value of α. Typically, the optimization began with
α = 0 and was progressively increased to α = 1 in steps of 0.1. The auto-encoder was trained for
30 epochs at each value of α. This approach also allowed us to track the evolution of basis elements
as a function of α(Figure 5). In all experiments data samples were normalized by subtracting the
mean and dividing by the standard deviation of the dataset. The auto-encoders used to obtain the
results shown in Figure 4 (a),(c)-(f) used 100 basis elements, others used 300 basis elements. In-
creasing the number of elements in the basis did not have a strong qualitative effect except to make
the features represented by the basis more localized. The decoder basis elements of the SATAEs with
5
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 4: Basis elements learned by the SATAE using different nonlinearities on: 28x28 binary
MNIST digits, 12x12 gray scale natural image patches, and CIFAR-10. (a) SATAE-shrink trained on
MNIST, (b) SATAE-saturated-linear trained on MNIST, (c) SATAE-shrink trained on natural image
patches, (d) SATAE-saturated-linear trained on natural image patches, (e)-(f) SATAE-shrink trained
on CIFAR-10 withα= 0.1 and α= 0.5, respectively, (g)-(h) SATAE-SL trained on CIFAR-10 with
α= 0.1 and α= 0.6, respectively. 6
Figure 5: Evolution of two filters with increasing saturation regularization for a SATAE-SL trained
on CIFAR-10. Filters corresponding to larger values of α were initialized using the filter corre-
sponding to the previous α. The regularization parameter was varied from 0.1 to 0.5 (left to right)
in the top five images and 0.5 to 1 in the bottom five
shrink and rectified-linear nonlinearities were reprojected to the unit sphere after every 10 stochastic
gradient updates. The SATAEs which used saturated-linear activation function were trained with
tied weights. All results presented were obtained using stochastic gradient descent with a constant
learning rate of 0.05.
5 Discussion
In this work we have introduced a general and conceptually simple latent state regularizer. It was
demonstrated that a variety of feature sets can be obtained using a single framework. The utility of
these features depend on the application. In this section we extend the definition of the saturation
regularizer to include functions without a zero-gradient region. The relationship of SATAEs with
other regularized auto-encoders will be discussed. We conclude with a discussion on future work.
5.1 Extension to Differentiable Functions
We would like to extend the saturation penalty definition (Equation 1) to differentiable functions
without a zero-gradient region. An appealing first guess for the complimentary function is some
positive function of the first derivative, fc(x) = |f′(x)|for instance. This may be an appropriate
choice for monotonic activation functions which have their lowest gradient regions at the extrema
(e.g. sigmoids). However some activation functions may contain regions of small or zero gradient
which have negligible extent, at the extrema for instance. We would like our definition of the com-
plimentary function to not only measure the local gradient in some region, but to also measure it’s
extent. For this purpose we employ the concept of average variation over a finite interval. We define
the average variation of f at xin the positive and negative directions at scale l, respectively as:
∆+
l f(x) = 1
l
∫ x+l
x
|f′(u)|du= |f′(x)|∗Π+
l (x)
∆−
l f(x) = 1
l
∫ x
x−l
|f′(u)|du= |f′(x)|∗Π−
l (x).
Where ∗denotes the continuous convolution operator. Π+
l (x) and Π−
l (x) are uniform averaging
kernels in the positive and negative directions, respectively. Next, define a directional measure of
variation of f by integrating the average variation at all scales.
7
Figure 6: Illustration of the complimentary function ( fc) as defined by Equation 3 for a non-
monotonic activation function (f). The absolute derivative of f is shown for comparison.
M+f(x) =
∫ +∞
0
∆+
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π+
l (x)dl
]
∗|f′(x)|
M−f(x) =
∫ +∞
0
∆−
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π−
l (x)dl
]
∗|f′(x)|.
Where w(l) is chosen to be a sufficiently fast decreasing function of l to insure convergence of
the integral. The integral with which |f′(x)|is convolved in the above equation evaluates to some
decreasing function of xfor Π+ with support x≥0. Similarly, the integral involving Π−evaluates
to some increasing function of x with support x ≤0. This function will depend on w(l). The
functions M+f(x) and M−f(x) measure the average variation off(x) at all scales lin the positive
and negative direction, respectively. We define the complimentary functionfc(x) as:
fc(x) = min(M+f(x),M−f(x)). (3)
An example of a complimentary function defined using the above formulation is shown in Figure 6.
Whereas |f′(x)|is minimized at the extrema off, the complimentary function only plateaus at these
locations.
5.2 Relationship with the Contractive Auto-Encoder
Let hi be the output of theith hidden unit of a single-layer auto-encoder with point-wise nonlinearity
f(·). The regularizer imposed by the contractive auto-encoder (CAE) can be expressed as follows:
∑
ij
(∂hi
∂xj
)2
=
dh∑
i
f′(
d∑
j=1
We
ijxj + bi)2∥We
i ∥2
,
where x is a d-dimensional data vector, f′(·) is the derivative of f(·), bi is the bias of the ith
encoding unit, andWe
i denotes the ith row of the encoding weight matrix. The first term in the above
equation tries to adjust the weights so as to push the activations into the low gradient (saturation)
regime of the nonlinearity, but is only defined for differentiable activation functions. Therefore the
CAE indirectly encourages operation in the saturation regime. Computing the Jacobian, however,
can be cumbersome for deep networks. Furthermore, the complexity of computing the Jacobian is
O(d×dh), although a more efficient implementation is possible [3], compared to the O(dh) for the
saturation penalty.
8
5.3 Relationship with the Sparse Auto-Encoder
In Section 3.2 it was shown that SATAEs with shrink or rectified-linear activation functions are
equivalent to a sparse auto-encoder. Interestingly, the fact that the saturation penalty happens to
correspond to L1 regularization in the case of SATAE-shrink agrees with the findings in [7]. In their
efforts to find an architecture to approximate inference in sparse coding, Gregor et al. found that
the shrink function is particularly compatible with L1 minimization. Equivalence to sparsity only
for some activation functions suggests that SATAEs are a generalization of sparse auto-encoders.
Like the sparsity penalty, the saturation penalty can be applied at any point in a deep network for the
same computational cost. However, unlike the sparsity penalty the saturation penalty is adapted to
the nonlinearity of the particular layer to which it is applied.
5.4 Future Work
We intend to experimentally demonstrate that the representations learned by SATAEs are useful as
features for learning common tasks such as classification and denoising. We will also address several
open questions, namely: (i) how to select (or learn) the width parameter (λ) of the nonlinearity, and
(ii) how to methodically constrain the weights. We will also explore SATAEs that use a wider class
of non-linearities and architectures.
References
[1] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra and Yann LeCun. Efficient Learn-
ing of Sparse Representations with an Energy- Based Model, in J. Platt et al. (Eds),Advances in
Neural Information Processing Systems (NIPS 2006), 19, MIT Press, 2006.
[2] Marc’Aurelio Ranzato, Fu-Jie Huang, Y-Lan Boureau and Yann LeCun: Unsupervised Learn-
ing of Invariant Feature Hierarchies with Applications to Object Recognition, Proc. Computer
Vision and Pattern Recognition Conference (CVPR’07), IEEE Press, 2007
[3] Rifai, S. and Vincent, P. and Muller, X. and Glorot, X. and Bengio, Y . Contractive auto-encoders:
Explicit invariance during feature extraction, Proceedings of the Twenty-eight International
Conference on Machine Learning, ICML 2011
[4] P. Vincent, H. Larochelle, Y . Bengio, P.A. Manzagol. Extracting and Composing Robust Fea-
tures with Denoising Autoencoders Proceedings of the 25th International Conference on Ma-
chine Learning (ICML’2008), 2008.
[5] R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley & Sons,
2001, pp. xx + 654, ISBN: 0-471-05669-3
[6] Olhausen, Bruno A.; Field, David J. (1997). Sparse Coding with an Overcomplete Basis Set: A
Strategy Employed by V1?. Vision Research 37 (23): 3311-3325.
[7] Karol Gregor and Yann LeCun: Learning Fast Approximations of Sparse Coding, Proc. Inter-
national Conference on Machine learning (ICML’10), 2010
[8] Guillaume Alain and Yoshua Bengio, What Regularized Auto-Encoders Learn from the Data
Generating Distribution. arXiv:1211.4246v3 [cs.LG]
9
|
Ross Goroshin, Yann LeCun
|
Unknown
| 2,013
|
{"id": "yGgjGkkbeFSbt", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358468100000, "tmdate": 1358468100000, "ddate": null, "number": 39, "content": {"title": "Saturating Auto-Encoder", "decision": "conferencePoster-iclr2013-conference", "abstract": "We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.", "pdf": "https://arxiv.org/abs/1301.3577", "paperhash": "goroshin|saturating_autoencoder", "keywords": [], "conflicts": [], "authors": ["Ross Goroshin", "Yann LeCun"], "authorids": ["rgoroshin@gmail.com", "ylecun@gmail.com"]}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rgoroshin@gmail.com"], "writers": []}
|
[Review]:
This is a cool investigation in a direction that I find fascinating, and I only have two remarks about minor points made in the paper.
* Regarding the energy-based interpretation (that reconstruction error can be thought of as an energy function associated with an estimated probability function), there was a recent result which surprised me and challenges that view. In http://arxiv.org/abs/1211.4246 (What Regularized Auto-Encoders Learn from the Data Generating Distribution), Guillaume Alain and I found that denoising and contractive auto-encoders (where we penalize the Jacobian of the encoder-decoder function r(x)=decode(encode(x))) estimate the *score* of the data generating function in the vector r(x)-x (I should also mention Vincent 2011 Neural Comp. with a similar earlier result for a particular form of denoising auto-encoder where there is a well-defined energy function). So according to these results, the reconstruction error ||r(x)-x||^2 would be the magnitude of the score (derivative of energy wrt input). This is quite different from the energy itself, and it would suggest that the reconstruction error would be near zero both at a *minimum* of the energy (near training examples) AND at a *maximum* of the energy (e.g. near peaks that separate valleys of the energy). We have actually observed that empirically in toy problems where one can visualize the score in 2D.
* Regarding the comparison in section 5.1 with the contractive auto-encoder, I believe that there is a correct but somewhat misleading statement. It says that the contractive penalty costs O(d * d_h) to compute whereas the saturating penalty only costs O(d_h) to compute. This is true, but since computing h in the first place also costs O(d * d_h) the overhead of the contractive penalty is small (it basically doubles the computational cost, which is much less problematic than multiplying it by d as the remark could lead a naive reader to believe).
|
Yoshua Bengio
| null | null |
{"id": "x9pbTj7Nbg9Qs", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361902200000, "tmdate": 1361902200000, "ddate": null, "number": 7, "content": {"title": "", "review": "This is a cool investigation in a direction that I find fascinating, and I only have two remarks about minor points made in the paper.\r\n\r\n* Regarding the energy-based interpretation (that reconstruction error can be thought of as an energy function associated with an estimated probability function), there was a recent result which surprised me and challenges that view. In http://arxiv.org/abs/1211.4246 (What Regularized Auto-Encoders Learn from the Data Generating Distribution), Guillaume Alain and I found that denoising and contractive auto-encoders (where we penalize the Jacobian of the encoder-decoder function r(x)=decode(encode(x))) estimate the *score* of the data generating function in the vector r(x)-x (I should also mention Vincent 2011 Neural Comp. with a similar earlier result for a particular form of denoising auto-encoder where there is a well-defined energy function). So according to these results, the reconstruction error ||r(x)-x||^2 would be the magnitude of the score (derivative of energy wrt input). This is quite different from the energy itself, and it would suggest that the reconstruction error would be near zero both at a *minimum* of the energy (near training examples) AND at a *maximum* of the energy (e.g. near peaks that separate valleys of the energy). We have actually observed that empirically in toy problems where one can visualize the score in 2D.\r\n\r\n* Regarding the comparison in section 5.1 with the contractive auto-encoder, I believe that there is a correct but somewhat misleading statement. It says that the contractive penalty costs O(d * d_h) to compute whereas the saturating penalty only costs O(d_h) to compute. This is true, but since computing h in the first place also costs O(d * d_h) the overhead of the contractive penalty is small (it basically doubles the computational cost, which is much less problematic than multiplying it by d as the remark could lead a naive reader to believe)."}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yGgjGkkbeFSbt", "readers": ["everyone"], "nonreaders": [], "signatures": ["Yoshua Bengio"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 4,
"praise": 1,
"presentation_and_reporting": 2,
"results_and_discussion": 6,
"suggestion_and_solution": 1,
"total": 11
}
| 1.818182
| 1.755052
| 0.06313
| 1.857044
| 0.386931
| 0.038862
| 0.363636
| 0
| 0.181818
| 0.363636
| 0.090909
| 0.181818
| 0.545455
| 0.090909
|
{
"criticism": 0.36363636363636365,
"example": 0,
"importance_and_relevance": 0.18181818181818182,
"materials_and_methods": 0.36363636363636365,
"praise": 0.09090909090909091,
"presentation_and_reporting": 0.18181818181818182,
"results_and_discussion": 0.5454545454545454,
"suggestion_and_solution": 0.09090909090909091
}
| 1.818182
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yGgjGkkbeFSbt
|
Saturating Auto-Encoder
|
We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.
|
Saturating Auto-Encoders
Rostislav Goroshin∗
Courant Institute of Mathematical Science
New York University
goroshin@cs.nyu.edu
Yann LeCun
Courant Institute of Mathematical Science
New York University
yann@cs.nyu.edu
Abstract
We introduce a simple new regularizer for auto-encoders whose hidden-unit ac-
tivation functions contain at least one zero-gradient (saturated) region. This reg-
ularizer explicitly encourages activations in the saturated region(s) of the corre-
sponding activation function. We call these Saturating Auto-Encoders (SATAE).
We show that the saturation regularizer explicitly limits the SATAE’s ability to
reconstruct inputs which are not near the data manifold. Furthermore, we show
that a wide variety of features can be learned when different activation functions
are used. Finally, connections are established with the Contractive and Sparse
Auto-Encoders.
1 Introduction
An auto-encoder is a conceptually simple neural network used for obtaining useful data rep-
resentations through unsupervised training. It is composed of an encoder which outputs a
hidden (or latent) representation and a decoder which attempts to reconstruct the input using
the hidden representation as its input. Training consists of minimizing a reconstruction cost
such as L2 error. However this cost is merely a proxy for the true objective: to obtain a useful
latent representation. Auto-encoders can implement many dimensionality reduction techniques
such as PCA and Sparse Coding (SC) [5] [6] [7]. This makes the study of auto-encoders very
appealing from a theoretical standpoint. In recent years, renewed interest in auto-encoders net-
works has mainly been due to their empirical success in unsupervised feature learning [1] [2] [3] [4].
When minimizing only reconstruction cost, the standard auto-encoder does not typically learn any
meaningful hidden representation of the data. Well known theoretical and experimental results
show that a linear auto-encoder with trainable encoding and decoding matrices, We and Wd re-
spectively, learns the identity function if We and Wd are full rank or over-complete. The linear
auto-encoder learns the principle variance directions (PCA) if We and Wd are rank deficient [5].
It has been observed that other representations can be obtained by regularizing the latent repre-
sentation. This approach is exemplified by the Contractive and Sparse Auto-Encoders [3] [1] [2].
Intuitively, an auto-encoder with limited capacity will focus its resources on reconstructing portions
of the input space in which data samples occur most frequently. From an energy based perspective,
auto-encoders achieve low reconstruction cost in portions of the input space with high data density
(recently, [8] has examined this perspective in depth). If the data occupies some low dimensional
manifold in the higher dimensional input space then minimizing reconstruction error achieves low
energy on this manifold. Useful latent state regularizers raise the energy of points that do not lie
on the manifold, thus playing an analogous role to minimizing the partition function in maximum
likelihood models. In this work we introduce a new type of regularizer that does this explicitly for
∗The authors thank Joan Bruna and David Eigen for their useful suggestions and comments.
1
arXiv:1301.3577v3 [cs.LG] 20 Mar 2013
auto-encoders with a non-linearity that contains at least one flat (zero gradient) region. We show ex-
amples where this regularizer and the choice of nonlinearity determine the feature set that is learned
by the auto-encoder.
2 Latent State Regularization
Several auto-encoder variants which regularize their latent states have been proposed, they include
the sparse auto-encoder and the contractive auto-encoder [1] [2] [3]. The sparse auto-encoder in-
cludes an over-complete basis in the encoder and imposes a sparsity inducing (usually L1) penalty
on the hidden activations. This penalty prevents the auto-encoder from learning to reconstruct all
possible points in the input space and focuses the expressive power of the auto-encoder on repre-
senting the data-manifold. Similarly, the contractive auto-encoder avoids trivial solutions by intro-
ducing an auxiliary penalty which measures the square Frobenius norm of the Jacobian of the latent
representation with respect to the inputs. This encourages a constant latent representation except
around training samples where it is counteracted by the reconstruction term. It has been noted in [3]
that these two approaches are strongly related. The contractive auto-encoder explicitly encourages
small entries in the Jacobian, whereas the sparse auto-encoder is encouraged to produce mostly zero
(sparse) activations which can be designed to correspond to mostly flat regions of the nonlinearity,
thus also yielding small entries in the Jacobian.
2.1 Saturating Auto-Encoder through Complementary Nonlinearities
Our goal is to introduce a simple new regularizer which explicitly raises reconstruction error for
inputs not near the data manifold. Consider activation functions with at least one flat region; these
include shrink, rectified linear, and saturated linear (Figure 1). Auto-encoders with such nonlineari-
ties lose their ability to accurately reconstruct inputs which produce activations in the zero-gradient
regions of their activation functions. Let us denote the auto-encoding function xr = G(x,W), x
being the input, W the trainable parameters in the auto-encoder, and xr the reconstruction. One can
define an energy surface through the reconstruction error:
EW (x) = ||x−G(x,W)||2
Let’s imagine that G has been trained to produce a low reconstruction error at a particular data
point x∗. If Gis constant when xvaries along a particular direction v, then the energy will grow
quadratically along that particular direction as xmoves away from x∗. If Gis trained to produce
low reconstruction errors on a set of samples while being subject to a regularizer that tries to make
it constant in as many directions as possible, then the reconstruction energy will act as a contrast
function that will take low values around areas of high data density and larger values everywhere
else (similarly to a negative log likelihood function for a density estimator).
The proposed auto-encoder is a simple implementation of this idea. Using the notation W =
{We,Be,Wd,Bd}, the auto-encoder function is defined as
G(x,W) = WdF(Wex+ Be) + Bd
where We, Be, Wd, and Bd are the encoding matrix, encoding bias, decoding matrix, and decoding
bias, respectively, and F is the vector function that applies the scalar function f to each of its
components. f will be designed to have ”flat spots”, i.e. regions where the derivative is zero (also
referred to as the saturation region).
The loss function minimized by training is the sum of the reconstruction energy EW (x) = ||x−
G(x,W)||2 and a term that pushes the components ofWex+ Be towards the flat spots of f. This is
performed through the use of a complementary functionfc, associated with the non-linearity f(z).
The basic idea is to design fc(z) so that its value corresponds to the distance of z to one of the
flat spots of f(z). Minimizing fc(z) will push z towards the flat spots of f(z). With this in mind,
we introduce a penalty of the form fc(∑d
j=1 We
ijxj + be
i ) which encourages the argument to be
in the saturation regime of the activation function ( f). We refer to auto-encoders which include
this regularizer as Saturating Auto-Encoders (SATAEs). For activation functions with zero-gradient
regime(s) the complementary nonlinearity (fc) can be defined as the distance to the nearest saturation
region. Specifically, let S = {z|f′(z) = 0}then we define fc(z) as:
2
Figure 1: Three nonlinearities (top) with their associated complementary regularization func-
tions(bottom).
fc(z) = inf
z′∈S
|z−z′|. (1)
Figure 1 shows three activation functions and their associated complementary nonlinearities. The
complete loss to be minimized by a SATAE with nonlinearityf is:
L=
∑
x∈D
1
2∥x−
(
WdF(Wex+ Be) + Bd)
∥2 + α
dh∑
i=1
fc(We
i x+ be
i ), (2)
where dh denotes the number of hidden units. The hyper-parameterαregulates the trade-off between
reconstruction and saturation.
3 Effect of the Saturation Regularizer
We will examine the effect of the saturation regularizer on auto-encoders with a variety of activation
functions. It will be shown that the choice of activation function is a significant factor in determining
the type of basis the SATAE learns. First, we will present results on toy data in two dimensions
followed by results on higher dimensional image data.
3.1 Visualizing the Energy Landscape
Given a trained auto-encoder the reconstruction error can be evaluated for a given input x. For
low-dimensional spaces (Rn, where n ≤3) we can evaluate the reconstruction error on a regular
grid in order to visualize the portions of the space which are well represented by the auto-encoder.
More specifically we can compute E(x) = 1
2 ∥x−xr∥2 for all xwithin some bounded region of
the input space. Ideally, the reconstruction energy will be low for all xwhich are in the training set
and high elsewhere. Figures 2 and 3 depict the resulting reconstruction energy for inputs x ∈R2,
and −1 ≤xi ≤1. Black corresponds to low reconstruction energy. The training data consists of
a one dimensional manifold shown overlain in yellow. Figure 2 shows a toy example for a SATAE
which uses ten basis vectors and a shrink activation function. Note that adding the saturation regu-
larizer decreases the volume of the space which is well reconstructed, however good reconstruction
is maintained on or near the training data manifold. The auto-encoder in Figure 3 contains two
3
Figure 2: Energy surfaces for unregularized (left), and regularized (right) solutions obtained on
SATAE-shrink and 10 basis vectors. Black corresponds to low reconstruction energy. Training
points lie on a one-dimensional manifold shown in yellow.
Figure 3: SATAE-SL toy example with two basis elements. Top Row: three randomly initialized so-
lutions obtained with no regularization. Bottom Row: three randomly initialized solutions obtained
with regularization.
encoding basis vectors (red), two decoding basis vectors (green), and uses a saturated-linear activa-
tion function. The encoding and decoding bases are unconstrained. The unregularized auto-encoder
learns an orthogonal basis with a random orientation. The region of the space which is well recon-
structed corresponds to the outer product of the linear regions of two activation functions; beyond
that the error increases quadratically with the distance. Including the saturation regularizer induces
the auto-encoder basis to align with the data and to operate in the saturation regime at the extreme
points of the training data, which limits the space which is well reconstructed. Note that because the
encoding and decoding weights are separate and unrestricted, the encoding weights were scaled up
to effectively reduce the width of the linear regime of the nonlinearity.
3.2 SATAE-shrink
Consider a SATAE with a shrink activation function and shrink parameter λ. The corresponding
complementary nonlinearity, derived using Equation 1 is given by:
shrinkc(x) =
{abs(x), |x|>λ
0, elsewhere .
Note that shrinkc(Wex+ be) = abs(shrink(Wex+ be)), which corresponds to an L1 penalty
on the activations. Thus this SATAE is equivalent to a sparse auto-encoder with a shrink activation
function. Given the equivalence to the sparse auto-encoder we anticipate the same scale ambiguity
which occurs with L1 regularization. This ambiguity can be avoided by normalizing the decoder
weights to unit norm. It is expected that the SATAE-shrink will learn similar features to those
obtained with a sparse auto-encoder, and indeed this is what we observe. Figure 4(c) shows the
decoder filters learned by an auto-encoder with shrink nonlinearity trained on gray-scale natural
image patches. One can recognize the expected Gabor-like features when the saturation penalty is
activated. When trained on the binary MNIST dataset the learned basis is comprised of portions of
digits and strokes. Nearly identical results are obtained with a SATAE which uses a rectified-linear
4
activation function. This is because a rectified-linear function with an encoding bias behaves as a
positive only shrink function, similarly the complementary function is equivalent to a positive only
L1 penalty on the activations.
3.3 SATAE-saturated-linear
Unlike the SATAE-shrink, which tries to compress the data by minimizing the number of active
elements; the SATAE saturated-linear (SATAE-SL) tries to compress the data by encouraging the
latent code to be as close to binary as possible. Without a saturation penalty this auto-encoder learns
to encode small groups of neighboring pixels. More precisely, the auto-encoder learns the identity
function on all datasets. An example of such a basis is shown in Figure 4(b). With this basis the
auto-encoder can perfectly reconstruct any input by producing small activations which stay within
the linear region of the nonlinearity. Introducing the saturation penalty does not have any effect
when training on binary MNIST. This is because the scaled identity basis is a global minimizer of
Equation 2 for the SATAE-SL on any binary dataset. Such a basis can perfectly reconstruct any
binary input while operating exclusively in the saturated regions of the activation function, thus
incurring no saturation penalty. On the other hand, introducing the saturation penalty when training
on natural image patches induces the SATAE-SL to learn a more varied basis (Figure 4(d)).
3.4 Experiments on CIFAR-10
SATAE auto-encoders with 100 and 300 basis elements were trained on the CIFAR-10 dataset,
which contains small color images of objects from ten categories. In all of our experiments the auto-
encoders were trained by progressively increasing the saturation penalty (details are provided in the
next section). This allowed us to visually track the effect of the saturation penalty on individual
basis elements. Figure 4(e)-(f) shows the basis learned by SATAE-shrink with small and large
saturation penalty, respectively. Increasing the saturation penalty has the expected effect of reducing
the number of nonzero activations. As the saturation penalty increases, active basis elements become
responsible for reconstructing a larger portion of the input. This induces the basis elements to
become less spatially localized. This effect can be seen by comparing corresponding filters in Figure
4(e) and (f). Figures 4(g)-(h) show the basis elements learned by SATAE-SL with small and large
saturation penalty, respectively. The basis learned by SATAE-SL with a small saturation penalty
resembles the identity basis, as expected (see previous subsection). Once the saturation penalty
is increased small activations become more heavily penalized. To increase their activations the
encoding basis elements may increase in magnitude or align themselves with the input. However, if
the encoding and decoding weights are tied (or fixed in magnitude) then reconstruction error would
increase if the weights were merely scaled up. Thus the basis elements are forced to align with the
data in a way that also facilitates reconstruction. This effect is illustrated in Figure 5 where filters
corresponding to progressively larger values of the regularization parameter are shown. The top
half of the figure shows how an element from the identity basis ( α= 0.1) transforms to a localized
edge (α= 0.5). The bottom half of the figure shows how a localized edge ( α= 0.5) progressively
transforms to a template of a horse (α= 1).
4 Experimental Details
Because the regularizer explicitly encourages activations in the zero gradient regime of the nonlin-
earity, many encoder basis elements would not be updated via back-propagation through the non-
linearity if the saturation penalty were large. In order to allow the basis elements to deviate from
their initial random states we found it necessary to progressively increase the saturation penalty. In
our experiments the weights obtained at a minimum of Equation 2 for a smaller value of α were
used to initialize the optimization for a larger value of α. Typically, the optimization began with
α = 0 and was progressively increased to α = 1 in steps of 0.1. The auto-encoder was trained for
30 epochs at each value of α. This approach also allowed us to track the evolution of basis elements
as a function of α(Figure 5). In all experiments data samples were normalized by subtracting the
mean and dividing by the standard deviation of the dataset. The auto-encoders used to obtain the
results shown in Figure 4 (a),(c)-(f) used 100 basis elements, others used 300 basis elements. In-
creasing the number of elements in the basis did not have a strong qualitative effect except to make
the features represented by the basis more localized. The decoder basis elements of the SATAEs with
5
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 4: Basis elements learned by the SATAE using different nonlinearities on: 28x28 binary
MNIST digits, 12x12 gray scale natural image patches, and CIFAR-10. (a) SATAE-shrink trained on
MNIST, (b) SATAE-saturated-linear trained on MNIST, (c) SATAE-shrink trained on natural image
patches, (d) SATAE-saturated-linear trained on natural image patches, (e)-(f) SATAE-shrink trained
on CIFAR-10 withα= 0.1 and α= 0.5, respectively, (g)-(h) SATAE-SL trained on CIFAR-10 with
α= 0.1 and α= 0.6, respectively. 6
Figure 5: Evolution of two filters with increasing saturation regularization for a SATAE-SL trained
on CIFAR-10. Filters corresponding to larger values of α were initialized using the filter corre-
sponding to the previous α. The regularization parameter was varied from 0.1 to 0.5 (left to right)
in the top five images and 0.5 to 1 in the bottom five
shrink and rectified-linear nonlinearities were reprojected to the unit sphere after every 10 stochastic
gradient updates. The SATAEs which used saturated-linear activation function were trained with
tied weights. All results presented were obtained using stochastic gradient descent with a constant
learning rate of 0.05.
5 Discussion
In this work we have introduced a general and conceptually simple latent state regularizer. It was
demonstrated that a variety of feature sets can be obtained using a single framework. The utility of
these features depend on the application. In this section we extend the definition of the saturation
regularizer to include functions without a zero-gradient region. The relationship of SATAEs with
other regularized auto-encoders will be discussed. We conclude with a discussion on future work.
5.1 Extension to Differentiable Functions
We would like to extend the saturation penalty definition (Equation 1) to differentiable functions
without a zero-gradient region. An appealing first guess for the complimentary function is some
positive function of the first derivative, fc(x) = |f′(x)|for instance. This may be an appropriate
choice for monotonic activation functions which have their lowest gradient regions at the extrema
(e.g. sigmoids). However some activation functions may contain regions of small or zero gradient
which have negligible extent, at the extrema for instance. We would like our definition of the com-
plimentary function to not only measure the local gradient in some region, but to also measure it’s
extent. For this purpose we employ the concept of average variation over a finite interval. We define
the average variation of f at xin the positive and negative directions at scale l, respectively as:
∆+
l f(x) = 1
l
∫ x+l
x
|f′(u)|du= |f′(x)|∗Π+
l (x)
∆−
l f(x) = 1
l
∫ x
x−l
|f′(u)|du= |f′(x)|∗Π−
l (x).
Where ∗denotes the continuous convolution operator. Π+
l (x) and Π−
l (x) are uniform averaging
kernels in the positive and negative directions, respectively. Next, define a directional measure of
variation of f by integrating the average variation at all scales.
7
Figure 6: Illustration of the complimentary function ( fc) as defined by Equation 3 for a non-
monotonic activation function (f). The absolute derivative of f is shown for comparison.
M+f(x) =
∫ +∞
0
∆+
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π+
l (x)dl
]
∗|f′(x)|
M−f(x) =
∫ +∞
0
∆−
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π−
l (x)dl
]
∗|f′(x)|.
Where w(l) is chosen to be a sufficiently fast decreasing function of l to insure convergence of
the integral. The integral with which |f′(x)|is convolved in the above equation evaluates to some
decreasing function of xfor Π+ with support x≥0. Similarly, the integral involving Π−evaluates
to some increasing function of x with support x ≤0. This function will depend on w(l). The
functions M+f(x) and M−f(x) measure the average variation off(x) at all scales lin the positive
and negative direction, respectively. We define the complimentary functionfc(x) as:
fc(x) = min(M+f(x),M−f(x)). (3)
An example of a complimentary function defined using the above formulation is shown in Figure 6.
Whereas |f′(x)|is minimized at the extrema off, the complimentary function only plateaus at these
locations.
5.2 Relationship with the Contractive Auto-Encoder
Let hi be the output of theith hidden unit of a single-layer auto-encoder with point-wise nonlinearity
f(·). The regularizer imposed by the contractive auto-encoder (CAE) can be expressed as follows:
∑
ij
(∂hi
∂xj
)2
=
dh∑
i
f′(
d∑
j=1
We
ijxj + bi)2∥We
i ∥2
,
where x is a d-dimensional data vector, f′(·) is the derivative of f(·), bi is the bias of the ith
encoding unit, andWe
i denotes the ith row of the encoding weight matrix. The first term in the above
equation tries to adjust the weights so as to push the activations into the low gradient (saturation)
regime of the nonlinearity, but is only defined for differentiable activation functions. Therefore the
CAE indirectly encourages operation in the saturation regime. Computing the Jacobian, however,
can be cumbersome for deep networks. Furthermore, the complexity of computing the Jacobian is
O(d×dh), although a more efficient implementation is possible [3], compared to the O(dh) for the
saturation penalty.
8
5.3 Relationship with the Sparse Auto-Encoder
In Section 3.2 it was shown that SATAEs with shrink or rectified-linear activation functions are
equivalent to a sparse auto-encoder. Interestingly, the fact that the saturation penalty happens to
correspond to L1 regularization in the case of SATAE-shrink agrees with the findings in [7]. In their
efforts to find an architecture to approximate inference in sparse coding, Gregor et al. found that
the shrink function is particularly compatible with L1 minimization. Equivalence to sparsity only
for some activation functions suggests that SATAEs are a generalization of sparse auto-encoders.
Like the sparsity penalty, the saturation penalty can be applied at any point in a deep network for the
same computational cost. However, unlike the sparsity penalty the saturation penalty is adapted to
the nonlinearity of the particular layer to which it is applied.
5.4 Future Work
We intend to experimentally demonstrate that the representations learned by SATAEs are useful as
features for learning common tasks such as classification and denoising. We will also address several
open questions, namely: (i) how to select (or learn) the width parameter (λ) of the nonlinearity, and
(ii) how to methodically constrain the weights. We will also explore SATAEs that use a wider class
of non-linearities and architectures.
References
[1] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra and Yann LeCun. Efficient Learn-
ing of Sparse Representations with an Energy- Based Model, in J. Platt et al. (Eds),Advances in
Neural Information Processing Systems (NIPS 2006), 19, MIT Press, 2006.
[2] Marc’Aurelio Ranzato, Fu-Jie Huang, Y-Lan Boureau and Yann LeCun: Unsupervised Learn-
ing of Invariant Feature Hierarchies with Applications to Object Recognition, Proc. Computer
Vision and Pattern Recognition Conference (CVPR’07), IEEE Press, 2007
[3] Rifai, S. and Vincent, P. and Muller, X. and Glorot, X. and Bengio, Y . Contractive auto-encoders:
Explicit invariance during feature extraction, Proceedings of the Twenty-eight International
Conference on Machine Learning, ICML 2011
[4] P. Vincent, H. Larochelle, Y . Bengio, P.A. Manzagol. Extracting and Composing Robust Fea-
tures with Denoising Autoencoders Proceedings of the 25th International Conference on Ma-
chine Learning (ICML’2008), 2008.
[5] R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley & Sons,
2001, pp. xx + 654, ISBN: 0-471-05669-3
[6] Olhausen, Bruno A.; Field, David J. (1997). Sparse Coding with an Overcomplete Basis Set: A
Strategy Employed by V1?. Vision Research 37 (23): 3311-3325.
[7] Karol Gregor and Yann LeCun: Learning Fast Approximations of Sparse Coding, Proc. Inter-
national Conference on Machine learning (ICML’10), 2010
[8] Guillaume Alain and Yoshua Bengio, What Regularized Auto-Encoders Learn from the Data
Generating Distribution. arXiv:1211.4246v3 [cs.LG]
9
|
Ross Goroshin, Yann LeCun
|
Unknown
| 2,013
|
{"id": "yGgjGkkbeFSbt", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358468100000, "tmdate": 1358468100000, "ddate": null, "number": 39, "content": {"title": "Saturating Auto-Encoder", "decision": "conferencePoster-iclr2013-conference", "abstract": "We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.", "pdf": "https://arxiv.org/abs/1301.3577", "paperhash": "goroshin|saturating_autoencoder", "keywords": [], "conflicts": [], "authors": ["Ross Goroshin", "Yann LeCun"], "authorids": ["rgoroshin@gmail.com", "ylecun@gmail.com"]}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rgoroshin@gmail.com"], "writers": []}
|
[Review]:
In response to 5bc2: the principle behind SATAE is a unification of the principles behind sparse autoencoders (and sparse coding in general) and contracting autoencoders.
Basically, the main question with unsupervised learning is how to learn a contrast function (energy function in the energy-based framework, negative log likelihood in the probabilistic framework) that takes low values on the data manifold (or near it) and higher values everywhere else.
It's easy to make the energy low near data points. The hard part is making it higher everywhere else. There are basically 5 major classes of methods to do so:
1. bound the volume of stuff that can have low energy (e.g. normalized probabilistic models, K-means, PCA);
2 use a regularizer so that the volume of stuff that has low energy is as small as possible (sparse coding, contracting AE, saturating AE);
3. explicitly push up on the energy of selected points, preferably outside the data manifold, often nearby (MC and MCMC methods, contrastive divergence);
4. build local minima of the energy around data points by making the gradient small and the hessian large (score matching);
5. learn the vector field of gradient of the energy (instead of the energy itself) so that it points away from the data manifold (denoising autoencoder).
SATAE, just like contracting AE and sparse modeling falls in category 2.
Basically, if you auto-encoding function is G(X,W), X being the input, and W the trainable parameters, and if your unregularized energy function is E(X,W) = ||X - G(X,W)||^2, if G is constant when X varies along a particular direction, then the energy will grow quadratically along that direction (technically, G doesn't need to be constant, but merely to have a gradient smaller than one). The more directions G(X,W) has low gradient, the lower the volume of stuff with low energy.
One advantage of SATAE is its extreme simplicity. You could see it as a version of Contracting AE cut down to its bare bones.
We can always obfuscate this simple principle with complicated math, but how would that help? At some point it will become necessary to make more precise theoretical statements, but for now we are merely searching for basic principles.
|
Rostislav Goroshin, Yann LeCun
| null | null |
{"id": "pn6HDOWYfCDYA", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362779100000, "tmdate": 1362779100000, "ddate": null, "number": 2, "content": {"title": "", "review": "In response to 5bc2: the principle behind SATAE is a unification of the principles behind sparse autoencoders (and sparse coding in general) and contracting autoencoders. \r\n\r\nBasically, the main question with unsupervised learning is how to learn a contrast function (energy function in the energy-based framework, negative log likelihood in the probabilistic framework) that takes low values on the data manifold (or near it) and higher values everywhere else. \r\n\r\nIt's easy to make the energy low near data points. The hard part is making it higher everywhere else. There are basically 5 major classes of methods to do so: \r\n1. bound the volume of stuff that can have low energy (e.g. normalized probabilistic models, K-means, PCA); \r\n2 use a regularizer so that the volume of stuff that has low energy is as small as possible (sparse coding, contracting AE, saturating AE); \r\n3. explicitly push up on the energy of selected points, preferably outside the data manifold, often nearby (MC and MCMC methods, contrastive divergence); \r\n4. build local minima of the energy around data points by making the gradient small and the hessian large (score matching); \r\n5. learn the vector field of gradient of the energy (instead of the energy itself) so that it points away from the data manifold (denoising autoencoder). \r\n\r\nSATAE, just like contracting AE and sparse modeling falls in category 2.\r\n\r\nBasically, if you auto-encoding function is G(X,W), X being the input, and W the trainable parameters, and if your unregularized energy function is E(X,W) = ||X - G(X,W)||^2, if G is constant when X varies along a particular direction, then the energy will grow quadratically along that direction (technically, G doesn't need to be constant, but merely to have a gradient smaller than one). The more directions G(X,W) has low gradient, the lower the volume of stuff with low energy.\r\n\r\nOne advantage of SATAE is its extreme simplicity. You could see it as a version of Contracting AE cut down to its bare bones.\r\n\r\nWe can always obfuscate this simple principle with complicated math, but how would that help? At some point it will become necessary to make more precise theoretical statements, but for now we are merely searching for basic principles."}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yGgjGkkbeFSbt", "readers": ["everyone"], "nonreaders": [], "signatures": ["Rostislav Goroshin, Yann LeCun"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 1,
"importance_and_relevance": 1,
"materials_and_methods": 6,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 2,
"total": 13
}
| 0.846154
| 0.846154
| 0
| 0.8917
| 0.434118
| 0.045546
| 0
| 0.076923
| 0.076923
| 0.461538
| 0
| 0
| 0.076923
| 0.153846
|
{
"criticism": 0,
"example": 0.07692307692307693,
"importance_and_relevance": 0.07692307692307693,
"materials_and_methods": 0.46153846153846156,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0.07692307692307693,
"suggestion_and_solution": 0.15384615384615385
}
| 0.846154
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yGgjGkkbeFSbt
|
Saturating Auto-Encoder
|
We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.
|
Saturating Auto-Encoders
Rostislav Goroshin∗
Courant Institute of Mathematical Science
New York University
goroshin@cs.nyu.edu
Yann LeCun
Courant Institute of Mathematical Science
New York University
yann@cs.nyu.edu
Abstract
We introduce a simple new regularizer for auto-encoders whose hidden-unit ac-
tivation functions contain at least one zero-gradient (saturated) region. This reg-
ularizer explicitly encourages activations in the saturated region(s) of the corre-
sponding activation function. We call these Saturating Auto-Encoders (SATAE).
We show that the saturation regularizer explicitly limits the SATAE’s ability to
reconstruct inputs which are not near the data manifold. Furthermore, we show
that a wide variety of features can be learned when different activation functions
are used. Finally, connections are established with the Contractive and Sparse
Auto-Encoders.
1 Introduction
An auto-encoder is a conceptually simple neural network used for obtaining useful data rep-
resentations through unsupervised training. It is composed of an encoder which outputs a
hidden (or latent) representation and a decoder which attempts to reconstruct the input using
the hidden representation as its input. Training consists of minimizing a reconstruction cost
such as L2 error. However this cost is merely a proxy for the true objective: to obtain a useful
latent representation. Auto-encoders can implement many dimensionality reduction techniques
such as PCA and Sparse Coding (SC) [5] [6] [7]. This makes the study of auto-encoders very
appealing from a theoretical standpoint. In recent years, renewed interest in auto-encoders net-
works has mainly been due to their empirical success in unsupervised feature learning [1] [2] [3] [4].
When minimizing only reconstruction cost, the standard auto-encoder does not typically learn any
meaningful hidden representation of the data. Well known theoretical and experimental results
show that a linear auto-encoder with trainable encoding and decoding matrices, We and Wd re-
spectively, learns the identity function if We and Wd are full rank or over-complete. The linear
auto-encoder learns the principle variance directions (PCA) if We and Wd are rank deficient [5].
It has been observed that other representations can be obtained by regularizing the latent repre-
sentation. This approach is exemplified by the Contractive and Sparse Auto-Encoders [3] [1] [2].
Intuitively, an auto-encoder with limited capacity will focus its resources on reconstructing portions
of the input space in which data samples occur most frequently. From an energy based perspective,
auto-encoders achieve low reconstruction cost in portions of the input space with high data density
(recently, [8] has examined this perspective in depth). If the data occupies some low dimensional
manifold in the higher dimensional input space then minimizing reconstruction error achieves low
energy on this manifold. Useful latent state regularizers raise the energy of points that do not lie
on the manifold, thus playing an analogous role to minimizing the partition function in maximum
likelihood models. In this work we introduce a new type of regularizer that does this explicitly for
∗The authors thank Joan Bruna and David Eigen for their useful suggestions and comments.
1
arXiv:1301.3577v3 [cs.LG] 20 Mar 2013
auto-encoders with a non-linearity that contains at least one flat (zero gradient) region. We show ex-
amples where this regularizer and the choice of nonlinearity determine the feature set that is learned
by the auto-encoder.
2 Latent State Regularization
Several auto-encoder variants which regularize their latent states have been proposed, they include
the sparse auto-encoder and the contractive auto-encoder [1] [2] [3]. The sparse auto-encoder in-
cludes an over-complete basis in the encoder and imposes a sparsity inducing (usually L1) penalty
on the hidden activations. This penalty prevents the auto-encoder from learning to reconstruct all
possible points in the input space and focuses the expressive power of the auto-encoder on repre-
senting the data-manifold. Similarly, the contractive auto-encoder avoids trivial solutions by intro-
ducing an auxiliary penalty which measures the square Frobenius norm of the Jacobian of the latent
representation with respect to the inputs. This encourages a constant latent representation except
around training samples where it is counteracted by the reconstruction term. It has been noted in [3]
that these two approaches are strongly related. The contractive auto-encoder explicitly encourages
small entries in the Jacobian, whereas the sparse auto-encoder is encouraged to produce mostly zero
(sparse) activations which can be designed to correspond to mostly flat regions of the nonlinearity,
thus also yielding small entries in the Jacobian.
2.1 Saturating Auto-Encoder through Complementary Nonlinearities
Our goal is to introduce a simple new regularizer which explicitly raises reconstruction error for
inputs not near the data manifold. Consider activation functions with at least one flat region; these
include shrink, rectified linear, and saturated linear (Figure 1). Auto-encoders with such nonlineari-
ties lose their ability to accurately reconstruct inputs which produce activations in the zero-gradient
regions of their activation functions. Let us denote the auto-encoding function xr = G(x,W), x
being the input, W the trainable parameters in the auto-encoder, and xr the reconstruction. One can
define an energy surface through the reconstruction error:
EW (x) = ||x−G(x,W)||2
Let’s imagine that G has been trained to produce a low reconstruction error at a particular data
point x∗. If Gis constant when xvaries along a particular direction v, then the energy will grow
quadratically along that particular direction as xmoves away from x∗. If Gis trained to produce
low reconstruction errors on a set of samples while being subject to a regularizer that tries to make
it constant in as many directions as possible, then the reconstruction energy will act as a contrast
function that will take low values around areas of high data density and larger values everywhere
else (similarly to a negative log likelihood function for a density estimator).
The proposed auto-encoder is a simple implementation of this idea. Using the notation W =
{We,Be,Wd,Bd}, the auto-encoder function is defined as
G(x,W) = WdF(Wex+ Be) + Bd
where We, Be, Wd, and Bd are the encoding matrix, encoding bias, decoding matrix, and decoding
bias, respectively, and F is the vector function that applies the scalar function f to each of its
components. f will be designed to have ”flat spots”, i.e. regions where the derivative is zero (also
referred to as the saturation region).
The loss function minimized by training is the sum of the reconstruction energy EW (x) = ||x−
G(x,W)||2 and a term that pushes the components ofWex+ Be towards the flat spots of f. This is
performed through the use of a complementary functionfc, associated with the non-linearity f(z).
The basic idea is to design fc(z) so that its value corresponds to the distance of z to one of the
flat spots of f(z). Minimizing fc(z) will push z towards the flat spots of f(z). With this in mind,
we introduce a penalty of the form fc(∑d
j=1 We
ijxj + be
i ) which encourages the argument to be
in the saturation regime of the activation function ( f). We refer to auto-encoders which include
this regularizer as Saturating Auto-Encoders (SATAEs). For activation functions with zero-gradient
regime(s) the complementary nonlinearity (fc) can be defined as the distance to the nearest saturation
region. Specifically, let S = {z|f′(z) = 0}then we define fc(z) as:
2
Figure 1: Three nonlinearities (top) with their associated complementary regularization func-
tions(bottom).
fc(z) = inf
z′∈S
|z−z′|. (1)
Figure 1 shows three activation functions and their associated complementary nonlinearities. The
complete loss to be minimized by a SATAE with nonlinearityf is:
L=
∑
x∈D
1
2∥x−
(
WdF(Wex+ Be) + Bd)
∥2 + α
dh∑
i=1
fc(We
i x+ be
i ), (2)
where dh denotes the number of hidden units. The hyper-parameterαregulates the trade-off between
reconstruction and saturation.
3 Effect of the Saturation Regularizer
We will examine the effect of the saturation regularizer on auto-encoders with a variety of activation
functions. It will be shown that the choice of activation function is a significant factor in determining
the type of basis the SATAE learns. First, we will present results on toy data in two dimensions
followed by results on higher dimensional image data.
3.1 Visualizing the Energy Landscape
Given a trained auto-encoder the reconstruction error can be evaluated for a given input x. For
low-dimensional spaces (Rn, where n ≤3) we can evaluate the reconstruction error on a regular
grid in order to visualize the portions of the space which are well represented by the auto-encoder.
More specifically we can compute E(x) = 1
2 ∥x−xr∥2 for all xwithin some bounded region of
the input space. Ideally, the reconstruction energy will be low for all xwhich are in the training set
and high elsewhere. Figures 2 and 3 depict the resulting reconstruction energy for inputs x ∈R2,
and −1 ≤xi ≤1. Black corresponds to low reconstruction energy. The training data consists of
a one dimensional manifold shown overlain in yellow. Figure 2 shows a toy example for a SATAE
which uses ten basis vectors and a shrink activation function. Note that adding the saturation regu-
larizer decreases the volume of the space which is well reconstructed, however good reconstruction
is maintained on or near the training data manifold. The auto-encoder in Figure 3 contains two
3
Figure 2: Energy surfaces for unregularized (left), and regularized (right) solutions obtained on
SATAE-shrink and 10 basis vectors. Black corresponds to low reconstruction energy. Training
points lie on a one-dimensional manifold shown in yellow.
Figure 3: SATAE-SL toy example with two basis elements. Top Row: three randomly initialized so-
lutions obtained with no regularization. Bottom Row: three randomly initialized solutions obtained
with regularization.
encoding basis vectors (red), two decoding basis vectors (green), and uses a saturated-linear activa-
tion function. The encoding and decoding bases are unconstrained. The unregularized auto-encoder
learns an orthogonal basis with a random orientation. The region of the space which is well recon-
structed corresponds to the outer product of the linear regions of two activation functions; beyond
that the error increases quadratically with the distance. Including the saturation regularizer induces
the auto-encoder basis to align with the data and to operate in the saturation regime at the extreme
points of the training data, which limits the space which is well reconstructed. Note that because the
encoding and decoding weights are separate and unrestricted, the encoding weights were scaled up
to effectively reduce the width of the linear regime of the nonlinearity.
3.2 SATAE-shrink
Consider a SATAE with a shrink activation function and shrink parameter λ. The corresponding
complementary nonlinearity, derived using Equation 1 is given by:
shrinkc(x) =
{abs(x), |x|>λ
0, elsewhere .
Note that shrinkc(Wex+ be) = abs(shrink(Wex+ be)), which corresponds to an L1 penalty
on the activations. Thus this SATAE is equivalent to a sparse auto-encoder with a shrink activation
function. Given the equivalence to the sparse auto-encoder we anticipate the same scale ambiguity
which occurs with L1 regularization. This ambiguity can be avoided by normalizing the decoder
weights to unit norm. It is expected that the SATAE-shrink will learn similar features to those
obtained with a sparse auto-encoder, and indeed this is what we observe. Figure 4(c) shows the
decoder filters learned by an auto-encoder with shrink nonlinearity trained on gray-scale natural
image patches. One can recognize the expected Gabor-like features when the saturation penalty is
activated. When trained on the binary MNIST dataset the learned basis is comprised of portions of
digits and strokes. Nearly identical results are obtained with a SATAE which uses a rectified-linear
4
activation function. This is because a rectified-linear function with an encoding bias behaves as a
positive only shrink function, similarly the complementary function is equivalent to a positive only
L1 penalty on the activations.
3.3 SATAE-saturated-linear
Unlike the SATAE-shrink, which tries to compress the data by minimizing the number of active
elements; the SATAE saturated-linear (SATAE-SL) tries to compress the data by encouraging the
latent code to be as close to binary as possible. Without a saturation penalty this auto-encoder learns
to encode small groups of neighboring pixels. More precisely, the auto-encoder learns the identity
function on all datasets. An example of such a basis is shown in Figure 4(b). With this basis the
auto-encoder can perfectly reconstruct any input by producing small activations which stay within
the linear region of the nonlinearity. Introducing the saturation penalty does not have any effect
when training on binary MNIST. This is because the scaled identity basis is a global minimizer of
Equation 2 for the SATAE-SL on any binary dataset. Such a basis can perfectly reconstruct any
binary input while operating exclusively in the saturated regions of the activation function, thus
incurring no saturation penalty. On the other hand, introducing the saturation penalty when training
on natural image patches induces the SATAE-SL to learn a more varied basis (Figure 4(d)).
3.4 Experiments on CIFAR-10
SATAE auto-encoders with 100 and 300 basis elements were trained on the CIFAR-10 dataset,
which contains small color images of objects from ten categories. In all of our experiments the auto-
encoders were trained by progressively increasing the saturation penalty (details are provided in the
next section). This allowed us to visually track the effect of the saturation penalty on individual
basis elements. Figure 4(e)-(f) shows the basis learned by SATAE-shrink with small and large
saturation penalty, respectively. Increasing the saturation penalty has the expected effect of reducing
the number of nonzero activations. As the saturation penalty increases, active basis elements become
responsible for reconstructing a larger portion of the input. This induces the basis elements to
become less spatially localized. This effect can be seen by comparing corresponding filters in Figure
4(e) and (f). Figures 4(g)-(h) show the basis elements learned by SATAE-SL with small and large
saturation penalty, respectively. The basis learned by SATAE-SL with a small saturation penalty
resembles the identity basis, as expected (see previous subsection). Once the saturation penalty
is increased small activations become more heavily penalized. To increase their activations the
encoding basis elements may increase in magnitude or align themselves with the input. However, if
the encoding and decoding weights are tied (or fixed in magnitude) then reconstruction error would
increase if the weights were merely scaled up. Thus the basis elements are forced to align with the
data in a way that also facilitates reconstruction. This effect is illustrated in Figure 5 where filters
corresponding to progressively larger values of the regularization parameter are shown. The top
half of the figure shows how an element from the identity basis ( α= 0.1) transforms to a localized
edge (α= 0.5). The bottom half of the figure shows how a localized edge ( α= 0.5) progressively
transforms to a template of a horse (α= 1).
4 Experimental Details
Because the regularizer explicitly encourages activations in the zero gradient regime of the nonlin-
earity, many encoder basis elements would not be updated via back-propagation through the non-
linearity if the saturation penalty were large. In order to allow the basis elements to deviate from
their initial random states we found it necessary to progressively increase the saturation penalty. In
our experiments the weights obtained at a minimum of Equation 2 for a smaller value of α were
used to initialize the optimization for a larger value of α. Typically, the optimization began with
α = 0 and was progressively increased to α = 1 in steps of 0.1. The auto-encoder was trained for
30 epochs at each value of α. This approach also allowed us to track the evolution of basis elements
as a function of α(Figure 5). In all experiments data samples were normalized by subtracting the
mean and dividing by the standard deviation of the dataset. The auto-encoders used to obtain the
results shown in Figure 4 (a),(c)-(f) used 100 basis elements, others used 300 basis elements. In-
creasing the number of elements in the basis did not have a strong qualitative effect except to make
the features represented by the basis more localized. The decoder basis elements of the SATAEs with
5
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 4: Basis elements learned by the SATAE using different nonlinearities on: 28x28 binary
MNIST digits, 12x12 gray scale natural image patches, and CIFAR-10. (a) SATAE-shrink trained on
MNIST, (b) SATAE-saturated-linear trained on MNIST, (c) SATAE-shrink trained on natural image
patches, (d) SATAE-saturated-linear trained on natural image patches, (e)-(f) SATAE-shrink trained
on CIFAR-10 withα= 0.1 and α= 0.5, respectively, (g)-(h) SATAE-SL trained on CIFAR-10 with
α= 0.1 and α= 0.6, respectively. 6
Figure 5: Evolution of two filters with increasing saturation regularization for a SATAE-SL trained
on CIFAR-10. Filters corresponding to larger values of α were initialized using the filter corre-
sponding to the previous α. The regularization parameter was varied from 0.1 to 0.5 (left to right)
in the top five images and 0.5 to 1 in the bottom five
shrink and rectified-linear nonlinearities were reprojected to the unit sphere after every 10 stochastic
gradient updates. The SATAEs which used saturated-linear activation function were trained with
tied weights. All results presented were obtained using stochastic gradient descent with a constant
learning rate of 0.05.
5 Discussion
In this work we have introduced a general and conceptually simple latent state regularizer. It was
demonstrated that a variety of feature sets can be obtained using a single framework. The utility of
these features depend on the application. In this section we extend the definition of the saturation
regularizer to include functions without a zero-gradient region. The relationship of SATAEs with
other regularized auto-encoders will be discussed. We conclude with a discussion on future work.
5.1 Extension to Differentiable Functions
We would like to extend the saturation penalty definition (Equation 1) to differentiable functions
without a zero-gradient region. An appealing first guess for the complimentary function is some
positive function of the first derivative, fc(x) = |f′(x)|for instance. This may be an appropriate
choice for monotonic activation functions which have their lowest gradient regions at the extrema
(e.g. sigmoids). However some activation functions may contain regions of small or zero gradient
which have negligible extent, at the extrema for instance. We would like our definition of the com-
plimentary function to not only measure the local gradient in some region, but to also measure it’s
extent. For this purpose we employ the concept of average variation over a finite interval. We define
the average variation of f at xin the positive and negative directions at scale l, respectively as:
∆+
l f(x) = 1
l
∫ x+l
x
|f′(u)|du= |f′(x)|∗Π+
l (x)
∆−
l f(x) = 1
l
∫ x
x−l
|f′(u)|du= |f′(x)|∗Π−
l (x).
Where ∗denotes the continuous convolution operator. Π+
l (x) and Π−
l (x) are uniform averaging
kernels in the positive and negative directions, respectively. Next, define a directional measure of
variation of f by integrating the average variation at all scales.
7
Figure 6: Illustration of the complimentary function ( fc) as defined by Equation 3 for a non-
monotonic activation function (f). The absolute derivative of f is shown for comparison.
M+f(x) =
∫ +∞
0
∆+
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π+
l (x)dl
]
∗|f′(x)|
M−f(x) =
∫ +∞
0
∆−
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π−
l (x)dl
]
∗|f′(x)|.
Where w(l) is chosen to be a sufficiently fast decreasing function of l to insure convergence of
the integral. The integral with which |f′(x)|is convolved in the above equation evaluates to some
decreasing function of xfor Π+ with support x≥0. Similarly, the integral involving Π−evaluates
to some increasing function of x with support x ≤0. This function will depend on w(l). The
functions M+f(x) and M−f(x) measure the average variation off(x) at all scales lin the positive
and negative direction, respectively. We define the complimentary functionfc(x) as:
fc(x) = min(M+f(x),M−f(x)). (3)
An example of a complimentary function defined using the above formulation is shown in Figure 6.
Whereas |f′(x)|is minimized at the extrema off, the complimentary function only plateaus at these
locations.
5.2 Relationship with the Contractive Auto-Encoder
Let hi be the output of theith hidden unit of a single-layer auto-encoder with point-wise nonlinearity
f(·). The regularizer imposed by the contractive auto-encoder (CAE) can be expressed as follows:
∑
ij
(∂hi
∂xj
)2
=
dh∑
i
f′(
d∑
j=1
We
ijxj + bi)2∥We
i ∥2
,
where x is a d-dimensional data vector, f′(·) is the derivative of f(·), bi is the bias of the ith
encoding unit, andWe
i denotes the ith row of the encoding weight matrix. The first term in the above
equation tries to adjust the weights so as to push the activations into the low gradient (saturation)
regime of the nonlinearity, but is only defined for differentiable activation functions. Therefore the
CAE indirectly encourages operation in the saturation regime. Computing the Jacobian, however,
can be cumbersome for deep networks. Furthermore, the complexity of computing the Jacobian is
O(d×dh), although a more efficient implementation is possible [3], compared to the O(dh) for the
saturation penalty.
8
5.3 Relationship with the Sparse Auto-Encoder
In Section 3.2 it was shown that SATAEs with shrink or rectified-linear activation functions are
equivalent to a sparse auto-encoder. Interestingly, the fact that the saturation penalty happens to
correspond to L1 regularization in the case of SATAE-shrink agrees with the findings in [7]. In their
efforts to find an architecture to approximate inference in sparse coding, Gregor et al. found that
the shrink function is particularly compatible with L1 minimization. Equivalence to sparsity only
for some activation functions suggests that SATAEs are a generalization of sparse auto-encoders.
Like the sparsity penalty, the saturation penalty can be applied at any point in a deep network for the
same computational cost. However, unlike the sparsity penalty the saturation penalty is adapted to
the nonlinearity of the particular layer to which it is applied.
5.4 Future Work
We intend to experimentally demonstrate that the representations learned by SATAEs are useful as
features for learning common tasks such as classification and denoising. We will also address several
open questions, namely: (i) how to select (or learn) the width parameter (λ) of the nonlinearity, and
(ii) how to methodically constrain the weights. We will also explore SATAEs that use a wider class
of non-linearities and architectures.
References
[1] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra and Yann LeCun. Efficient Learn-
ing of Sparse Representations with an Energy- Based Model, in J. Platt et al. (Eds),Advances in
Neural Information Processing Systems (NIPS 2006), 19, MIT Press, 2006.
[2] Marc’Aurelio Ranzato, Fu-Jie Huang, Y-Lan Boureau and Yann LeCun: Unsupervised Learn-
ing of Invariant Feature Hierarchies with Applications to Object Recognition, Proc. Computer
Vision and Pattern Recognition Conference (CVPR’07), IEEE Press, 2007
[3] Rifai, S. and Vincent, P. and Muller, X. and Glorot, X. and Bengio, Y . Contractive auto-encoders:
Explicit invariance during feature extraction, Proceedings of the Twenty-eight International
Conference on Machine Learning, ICML 2011
[4] P. Vincent, H. Larochelle, Y . Bengio, P.A. Manzagol. Extracting and Composing Robust Fea-
tures with Denoising Autoencoders Proceedings of the 25th International Conference on Ma-
chine Learning (ICML’2008), 2008.
[5] R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley & Sons,
2001, pp. xx + 654, ISBN: 0-471-05669-3
[6] Olhausen, Bruno A.; Field, David J. (1997). Sparse Coding with an Overcomplete Basis Set: A
Strategy Employed by V1?. Vision Research 37 (23): 3311-3325.
[7] Karol Gregor and Yann LeCun: Learning Fast Approximations of Sparse Coding, Proc. Inter-
national Conference on Machine learning (ICML’10), 2010
[8] Guillaume Alain and Yoshua Bengio, What Regularized Auto-Encoders Learn from the Data
Generating Distribution. arXiv:1211.4246v3 [cs.LG]
9
|
Ross Goroshin, Yann LeCun
|
Unknown
| 2,013
|
{"id": "yGgjGkkbeFSbt", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358468100000, "tmdate": 1358468100000, "ddate": null, "number": 39, "content": {"title": "Saturating Auto-Encoder", "decision": "conferencePoster-iclr2013-conference", "abstract": "We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.", "pdf": "https://arxiv.org/abs/1301.3577", "paperhash": "goroshin|saturating_autoencoder", "keywords": [], "conflicts": [], "authors": ["Ross Goroshin", "Yann LeCun"], "authorids": ["rgoroshin@gmail.com", "ylecun@gmail.com"]}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rgoroshin@gmail.com"], "writers": []}
|
[Review]:
We thank the reviewers for their constructive comments.
A revised version of the paper has been submitted to arXiv and should be available shortly.
In addition to minor corrections and additions throughout the paper, we have added three new subsections:
(1) a potential extension of the SATAE framework to include differentiable
functions without a zero-gradient region
(2) experiments on the CIFAR-10 dataset
(3) future work.
We have also expanded the introduction to better motivate our approach.
|
Ross Goroshin
| null | null |
{"id": "__krPw9SreVyO", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363749480000, "tmdate": 1363749480000, "ddate": null, "number": 1, "content": {"title": "", "review": "We thank the reviewers for their constructive comments.\r\n\r\nA revised version of the paper has been submitted to arXiv and should be available shortly. \r\n\r\nIn addition to minor corrections and additions throughout the paper, we have added three new subsections:\r\n\r\n(1) a potential extension of the SATAE framework to include differentiable\r\nfunctions without a zero-gradient region\r\n\r\n(2) experiments on the CIFAR-10 dataset\r\n\r\n(3) future work.\r\n\r\nWe have also expanded the introduction to better motivate our approach."}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yGgjGkkbeFSbt", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ross Goroshin"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 1,
"praise": 2,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 2,
"total": 4
}
| 1.25
| -0.028377
| 1.278377
| 1.259465
| 0.16956
| 0.009465
| 0
| 0
| 0
| 0.25
| 0.5
| 0
| 0
| 0.5
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.25,
"praise": 0.5,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.5
}
| 1.25
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yGgjGkkbeFSbt
|
Saturating Auto-Encoder
|
We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.
|
Saturating Auto-Encoders
Rostislav Goroshin∗
Courant Institute of Mathematical Science
New York University
goroshin@cs.nyu.edu
Yann LeCun
Courant Institute of Mathematical Science
New York University
yann@cs.nyu.edu
Abstract
We introduce a simple new regularizer for auto-encoders whose hidden-unit ac-
tivation functions contain at least one zero-gradient (saturated) region. This reg-
ularizer explicitly encourages activations in the saturated region(s) of the corre-
sponding activation function. We call these Saturating Auto-Encoders (SATAE).
We show that the saturation regularizer explicitly limits the SATAE’s ability to
reconstruct inputs which are not near the data manifold. Furthermore, we show
that a wide variety of features can be learned when different activation functions
are used. Finally, connections are established with the Contractive and Sparse
Auto-Encoders.
1 Introduction
An auto-encoder is a conceptually simple neural network used for obtaining useful data rep-
resentations through unsupervised training. It is composed of an encoder which outputs a
hidden (or latent) representation and a decoder which attempts to reconstruct the input using
the hidden representation as its input. Training consists of minimizing a reconstruction cost
such as L2 error. However this cost is merely a proxy for the true objective: to obtain a useful
latent representation. Auto-encoders can implement many dimensionality reduction techniques
such as PCA and Sparse Coding (SC) [5] [6] [7]. This makes the study of auto-encoders very
appealing from a theoretical standpoint. In recent years, renewed interest in auto-encoders net-
works has mainly been due to their empirical success in unsupervised feature learning [1] [2] [3] [4].
When minimizing only reconstruction cost, the standard auto-encoder does not typically learn any
meaningful hidden representation of the data. Well known theoretical and experimental results
show that a linear auto-encoder with trainable encoding and decoding matrices, We and Wd re-
spectively, learns the identity function if We and Wd are full rank or over-complete. The linear
auto-encoder learns the principle variance directions (PCA) if We and Wd are rank deficient [5].
It has been observed that other representations can be obtained by regularizing the latent repre-
sentation. This approach is exemplified by the Contractive and Sparse Auto-Encoders [3] [1] [2].
Intuitively, an auto-encoder with limited capacity will focus its resources on reconstructing portions
of the input space in which data samples occur most frequently. From an energy based perspective,
auto-encoders achieve low reconstruction cost in portions of the input space with high data density
(recently, [8] has examined this perspective in depth). If the data occupies some low dimensional
manifold in the higher dimensional input space then minimizing reconstruction error achieves low
energy on this manifold. Useful latent state regularizers raise the energy of points that do not lie
on the manifold, thus playing an analogous role to minimizing the partition function in maximum
likelihood models. In this work we introduce a new type of regularizer that does this explicitly for
∗The authors thank Joan Bruna and David Eigen for their useful suggestions and comments.
1
arXiv:1301.3577v3 [cs.LG] 20 Mar 2013
auto-encoders with a non-linearity that contains at least one flat (zero gradient) region. We show ex-
amples where this regularizer and the choice of nonlinearity determine the feature set that is learned
by the auto-encoder.
2 Latent State Regularization
Several auto-encoder variants which regularize their latent states have been proposed, they include
the sparse auto-encoder and the contractive auto-encoder [1] [2] [3]. The sparse auto-encoder in-
cludes an over-complete basis in the encoder and imposes a sparsity inducing (usually L1) penalty
on the hidden activations. This penalty prevents the auto-encoder from learning to reconstruct all
possible points in the input space and focuses the expressive power of the auto-encoder on repre-
senting the data-manifold. Similarly, the contractive auto-encoder avoids trivial solutions by intro-
ducing an auxiliary penalty which measures the square Frobenius norm of the Jacobian of the latent
representation with respect to the inputs. This encourages a constant latent representation except
around training samples where it is counteracted by the reconstruction term. It has been noted in [3]
that these two approaches are strongly related. The contractive auto-encoder explicitly encourages
small entries in the Jacobian, whereas the sparse auto-encoder is encouraged to produce mostly zero
(sparse) activations which can be designed to correspond to mostly flat regions of the nonlinearity,
thus also yielding small entries in the Jacobian.
2.1 Saturating Auto-Encoder through Complementary Nonlinearities
Our goal is to introduce a simple new regularizer which explicitly raises reconstruction error for
inputs not near the data manifold. Consider activation functions with at least one flat region; these
include shrink, rectified linear, and saturated linear (Figure 1). Auto-encoders with such nonlineari-
ties lose their ability to accurately reconstruct inputs which produce activations in the zero-gradient
regions of their activation functions. Let us denote the auto-encoding function xr = G(x,W), x
being the input, W the trainable parameters in the auto-encoder, and xr the reconstruction. One can
define an energy surface through the reconstruction error:
EW (x) = ||x−G(x,W)||2
Let’s imagine that G has been trained to produce a low reconstruction error at a particular data
point x∗. If Gis constant when xvaries along a particular direction v, then the energy will grow
quadratically along that particular direction as xmoves away from x∗. If Gis trained to produce
low reconstruction errors on a set of samples while being subject to a regularizer that tries to make
it constant in as many directions as possible, then the reconstruction energy will act as a contrast
function that will take low values around areas of high data density and larger values everywhere
else (similarly to a negative log likelihood function for a density estimator).
The proposed auto-encoder is a simple implementation of this idea. Using the notation W =
{We,Be,Wd,Bd}, the auto-encoder function is defined as
G(x,W) = WdF(Wex+ Be) + Bd
where We, Be, Wd, and Bd are the encoding matrix, encoding bias, decoding matrix, and decoding
bias, respectively, and F is the vector function that applies the scalar function f to each of its
components. f will be designed to have ”flat spots”, i.e. regions where the derivative is zero (also
referred to as the saturation region).
The loss function minimized by training is the sum of the reconstruction energy EW (x) = ||x−
G(x,W)||2 and a term that pushes the components ofWex+ Be towards the flat spots of f. This is
performed through the use of a complementary functionfc, associated with the non-linearity f(z).
The basic idea is to design fc(z) so that its value corresponds to the distance of z to one of the
flat spots of f(z). Minimizing fc(z) will push z towards the flat spots of f(z). With this in mind,
we introduce a penalty of the form fc(∑d
j=1 We
ijxj + be
i ) which encourages the argument to be
in the saturation regime of the activation function ( f). We refer to auto-encoders which include
this regularizer as Saturating Auto-Encoders (SATAEs). For activation functions with zero-gradient
regime(s) the complementary nonlinearity (fc) can be defined as the distance to the nearest saturation
region. Specifically, let S = {z|f′(z) = 0}then we define fc(z) as:
2
Figure 1: Three nonlinearities (top) with their associated complementary regularization func-
tions(bottom).
fc(z) = inf
z′∈S
|z−z′|. (1)
Figure 1 shows three activation functions and their associated complementary nonlinearities. The
complete loss to be minimized by a SATAE with nonlinearityf is:
L=
∑
x∈D
1
2∥x−
(
WdF(Wex+ Be) + Bd)
∥2 + α
dh∑
i=1
fc(We
i x+ be
i ), (2)
where dh denotes the number of hidden units. The hyper-parameterαregulates the trade-off between
reconstruction and saturation.
3 Effect of the Saturation Regularizer
We will examine the effect of the saturation regularizer on auto-encoders with a variety of activation
functions. It will be shown that the choice of activation function is a significant factor in determining
the type of basis the SATAE learns. First, we will present results on toy data in two dimensions
followed by results on higher dimensional image data.
3.1 Visualizing the Energy Landscape
Given a trained auto-encoder the reconstruction error can be evaluated for a given input x. For
low-dimensional spaces (Rn, where n ≤3) we can evaluate the reconstruction error on a regular
grid in order to visualize the portions of the space which are well represented by the auto-encoder.
More specifically we can compute E(x) = 1
2 ∥x−xr∥2 for all xwithin some bounded region of
the input space. Ideally, the reconstruction energy will be low for all xwhich are in the training set
and high elsewhere. Figures 2 and 3 depict the resulting reconstruction energy for inputs x ∈R2,
and −1 ≤xi ≤1. Black corresponds to low reconstruction energy. The training data consists of
a one dimensional manifold shown overlain in yellow. Figure 2 shows a toy example for a SATAE
which uses ten basis vectors and a shrink activation function. Note that adding the saturation regu-
larizer decreases the volume of the space which is well reconstructed, however good reconstruction
is maintained on or near the training data manifold. The auto-encoder in Figure 3 contains two
3
Figure 2: Energy surfaces for unregularized (left), and regularized (right) solutions obtained on
SATAE-shrink and 10 basis vectors. Black corresponds to low reconstruction energy. Training
points lie on a one-dimensional manifold shown in yellow.
Figure 3: SATAE-SL toy example with two basis elements. Top Row: three randomly initialized so-
lutions obtained with no regularization. Bottom Row: three randomly initialized solutions obtained
with regularization.
encoding basis vectors (red), two decoding basis vectors (green), and uses a saturated-linear activa-
tion function. The encoding and decoding bases are unconstrained. The unregularized auto-encoder
learns an orthogonal basis with a random orientation. The region of the space which is well recon-
structed corresponds to the outer product of the linear regions of two activation functions; beyond
that the error increases quadratically with the distance. Including the saturation regularizer induces
the auto-encoder basis to align with the data and to operate in the saturation regime at the extreme
points of the training data, which limits the space which is well reconstructed. Note that because the
encoding and decoding weights are separate and unrestricted, the encoding weights were scaled up
to effectively reduce the width of the linear regime of the nonlinearity.
3.2 SATAE-shrink
Consider a SATAE with a shrink activation function and shrink parameter λ. The corresponding
complementary nonlinearity, derived using Equation 1 is given by:
shrinkc(x) =
{abs(x), |x|>λ
0, elsewhere .
Note that shrinkc(Wex+ be) = abs(shrink(Wex+ be)), which corresponds to an L1 penalty
on the activations. Thus this SATAE is equivalent to a sparse auto-encoder with a shrink activation
function. Given the equivalence to the sparse auto-encoder we anticipate the same scale ambiguity
which occurs with L1 regularization. This ambiguity can be avoided by normalizing the decoder
weights to unit norm. It is expected that the SATAE-shrink will learn similar features to those
obtained with a sparse auto-encoder, and indeed this is what we observe. Figure 4(c) shows the
decoder filters learned by an auto-encoder with shrink nonlinearity trained on gray-scale natural
image patches. One can recognize the expected Gabor-like features when the saturation penalty is
activated. When trained on the binary MNIST dataset the learned basis is comprised of portions of
digits and strokes. Nearly identical results are obtained with a SATAE which uses a rectified-linear
4
activation function. This is because a rectified-linear function with an encoding bias behaves as a
positive only shrink function, similarly the complementary function is equivalent to a positive only
L1 penalty on the activations.
3.3 SATAE-saturated-linear
Unlike the SATAE-shrink, which tries to compress the data by minimizing the number of active
elements; the SATAE saturated-linear (SATAE-SL) tries to compress the data by encouraging the
latent code to be as close to binary as possible. Without a saturation penalty this auto-encoder learns
to encode small groups of neighboring pixels. More precisely, the auto-encoder learns the identity
function on all datasets. An example of such a basis is shown in Figure 4(b). With this basis the
auto-encoder can perfectly reconstruct any input by producing small activations which stay within
the linear region of the nonlinearity. Introducing the saturation penalty does not have any effect
when training on binary MNIST. This is because the scaled identity basis is a global minimizer of
Equation 2 for the SATAE-SL on any binary dataset. Such a basis can perfectly reconstruct any
binary input while operating exclusively in the saturated regions of the activation function, thus
incurring no saturation penalty. On the other hand, introducing the saturation penalty when training
on natural image patches induces the SATAE-SL to learn a more varied basis (Figure 4(d)).
3.4 Experiments on CIFAR-10
SATAE auto-encoders with 100 and 300 basis elements were trained on the CIFAR-10 dataset,
which contains small color images of objects from ten categories. In all of our experiments the auto-
encoders were trained by progressively increasing the saturation penalty (details are provided in the
next section). This allowed us to visually track the effect of the saturation penalty on individual
basis elements. Figure 4(e)-(f) shows the basis learned by SATAE-shrink with small and large
saturation penalty, respectively. Increasing the saturation penalty has the expected effect of reducing
the number of nonzero activations. As the saturation penalty increases, active basis elements become
responsible for reconstructing a larger portion of the input. This induces the basis elements to
become less spatially localized. This effect can be seen by comparing corresponding filters in Figure
4(e) and (f). Figures 4(g)-(h) show the basis elements learned by SATAE-SL with small and large
saturation penalty, respectively. The basis learned by SATAE-SL with a small saturation penalty
resembles the identity basis, as expected (see previous subsection). Once the saturation penalty
is increased small activations become more heavily penalized. To increase their activations the
encoding basis elements may increase in magnitude or align themselves with the input. However, if
the encoding and decoding weights are tied (or fixed in magnitude) then reconstruction error would
increase if the weights were merely scaled up. Thus the basis elements are forced to align with the
data in a way that also facilitates reconstruction. This effect is illustrated in Figure 5 where filters
corresponding to progressively larger values of the regularization parameter are shown. The top
half of the figure shows how an element from the identity basis ( α= 0.1) transforms to a localized
edge (α= 0.5). The bottom half of the figure shows how a localized edge ( α= 0.5) progressively
transforms to a template of a horse (α= 1).
4 Experimental Details
Because the regularizer explicitly encourages activations in the zero gradient regime of the nonlin-
earity, many encoder basis elements would not be updated via back-propagation through the non-
linearity if the saturation penalty were large. In order to allow the basis elements to deviate from
their initial random states we found it necessary to progressively increase the saturation penalty. In
our experiments the weights obtained at a minimum of Equation 2 for a smaller value of α were
used to initialize the optimization for a larger value of α. Typically, the optimization began with
α = 0 and was progressively increased to α = 1 in steps of 0.1. The auto-encoder was trained for
30 epochs at each value of α. This approach also allowed us to track the evolution of basis elements
as a function of α(Figure 5). In all experiments data samples were normalized by subtracting the
mean and dividing by the standard deviation of the dataset. The auto-encoders used to obtain the
results shown in Figure 4 (a),(c)-(f) used 100 basis elements, others used 300 basis elements. In-
creasing the number of elements in the basis did not have a strong qualitative effect except to make
the features represented by the basis more localized. The decoder basis elements of the SATAEs with
5
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 4: Basis elements learned by the SATAE using different nonlinearities on: 28x28 binary
MNIST digits, 12x12 gray scale natural image patches, and CIFAR-10. (a) SATAE-shrink trained on
MNIST, (b) SATAE-saturated-linear trained on MNIST, (c) SATAE-shrink trained on natural image
patches, (d) SATAE-saturated-linear trained on natural image patches, (e)-(f) SATAE-shrink trained
on CIFAR-10 withα= 0.1 and α= 0.5, respectively, (g)-(h) SATAE-SL trained on CIFAR-10 with
α= 0.1 and α= 0.6, respectively. 6
Figure 5: Evolution of two filters with increasing saturation regularization for a SATAE-SL trained
on CIFAR-10. Filters corresponding to larger values of α were initialized using the filter corre-
sponding to the previous α. The regularization parameter was varied from 0.1 to 0.5 (left to right)
in the top five images and 0.5 to 1 in the bottom five
shrink and rectified-linear nonlinearities were reprojected to the unit sphere after every 10 stochastic
gradient updates. The SATAEs which used saturated-linear activation function were trained with
tied weights. All results presented were obtained using stochastic gradient descent with a constant
learning rate of 0.05.
5 Discussion
In this work we have introduced a general and conceptually simple latent state regularizer. It was
demonstrated that a variety of feature sets can be obtained using a single framework. The utility of
these features depend on the application. In this section we extend the definition of the saturation
regularizer to include functions without a zero-gradient region. The relationship of SATAEs with
other regularized auto-encoders will be discussed. We conclude with a discussion on future work.
5.1 Extension to Differentiable Functions
We would like to extend the saturation penalty definition (Equation 1) to differentiable functions
without a zero-gradient region. An appealing first guess for the complimentary function is some
positive function of the first derivative, fc(x) = |f′(x)|for instance. This may be an appropriate
choice for monotonic activation functions which have their lowest gradient regions at the extrema
(e.g. sigmoids). However some activation functions may contain regions of small or zero gradient
which have negligible extent, at the extrema for instance. We would like our definition of the com-
plimentary function to not only measure the local gradient in some region, but to also measure it’s
extent. For this purpose we employ the concept of average variation over a finite interval. We define
the average variation of f at xin the positive and negative directions at scale l, respectively as:
∆+
l f(x) = 1
l
∫ x+l
x
|f′(u)|du= |f′(x)|∗Π+
l (x)
∆−
l f(x) = 1
l
∫ x
x−l
|f′(u)|du= |f′(x)|∗Π−
l (x).
Where ∗denotes the continuous convolution operator. Π+
l (x) and Π−
l (x) are uniform averaging
kernels in the positive and negative directions, respectively. Next, define a directional measure of
variation of f by integrating the average variation at all scales.
7
Figure 6: Illustration of the complimentary function ( fc) as defined by Equation 3 for a non-
monotonic activation function (f). The absolute derivative of f is shown for comparison.
M+f(x) =
∫ +∞
0
∆+
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π+
l (x)dl
]
∗|f′(x)|
M−f(x) =
∫ +∞
0
∆−
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π−
l (x)dl
]
∗|f′(x)|.
Where w(l) is chosen to be a sufficiently fast decreasing function of l to insure convergence of
the integral. The integral with which |f′(x)|is convolved in the above equation evaluates to some
decreasing function of xfor Π+ with support x≥0. Similarly, the integral involving Π−evaluates
to some increasing function of x with support x ≤0. This function will depend on w(l). The
functions M+f(x) and M−f(x) measure the average variation off(x) at all scales lin the positive
and negative direction, respectively. We define the complimentary functionfc(x) as:
fc(x) = min(M+f(x),M−f(x)). (3)
An example of a complimentary function defined using the above formulation is shown in Figure 6.
Whereas |f′(x)|is minimized at the extrema off, the complimentary function only plateaus at these
locations.
5.2 Relationship with the Contractive Auto-Encoder
Let hi be the output of theith hidden unit of a single-layer auto-encoder with point-wise nonlinearity
f(·). The regularizer imposed by the contractive auto-encoder (CAE) can be expressed as follows:
∑
ij
(∂hi
∂xj
)2
=
dh∑
i
f′(
d∑
j=1
We
ijxj + bi)2∥We
i ∥2
,
where x is a d-dimensional data vector, f′(·) is the derivative of f(·), bi is the bias of the ith
encoding unit, andWe
i denotes the ith row of the encoding weight matrix. The first term in the above
equation tries to adjust the weights so as to push the activations into the low gradient (saturation)
regime of the nonlinearity, but is only defined for differentiable activation functions. Therefore the
CAE indirectly encourages operation in the saturation regime. Computing the Jacobian, however,
can be cumbersome for deep networks. Furthermore, the complexity of computing the Jacobian is
O(d×dh), although a more efficient implementation is possible [3], compared to the O(dh) for the
saturation penalty.
8
5.3 Relationship with the Sparse Auto-Encoder
In Section 3.2 it was shown that SATAEs with shrink or rectified-linear activation functions are
equivalent to a sparse auto-encoder. Interestingly, the fact that the saturation penalty happens to
correspond to L1 regularization in the case of SATAE-shrink agrees with the findings in [7]. In their
efforts to find an architecture to approximate inference in sparse coding, Gregor et al. found that
the shrink function is particularly compatible with L1 minimization. Equivalence to sparsity only
for some activation functions suggests that SATAEs are a generalization of sparse auto-encoders.
Like the sparsity penalty, the saturation penalty can be applied at any point in a deep network for the
same computational cost. However, unlike the sparsity penalty the saturation penalty is adapted to
the nonlinearity of the particular layer to which it is applied.
5.4 Future Work
We intend to experimentally demonstrate that the representations learned by SATAEs are useful as
features for learning common tasks such as classification and denoising. We will also address several
open questions, namely: (i) how to select (or learn) the width parameter (λ) of the nonlinearity, and
(ii) how to methodically constrain the weights. We will also explore SATAEs that use a wider class
of non-linearities and architectures.
References
[1] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra and Yann LeCun. Efficient Learn-
ing of Sparse Representations with an Energy- Based Model, in J. Platt et al. (Eds),Advances in
Neural Information Processing Systems (NIPS 2006), 19, MIT Press, 2006.
[2] Marc’Aurelio Ranzato, Fu-Jie Huang, Y-Lan Boureau and Yann LeCun: Unsupervised Learn-
ing of Invariant Feature Hierarchies with Applications to Object Recognition, Proc. Computer
Vision and Pattern Recognition Conference (CVPR’07), IEEE Press, 2007
[3] Rifai, S. and Vincent, P. and Muller, X. and Glorot, X. and Bengio, Y . Contractive auto-encoders:
Explicit invariance during feature extraction, Proceedings of the Twenty-eight International
Conference on Machine Learning, ICML 2011
[4] P. Vincent, H. Larochelle, Y . Bengio, P.A. Manzagol. Extracting and Composing Robust Fea-
tures with Denoising Autoencoders Proceedings of the 25th International Conference on Ma-
chine Learning (ICML’2008), 2008.
[5] R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley & Sons,
2001, pp. xx + 654, ISBN: 0-471-05669-3
[6] Olhausen, Bruno A.; Field, David J. (1997). Sparse Coding with an Overcomplete Basis Set: A
Strategy Employed by V1?. Vision Research 37 (23): 3311-3325.
[7] Karol Gregor and Yann LeCun: Learning Fast Approximations of Sparse Coding, Proc. Inter-
national Conference on Machine learning (ICML’10), 2010
[8] Guillaume Alain and Yoshua Bengio, What Regularized Auto-Encoders Learn from the Data
Generating Distribution. arXiv:1211.4246v3 [cs.LG]
9
|
Ross Goroshin, Yann LeCun
|
Unknown
| 2,013
|
{"id": "yGgjGkkbeFSbt", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358468100000, "tmdate": 1358468100000, "ddate": null, "number": 39, "content": {"title": "Saturating Auto-Encoder", "decision": "conferencePoster-iclr2013-conference", "abstract": "We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.", "pdf": "https://arxiv.org/abs/1301.3577", "paperhash": "goroshin|saturating_autoencoder", "keywords": [], "conflicts": [], "authors": ["Ross Goroshin", "Yann LeCun"], "authorids": ["rgoroshin@gmail.com", "ylecun@gmail.com"]}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rgoroshin@gmail.com"], "writers": []}
|
[Review]:
The revised paper is now available on arXiv.
|
Ross Goroshin
| null | null |
{"id": "UNlcNgK7BCN9v", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363840020000, "tmdate": 1363840020000, "ddate": null, "number": 6, "content": {"title": "", "review": "The revised paper is now available on arXiv."}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yGgjGkkbeFSbt", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ross Goroshin"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 1
}
| 0
| -2.27267
| 2.27267
| 0.00082
| 0.007108
| 0.00082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 0
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yGgjGkkbeFSbt
|
Saturating Auto-Encoder
|
We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.
|
Saturating Auto-Encoders
Rostislav Goroshin∗
Courant Institute of Mathematical Science
New York University
goroshin@cs.nyu.edu
Yann LeCun
Courant Institute of Mathematical Science
New York University
yann@cs.nyu.edu
Abstract
We introduce a simple new regularizer for auto-encoders whose hidden-unit ac-
tivation functions contain at least one zero-gradient (saturated) region. This reg-
ularizer explicitly encourages activations in the saturated region(s) of the corre-
sponding activation function. We call these Saturating Auto-Encoders (SATAE).
We show that the saturation regularizer explicitly limits the SATAE’s ability to
reconstruct inputs which are not near the data manifold. Furthermore, we show
that a wide variety of features can be learned when different activation functions
are used. Finally, connections are established with the Contractive and Sparse
Auto-Encoders.
1 Introduction
An auto-encoder is a conceptually simple neural network used for obtaining useful data rep-
resentations through unsupervised training. It is composed of an encoder which outputs a
hidden (or latent) representation and a decoder which attempts to reconstruct the input using
the hidden representation as its input. Training consists of minimizing a reconstruction cost
such as L2 error. However this cost is merely a proxy for the true objective: to obtain a useful
latent representation. Auto-encoders can implement many dimensionality reduction techniques
such as PCA and Sparse Coding (SC) [5] [6] [7]. This makes the study of auto-encoders very
appealing from a theoretical standpoint. In recent years, renewed interest in auto-encoders net-
works has mainly been due to their empirical success in unsupervised feature learning [1] [2] [3] [4].
When minimizing only reconstruction cost, the standard auto-encoder does not typically learn any
meaningful hidden representation of the data. Well known theoretical and experimental results
show that a linear auto-encoder with trainable encoding and decoding matrices, We and Wd re-
spectively, learns the identity function if We and Wd are full rank or over-complete. The linear
auto-encoder learns the principle variance directions (PCA) if We and Wd are rank deficient [5].
It has been observed that other representations can be obtained by regularizing the latent repre-
sentation. This approach is exemplified by the Contractive and Sparse Auto-Encoders [3] [1] [2].
Intuitively, an auto-encoder with limited capacity will focus its resources on reconstructing portions
of the input space in which data samples occur most frequently. From an energy based perspective,
auto-encoders achieve low reconstruction cost in portions of the input space with high data density
(recently, [8] has examined this perspective in depth). If the data occupies some low dimensional
manifold in the higher dimensional input space then minimizing reconstruction error achieves low
energy on this manifold. Useful latent state regularizers raise the energy of points that do not lie
on the manifold, thus playing an analogous role to minimizing the partition function in maximum
likelihood models. In this work we introduce a new type of regularizer that does this explicitly for
∗The authors thank Joan Bruna and David Eigen for their useful suggestions and comments.
1
arXiv:1301.3577v3 [cs.LG] 20 Mar 2013
auto-encoders with a non-linearity that contains at least one flat (zero gradient) region. We show ex-
amples where this regularizer and the choice of nonlinearity determine the feature set that is learned
by the auto-encoder.
2 Latent State Regularization
Several auto-encoder variants which regularize their latent states have been proposed, they include
the sparse auto-encoder and the contractive auto-encoder [1] [2] [3]. The sparse auto-encoder in-
cludes an over-complete basis in the encoder and imposes a sparsity inducing (usually L1) penalty
on the hidden activations. This penalty prevents the auto-encoder from learning to reconstruct all
possible points in the input space and focuses the expressive power of the auto-encoder on repre-
senting the data-manifold. Similarly, the contractive auto-encoder avoids trivial solutions by intro-
ducing an auxiliary penalty which measures the square Frobenius norm of the Jacobian of the latent
representation with respect to the inputs. This encourages a constant latent representation except
around training samples where it is counteracted by the reconstruction term. It has been noted in [3]
that these two approaches are strongly related. The contractive auto-encoder explicitly encourages
small entries in the Jacobian, whereas the sparse auto-encoder is encouraged to produce mostly zero
(sparse) activations which can be designed to correspond to mostly flat regions of the nonlinearity,
thus also yielding small entries in the Jacobian.
2.1 Saturating Auto-Encoder through Complementary Nonlinearities
Our goal is to introduce a simple new regularizer which explicitly raises reconstruction error for
inputs not near the data manifold. Consider activation functions with at least one flat region; these
include shrink, rectified linear, and saturated linear (Figure 1). Auto-encoders with such nonlineari-
ties lose their ability to accurately reconstruct inputs which produce activations in the zero-gradient
regions of their activation functions. Let us denote the auto-encoding function xr = G(x,W), x
being the input, W the trainable parameters in the auto-encoder, and xr the reconstruction. One can
define an energy surface through the reconstruction error:
EW (x) = ||x−G(x,W)||2
Let’s imagine that G has been trained to produce a low reconstruction error at a particular data
point x∗. If Gis constant when xvaries along a particular direction v, then the energy will grow
quadratically along that particular direction as xmoves away from x∗. If Gis trained to produce
low reconstruction errors on a set of samples while being subject to a regularizer that tries to make
it constant in as many directions as possible, then the reconstruction energy will act as a contrast
function that will take low values around areas of high data density and larger values everywhere
else (similarly to a negative log likelihood function for a density estimator).
The proposed auto-encoder is a simple implementation of this idea. Using the notation W =
{We,Be,Wd,Bd}, the auto-encoder function is defined as
G(x,W) = WdF(Wex+ Be) + Bd
where We, Be, Wd, and Bd are the encoding matrix, encoding bias, decoding matrix, and decoding
bias, respectively, and F is the vector function that applies the scalar function f to each of its
components. f will be designed to have ”flat spots”, i.e. regions where the derivative is zero (also
referred to as the saturation region).
The loss function minimized by training is the sum of the reconstruction energy EW (x) = ||x−
G(x,W)||2 and a term that pushes the components ofWex+ Be towards the flat spots of f. This is
performed through the use of a complementary functionfc, associated with the non-linearity f(z).
The basic idea is to design fc(z) so that its value corresponds to the distance of z to one of the
flat spots of f(z). Minimizing fc(z) will push z towards the flat spots of f(z). With this in mind,
we introduce a penalty of the form fc(∑d
j=1 We
ijxj + be
i ) which encourages the argument to be
in the saturation regime of the activation function ( f). We refer to auto-encoders which include
this regularizer as Saturating Auto-Encoders (SATAEs). For activation functions with zero-gradient
regime(s) the complementary nonlinearity (fc) can be defined as the distance to the nearest saturation
region. Specifically, let S = {z|f′(z) = 0}then we define fc(z) as:
2
Figure 1: Three nonlinearities (top) with their associated complementary regularization func-
tions(bottom).
fc(z) = inf
z′∈S
|z−z′|. (1)
Figure 1 shows three activation functions and their associated complementary nonlinearities. The
complete loss to be minimized by a SATAE with nonlinearityf is:
L=
∑
x∈D
1
2∥x−
(
WdF(Wex+ Be) + Bd)
∥2 + α
dh∑
i=1
fc(We
i x+ be
i ), (2)
where dh denotes the number of hidden units. The hyper-parameterαregulates the trade-off between
reconstruction and saturation.
3 Effect of the Saturation Regularizer
We will examine the effect of the saturation regularizer on auto-encoders with a variety of activation
functions. It will be shown that the choice of activation function is a significant factor in determining
the type of basis the SATAE learns. First, we will present results on toy data in two dimensions
followed by results on higher dimensional image data.
3.1 Visualizing the Energy Landscape
Given a trained auto-encoder the reconstruction error can be evaluated for a given input x. For
low-dimensional spaces (Rn, where n ≤3) we can evaluate the reconstruction error on a regular
grid in order to visualize the portions of the space which are well represented by the auto-encoder.
More specifically we can compute E(x) = 1
2 ∥x−xr∥2 for all xwithin some bounded region of
the input space. Ideally, the reconstruction energy will be low for all xwhich are in the training set
and high elsewhere. Figures 2 and 3 depict the resulting reconstruction energy for inputs x ∈R2,
and −1 ≤xi ≤1. Black corresponds to low reconstruction energy. The training data consists of
a one dimensional manifold shown overlain in yellow. Figure 2 shows a toy example for a SATAE
which uses ten basis vectors and a shrink activation function. Note that adding the saturation regu-
larizer decreases the volume of the space which is well reconstructed, however good reconstruction
is maintained on or near the training data manifold. The auto-encoder in Figure 3 contains two
3
Figure 2: Energy surfaces for unregularized (left), and regularized (right) solutions obtained on
SATAE-shrink and 10 basis vectors. Black corresponds to low reconstruction energy. Training
points lie on a one-dimensional manifold shown in yellow.
Figure 3: SATAE-SL toy example with two basis elements. Top Row: three randomly initialized so-
lutions obtained with no regularization. Bottom Row: three randomly initialized solutions obtained
with regularization.
encoding basis vectors (red), two decoding basis vectors (green), and uses a saturated-linear activa-
tion function. The encoding and decoding bases are unconstrained. The unregularized auto-encoder
learns an orthogonal basis with a random orientation. The region of the space which is well recon-
structed corresponds to the outer product of the linear regions of two activation functions; beyond
that the error increases quadratically with the distance. Including the saturation regularizer induces
the auto-encoder basis to align with the data and to operate in the saturation regime at the extreme
points of the training data, which limits the space which is well reconstructed. Note that because the
encoding and decoding weights are separate and unrestricted, the encoding weights were scaled up
to effectively reduce the width of the linear regime of the nonlinearity.
3.2 SATAE-shrink
Consider a SATAE with a shrink activation function and shrink parameter λ. The corresponding
complementary nonlinearity, derived using Equation 1 is given by:
shrinkc(x) =
{abs(x), |x|>λ
0, elsewhere .
Note that shrinkc(Wex+ be) = abs(shrink(Wex+ be)), which corresponds to an L1 penalty
on the activations. Thus this SATAE is equivalent to a sparse auto-encoder with a shrink activation
function. Given the equivalence to the sparse auto-encoder we anticipate the same scale ambiguity
which occurs with L1 regularization. This ambiguity can be avoided by normalizing the decoder
weights to unit norm. It is expected that the SATAE-shrink will learn similar features to those
obtained with a sparse auto-encoder, and indeed this is what we observe. Figure 4(c) shows the
decoder filters learned by an auto-encoder with shrink nonlinearity trained on gray-scale natural
image patches. One can recognize the expected Gabor-like features when the saturation penalty is
activated. When trained on the binary MNIST dataset the learned basis is comprised of portions of
digits and strokes. Nearly identical results are obtained with a SATAE which uses a rectified-linear
4
activation function. This is because a rectified-linear function with an encoding bias behaves as a
positive only shrink function, similarly the complementary function is equivalent to a positive only
L1 penalty on the activations.
3.3 SATAE-saturated-linear
Unlike the SATAE-shrink, which tries to compress the data by minimizing the number of active
elements; the SATAE saturated-linear (SATAE-SL) tries to compress the data by encouraging the
latent code to be as close to binary as possible. Without a saturation penalty this auto-encoder learns
to encode small groups of neighboring pixels. More precisely, the auto-encoder learns the identity
function on all datasets. An example of such a basis is shown in Figure 4(b). With this basis the
auto-encoder can perfectly reconstruct any input by producing small activations which stay within
the linear region of the nonlinearity. Introducing the saturation penalty does not have any effect
when training on binary MNIST. This is because the scaled identity basis is a global minimizer of
Equation 2 for the SATAE-SL on any binary dataset. Such a basis can perfectly reconstruct any
binary input while operating exclusively in the saturated regions of the activation function, thus
incurring no saturation penalty. On the other hand, introducing the saturation penalty when training
on natural image patches induces the SATAE-SL to learn a more varied basis (Figure 4(d)).
3.4 Experiments on CIFAR-10
SATAE auto-encoders with 100 and 300 basis elements were trained on the CIFAR-10 dataset,
which contains small color images of objects from ten categories. In all of our experiments the auto-
encoders were trained by progressively increasing the saturation penalty (details are provided in the
next section). This allowed us to visually track the effect of the saturation penalty on individual
basis elements. Figure 4(e)-(f) shows the basis learned by SATAE-shrink with small and large
saturation penalty, respectively. Increasing the saturation penalty has the expected effect of reducing
the number of nonzero activations. As the saturation penalty increases, active basis elements become
responsible for reconstructing a larger portion of the input. This induces the basis elements to
become less spatially localized. This effect can be seen by comparing corresponding filters in Figure
4(e) and (f). Figures 4(g)-(h) show the basis elements learned by SATAE-SL with small and large
saturation penalty, respectively. The basis learned by SATAE-SL with a small saturation penalty
resembles the identity basis, as expected (see previous subsection). Once the saturation penalty
is increased small activations become more heavily penalized. To increase their activations the
encoding basis elements may increase in magnitude or align themselves with the input. However, if
the encoding and decoding weights are tied (or fixed in magnitude) then reconstruction error would
increase if the weights were merely scaled up. Thus the basis elements are forced to align with the
data in a way that also facilitates reconstruction. This effect is illustrated in Figure 5 where filters
corresponding to progressively larger values of the regularization parameter are shown. The top
half of the figure shows how an element from the identity basis ( α= 0.1) transforms to a localized
edge (α= 0.5). The bottom half of the figure shows how a localized edge ( α= 0.5) progressively
transforms to a template of a horse (α= 1).
4 Experimental Details
Because the regularizer explicitly encourages activations in the zero gradient regime of the nonlin-
earity, many encoder basis elements would not be updated via back-propagation through the non-
linearity if the saturation penalty were large. In order to allow the basis elements to deviate from
their initial random states we found it necessary to progressively increase the saturation penalty. In
our experiments the weights obtained at a minimum of Equation 2 for a smaller value of α were
used to initialize the optimization for a larger value of α. Typically, the optimization began with
α = 0 and was progressively increased to α = 1 in steps of 0.1. The auto-encoder was trained for
30 epochs at each value of α. This approach also allowed us to track the evolution of basis elements
as a function of α(Figure 5). In all experiments data samples were normalized by subtracting the
mean and dividing by the standard deviation of the dataset. The auto-encoders used to obtain the
results shown in Figure 4 (a),(c)-(f) used 100 basis elements, others used 300 basis elements. In-
creasing the number of elements in the basis did not have a strong qualitative effect except to make
the features represented by the basis more localized. The decoder basis elements of the SATAEs with
5
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 4: Basis elements learned by the SATAE using different nonlinearities on: 28x28 binary
MNIST digits, 12x12 gray scale natural image patches, and CIFAR-10. (a) SATAE-shrink trained on
MNIST, (b) SATAE-saturated-linear trained on MNIST, (c) SATAE-shrink trained on natural image
patches, (d) SATAE-saturated-linear trained on natural image patches, (e)-(f) SATAE-shrink trained
on CIFAR-10 withα= 0.1 and α= 0.5, respectively, (g)-(h) SATAE-SL trained on CIFAR-10 with
α= 0.1 and α= 0.6, respectively. 6
Figure 5: Evolution of two filters with increasing saturation regularization for a SATAE-SL trained
on CIFAR-10. Filters corresponding to larger values of α were initialized using the filter corre-
sponding to the previous α. The regularization parameter was varied from 0.1 to 0.5 (left to right)
in the top five images and 0.5 to 1 in the bottom five
shrink and rectified-linear nonlinearities were reprojected to the unit sphere after every 10 stochastic
gradient updates. The SATAEs which used saturated-linear activation function were trained with
tied weights. All results presented were obtained using stochastic gradient descent with a constant
learning rate of 0.05.
5 Discussion
In this work we have introduced a general and conceptually simple latent state regularizer. It was
demonstrated that a variety of feature sets can be obtained using a single framework. The utility of
these features depend on the application. In this section we extend the definition of the saturation
regularizer to include functions without a zero-gradient region. The relationship of SATAEs with
other regularized auto-encoders will be discussed. We conclude with a discussion on future work.
5.1 Extension to Differentiable Functions
We would like to extend the saturation penalty definition (Equation 1) to differentiable functions
without a zero-gradient region. An appealing first guess for the complimentary function is some
positive function of the first derivative, fc(x) = |f′(x)|for instance. This may be an appropriate
choice for monotonic activation functions which have their lowest gradient regions at the extrema
(e.g. sigmoids). However some activation functions may contain regions of small or zero gradient
which have negligible extent, at the extrema for instance. We would like our definition of the com-
plimentary function to not only measure the local gradient in some region, but to also measure it’s
extent. For this purpose we employ the concept of average variation over a finite interval. We define
the average variation of f at xin the positive and negative directions at scale l, respectively as:
∆+
l f(x) = 1
l
∫ x+l
x
|f′(u)|du= |f′(x)|∗Π+
l (x)
∆−
l f(x) = 1
l
∫ x
x−l
|f′(u)|du= |f′(x)|∗Π−
l (x).
Where ∗denotes the continuous convolution operator. Π+
l (x) and Π−
l (x) are uniform averaging
kernels in the positive and negative directions, respectively. Next, define a directional measure of
variation of f by integrating the average variation at all scales.
7
Figure 6: Illustration of the complimentary function ( fc) as defined by Equation 3 for a non-
monotonic activation function (f). The absolute derivative of f is shown for comparison.
M+f(x) =
∫ +∞
0
∆+
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π+
l (x)dl
]
∗|f′(x)|
M−f(x) =
∫ +∞
0
∆−
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π−
l (x)dl
]
∗|f′(x)|.
Where w(l) is chosen to be a sufficiently fast decreasing function of l to insure convergence of
the integral. The integral with which |f′(x)|is convolved in the above equation evaluates to some
decreasing function of xfor Π+ with support x≥0. Similarly, the integral involving Π−evaluates
to some increasing function of x with support x ≤0. This function will depend on w(l). The
functions M+f(x) and M−f(x) measure the average variation off(x) at all scales lin the positive
and negative direction, respectively. We define the complimentary functionfc(x) as:
fc(x) = min(M+f(x),M−f(x)). (3)
An example of a complimentary function defined using the above formulation is shown in Figure 6.
Whereas |f′(x)|is minimized at the extrema off, the complimentary function only plateaus at these
locations.
5.2 Relationship with the Contractive Auto-Encoder
Let hi be the output of theith hidden unit of a single-layer auto-encoder with point-wise nonlinearity
f(·). The regularizer imposed by the contractive auto-encoder (CAE) can be expressed as follows:
∑
ij
(∂hi
∂xj
)2
=
dh∑
i
f′(
d∑
j=1
We
ijxj + bi)2∥We
i ∥2
,
where x is a d-dimensional data vector, f′(·) is the derivative of f(·), bi is the bias of the ith
encoding unit, andWe
i denotes the ith row of the encoding weight matrix. The first term in the above
equation tries to adjust the weights so as to push the activations into the low gradient (saturation)
regime of the nonlinearity, but is only defined for differentiable activation functions. Therefore the
CAE indirectly encourages operation in the saturation regime. Computing the Jacobian, however,
can be cumbersome for deep networks. Furthermore, the complexity of computing the Jacobian is
O(d×dh), although a more efficient implementation is possible [3], compared to the O(dh) for the
saturation penalty.
8
5.3 Relationship with the Sparse Auto-Encoder
In Section 3.2 it was shown that SATAEs with shrink or rectified-linear activation functions are
equivalent to a sparse auto-encoder. Interestingly, the fact that the saturation penalty happens to
correspond to L1 regularization in the case of SATAE-shrink agrees with the findings in [7]. In their
efforts to find an architecture to approximate inference in sparse coding, Gregor et al. found that
the shrink function is particularly compatible with L1 minimization. Equivalence to sparsity only
for some activation functions suggests that SATAEs are a generalization of sparse auto-encoders.
Like the sparsity penalty, the saturation penalty can be applied at any point in a deep network for the
same computational cost. However, unlike the sparsity penalty the saturation penalty is adapted to
the nonlinearity of the particular layer to which it is applied.
5.4 Future Work
We intend to experimentally demonstrate that the representations learned by SATAEs are useful as
features for learning common tasks such as classification and denoising. We will also address several
open questions, namely: (i) how to select (or learn) the width parameter (λ) of the nonlinearity, and
(ii) how to methodically constrain the weights. We will also explore SATAEs that use a wider class
of non-linearities and architectures.
References
[1] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra and Yann LeCun. Efficient Learn-
ing of Sparse Representations with an Energy- Based Model, in J. Platt et al. (Eds),Advances in
Neural Information Processing Systems (NIPS 2006), 19, MIT Press, 2006.
[2] Marc’Aurelio Ranzato, Fu-Jie Huang, Y-Lan Boureau and Yann LeCun: Unsupervised Learn-
ing of Invariant Feature Hierarchies with Applications to Object Recognition, Proc. Computer
Vision and Pattern Recognition Conference (CVPR’07), IEEE Press, 2007
[3] Rifai, S. and Vincent, P. and Muller, X. and Glorot, X. and Bengio, Y . Contractive auto-encoders:
Explicit invariance during feature extraction, Proceedings of the Twenty-eight International
Conference on Machine Learning, ICML 2011
[4] P. Vincent, H. Larochelle, Y . Bengio, P.A. Manzagol. Extracting and Composing Robust Fea-
tures with Denoising Autoencoders Proceedings of the 25th International Conference on Ma-
chine Learning (ICML’2008), 2008.
[5] R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley & Sons,
2001, pp. xx + 654, ISBN: 0-471-05669-3
[6] Olhausen, Bruno A.; Field, David J. (1997). Sparse Coding with an Overcomplete Basis Set: A
Strategy Employed by V1?. Vision Research 37 (23): 3311-3325.
[7] Karol Gregor and Yann LeCun: Learning Fast Approximations of Sparse Coding, Proc. Inter-
national Conference on Machine learning (ICML’10), 2010
[8] Guillaume Alain and Yoshua Bengio, What Regularized Auto-Encoders Learn from the Data
Generating Distribution. arXiv:1211.4246v3 [cs.LG]
9
|
Ross Goroshin, Yann LeCun
|
Unknown
| 2,013
|
{"id": "yGgjGkkbeFSbt", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358468100000, "tmdate": 1358468100000, "ddate": null, "number": 39, "content": {"title": "Saturating Auto-Encoder", "decision": "conferencePoster-iclr2013-conference", "abstract": "We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.", "pdf": "https://arxiv.org/abs/1301.3577", "paperhash": "goroshin|saturating_autoencoder", "keywords": [], "conflicts": [], "authors": ["Ross Goroshin", "Yann LeCun"], "authorids": ["rgoroshin@gmail.com", "ylecun@gmail.com"]}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rgoroshin@gmail.com"], "writers": []}
|
[Review]:
This paper proposes a novel kind of penalty for regularizing autoencoder training, that encourages activations to move towards flat (saturated) regions of the unit's activation function. It is related to sparse autoencoders and contractive autoencoders that also happen to encourage saturation. But the proposed approach does so more directly and explicitly, through a 'complementary nonlinerity' that depends on the specific activation function chosen.
Pros:
+ a novel and original regularization principle for autoencoders that relates to earlier approaches, but is, from a certain perspective, more general (at least for a specific subclass of activation functions).
+ paper yields significant insight into the mechanism at work in such regularized autoencoders also clearly relating it to sparsity and contractive penalties.
+ provides a credible path of explanation for the dramatic effect that the choice of different saturating activation functions has on the learned filters, and qualitatively shows it.
Cons:
- Proposed regularization principle, as currently defined, only seems to make sense for activation functions that are piecewise linear and have some perfectly flat regions (e.g. a sigmoid activation would yield no penalty!) This should be discussed.
- There is no quantitative measure of the usefulness of the representation learned with this principle. The usual comparison of classification or denoising performance based on the learned features, with those obtained with other autoencoder regularization principles would be a most welcome addition.
|
anonymous reviewer 5955
| null | null |
{"id": "NNd3mgfs39NaH", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362361200000, "tmdate": 1362361200000, "ddate": null, "number": 4, "content": {"title": "review of Saturating Auto-Encoder", "review": "This paper proposes a novel kind of penalty for regularizing autoencoder training, that encourages activations to move towards flat (saturated) regions of the unit's activation function. It is related to sparse autoencoders and contractive autoencoders that also happen to encourage saturation. But the proposed approach does so more directly and explicitly, through a 'complementary nonlinerity' that depends on the specific activation function chosen. \r\n\r\nPros:\r\n+ a novel and original regularization principle for autoencoders that relates to earlier approaches, but is, from a certain perspective, more general (at least for a specific subclass of activation functions). \r\n+ paper yields significant insight into the mechanism at work in such regularized autoencoders also clearly relating it to sparsity and contractive penalties. \r\n+ provides a credible path of explanation for the dramatic effect that the choice of different saturating activation functions has on the learned filters, and qualitatively shows it.\r\n\r\nCons:\r\n- Proposed regularization principle, as currently defined, only seems to make sense for activation functions that are piecewise linear and have some perfectly flat regions (e.g. a sigmoid activation would yield no penalty!) This should be discussed.\r\n- There is no quantitative measure of the usefulness of the representation learned with this principle. The usual comparison of classification or denoising performance based on the learned features, with those obtained with other autoencoder regularization principles would be a most welcome addition."}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yGgjGkkbeFSbt", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 5955"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 4,
"materials_and_methods": 6,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 4,
"suggestion_and_solution": 2,
"total": 11
}
| 1.818182
| 1.755052
| 0.06313
| 1.843334
| 0.299886
| 0.025152
| 0.090909
| 0
| 0.363636
| 0.545455
| 0.181818
| 0.090909
| 0.363636
| 0.181818
|
{
"criticism": 0.09090909090909091,
"example": 0,
"importance_and_relevance": 0.36363636363636365,
"materials_and_methods": 0.5454545454545454,
"praise": 0.18181818181818182,
"presentation_and_reporting": 0.09090909090909091,
"results_and_discussion": 0.36363636363636365,
"suggestion_and_solution": 0.18181818181818182
}
| 1.818182
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
yGgjGkkbeFSbt
|
Saturating Auto-Encoder
|
We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.
|
Saturating Auto-Encoders
Rostislav Goroshin∗
Courant Institute of Mathematical Science
New York University
goroshin@cs.nyu.edu
Yann LeCun
Courant Institute of Mathematical Science
New York University
yann@cs.nyu.edu
Abstract
We introduce a simple new regularizer for auto-encoders whose hidden-unit ac-
tivation functions contain at least one zero-gradient (saturated) region. This reg-
ularizer explicitly encourages activations in the saturated region(s) of the corre-
sponding activation function. We call these Saturating Auto-Encoders (SATAE).
We show that the saturation regularizer explicitly limits the SATAE’s ability to
reconstruct inputs which are not near the data manifold. Furthermore, we show
that a wide variety of features can be learned when different activation functions
are used. Finally, connections are established with the Contractive and Sparse
Auto-Encoders.
1 Introduction
An auto-encoder is a conceptually simple neural network used for obtaining useful data rep-
resentations through unsupervised training. It is composed of an encoder which outputs a
hidden (or latent) representation and a decoder which attempts to reconstruct the input using
the hidden representation as its input. Training consists of minimizing a reconstruction cost
such as L2 error. However this cost is merely a proxy for the true objective: to obtain a useful
latent representation. Auto-encoders can implement many dimensionality reduction techniques
such as PCA and Sparse Coding (SC) [5] [6] [7]. This makes the study of auto-encoders very
appealing from a theoretical standpoint. In recent years, renewed interest in auto-encoders net-
works has mainly been due to their empirical success in unsupervised feature learning [1] [2] [3] [4].
When minimizing only reconstruction cost, the standard auto-encoder does not typically learn any
meaningful hidden representation of the data. Well known theoretical and experimental results
show that a linear auto-encoder with trainable encoding and decoding matrices, We and Wd re-
spectively, learns the identity function if We and Wd are full rank or over-complete. The linear
auto-encoder learns the principle variance directions (PCA) if We and Wd are rank deficient [5].
It has been observed that other representations can be obtained by regularizing the latent repre-
sentation. This approach is exemplified by the Contractive and Sparse Auto-Encoders [3] [1] [2].
Intuitively, an auto-encoder with limited capacity will focus its resources on reconstructing portions
of the input space in which data samples occur most frequently. From an energy based perspective,
auto-encoders achieve low reconstruction cost in portions of the input space with high data density
(recently, [8] has examined this perspective in depth). If the data occupies some low dimensional
manifold in the higher dimensional input space then minimizing reconstruction error achieves low
energy on this manifold. Useful latent state regularizers raise the energy of points that do not lie
on the manifold, thus playing an analogous role to minimizing the partition function in maximum
likelihood models. In this work we introduce a new type of regularizer that does this explicitly for
∗The authors thank Joan Bruna and David Eigen for their useful suggestions and comments.
1
arXiv:1301.3577v3 [cs.LG] 20 Mar 2013
auto-encoders with a non-linearity that contains at least one flat (zero gradient) region. We show ex-
amples where this regularizer and the choice of nonlinearity determine the feature set that is learned
by the auto-encoder.
2 Latent State Regularization
Several auto-encoder variants which regularize their latent states have been proposed, they include
the sparse auto-encoder and the contractive auto-encoder [1] [2] [3]. The sparse auto-encoder in-
cludes an over-complete basis in the encoder and imposes a sparsity inducing (usually L1) penalty
on the hidden activations. This penalty prevents the auto-encoder from learning to reconstruct all
possible points in the input space and focuses the expressive power of the auto-encoder on repre-
senting the data-manifold. Similarly, the contractive auto-encoder avoids trivial solutions by intro-
ducing an auxiliary penalty which measures the square Frobenius norm of the Jacobian of the latent
representation with respect to the inputs. This encourages a constant latent representation except
around training samples where it is counteracted by the reconstruction term. It has been noted in [3]
that these two approaches are strongly related. The contractive auto-encoder explicitly encourages
small entries in the Jacobian, whereas the sparse auto-encoder is encouraged to produce mostly zero
(sparse) activations which can be designed to correspond to mostly flat regions of the nonlinearity,
thus also yielding small entries in the Jacobian.
2.1 Saturating Auto-Encoder through Complementary Nonlinearities
Our goal is to introduce a simple new regularizer which explicitly raises reconstruction error for
inputs not near the data manifold. Consider activation functions with at least one flat region; these
include shrink, rectified linear, and saturated linear (Figure 1). Auto-encoders with such nonlineari-
ties lose their ability to accurately reconstruct inputs which produce activations in the zero-gradient
regions of their activation functions. Let us denote the auto-encoding function xr = G(x,W), x
being the input, W the trainable parameters in the auto-encoder, and xr the reconstruction. One can
define an energy surface through the reconstruction error:
EW (x) = ||x−G(x,W)||2
Let’s imagine that G has been trained to produce a low reconstruction error at a particular data
point x∗. If Gis constant when xvaries along a particular direction v, then the energy will grow
quadratically along that particular direction as xmoves away from x∗. If Gis trained to produce
low reconstruction errors on a set of samples while being subject to a regularizer that tries to make
it constant in as many directions as possible, then the reconstruction energy will act as a contrast
function that will take low values around areas of high data density and larger values everywhere
else (similarly to a negative log likelihood function for a density estimator).
The proposed auto-encoder is a simple implementation of this idea. Using the notation W =
{We,Be,Wd,Bd}, the auto-encoder function is defined as
G(x,W) = WdF(Wex+ Be) + Bd
where We, Be, Wd, and Bd are the encoding matrix, encoding bias, decoding matrix, and decoding
bias, respectively, and F is the vector function that applies the scalar function f to each of its
components. f will be designed to have ”flat spots”, i.e. regions where the derivative is zero (also
referred to as the saturation region).
The loss function minimized by training is the sum of the reconstruction energy EW (x) = ||x−
G(x,W)||2 and a term that pushes the components ofWex+ Be towards the flat spots of f. This is
performed through the use of a complementary functionfc, associated with the non-linearity f(z).
The basic idea is to design fc(z) so that its value corresponds to the distance of z to one of the
flat spots of f(z). Minimizing fc(z) will push z towards the flat spots of f(z). With this in mind,
we introduce a penalty of the form fc(∑d
j=1 We
ijxj + be
i ) which encourages the argument to be
in the saturation regime of the activation function ( f). We refer to auto-encoders which include
this regularizer as Saturating Auto-Encoders (SATAEs). For activation functions with zero-gradient
regime(s) the complementary nonlinearity (fc) can be defined as the distance to the nearest saturation
region. Specifically, let S = {z|f′(z) = 0}then we define fc(z) as:
2
Figure 1: Three nonlinearities (top) with their associated complementary regularization func-
tions(bottom).
fc(z) = inf
z′∈S
|z−z′|. (1)
Figure 1 shows three activation functions and their associated complementary nonlinearities. The
complete loss to be minimized by a SATAE with nonlinearityf is:
L=
∑
x∈D
1
2∥x−
(
WdF(Wex+ Be) + Bd)
∥2 + α
dh∑
i=1
fc(We
i x+ be
i ), (2)
where dh denotes the number of hidden units. The hyper-parameterαregulates the trade-off between
reconstruction and saturation.
3 Effect of the Saturation Regularizer
We will examine the effect of the saturation regularizer on auto-encoders with a variety of activation
functions. It will be shown that the choice of activation function is a significant factor in determining
the type of basis the SATAE learns. First, we will present results on toy data in two dimensions
followed by results on higher dimensional image data.
3.1 Visualizing the Energy Landscape
Given a trained auto-encoder the reconstruction error can be evaluated for a given input x. For
low-dimensional spaces (Rn, where n ≤3) we can evaluate the reconstruction error on a regular
grid in order to visualize the portions of the space which are well represented by the auto-encoder.
More specifically we can compute E(x) = 1
2 ∥x−xr∥2 for all xwithin some bounded region of
the input space. Ideally, the reconstruction energy will be low for all xwhich are in the training set
and high elsewhere. Figures 2 and 3 depict the resulting reconstruction energy for inputs x ∈R2,
and −1 ≤xi ≤1. Black corresponds to low reconstruction energy. The training data consists of
a one dimensional manifold shown overlain in yellow. Figure 2 shows a toy example for a SATAE
which uses ten basis vectors and a shrink activation function. Note that adding the saturation regu-
larizer decreases the volume of the space which is well reconstructed, however good reconstruction
is maintained on or near the training data manifold. The auto-encoder in Figure 3 contains two
3
Figure 2: Energy surfaces for unregularized (left), and regularized (right) solutions obtained on
SATAE-shrink and 10 basis vectors. Black corresponds to low reconstruction energy. Training
points lie on a one-dimensional manifold shown in yellow.
Figure 3: SATAE-SL toy example with two basis elements. Top Row: three randomly initialized so-
lutions obtained with no regularization. Bottom Row: three randomly initialized solutions obtained
with regularization.
encoding basis vectors (red), two decoding basis vectors (green), and uses a saturated-linear activa-
tion function. The encoding and decoding bases are unconstrained. The unregularized auto-encoder
learns an orthogonal basis with a random orientation. The region of the space which is well recon-
structed corresponds to the outer product of the linear regions of two activation functions; beyond
that the error increases quadratically with the distance. Including the saturation regularizer induces
the auto-encoder basis to align with the data and to operate in the saturation regime at the extreme
points of the training data, which limits the space which is well reconstructed. Note that because the
encoding and decoding weights are separate and unrestricted, the encoding weights were scaled up
to effectively reduce the width of the linear regime of the nonlinearity.
3.2 SATAE-shrink
Consider a SATAE with a shrink activation function and shrink parameter λ. The corresponding
complementary nonlinearity, derived using Equation 1 is given by:
shrinkc(x) =
{abs(x), |x|>λ
0, elsewhere .
Note that shrinkc(Wex+ be) = abs(shrink(Wex+ be)), which corresponds to an L1 penalty
on the activations. Thus this SATAE is equivalent to a sparse auto-encoder with a shrink activation
function. Given the equivalence to the sparse auto-encoder we anticipate the same scale ambiguity
which occurs with L1 regularization. This ambiguity can be avoided by normalizing the decoder
weights to unit norm. It is expected that the SATAE-shrink will learn similar features to those
obtained with a sparse auto-encoder, and indeed this is what we observe. Figure 4(c) shows the
decoder filters learned by an auto-encoder with shrink nonlinearity trained on gray-scale natural
image patches. One can recognize the expected Gabor-like features when the saturation penalty is
activated. When trained on the binary MNIST dataset the learned basis is comprised of portions of
digits and strokes. Nearly identical results are obtained with a SATAE which uses a rectified-linear
4
activation function. This is because a rectified-linear function with an encoding bias behaves as a
positive only shrink function, similarly the complementary function is equivalent to a positive only
L1 penalty on the activations.
3.3 SATAE-saturated-linear
Unlike the SATAE-shrink, which tries to compress the data by minimizing the number of active
elements; the SATAE saturated-linear (SATAE-SL) tries to compress the data by encouraging the
latent code to be as close to binary as possible. Without a saturation penalty this auto-encoder learns
to encode small groups of neighboring pixels. More precisely, the auto-encoder learns the identity
function on all datasets. An example of such a basis is shown in Figure 4(b). With this basis the
auto-encoder can perfectly reconstruct any input by producing small activations which stay within
the linear region of the nonlinearity. Introducing the saturation penalty does not have any effect
when training on binary MNIST. This is because the scaled identity basis is a global minimizer of
Equation 2 for the SATAE-SL on any binary dataset. Such a basis can perfectly reconstruct any
binary input while operating exclusively in the saturated regions of the activation function, thus
incurring no saturation penalty. On the other hand, introducing the saturation penalty when training
on natural image patches induces the SATAE-SL to learn a more varied basis (Figure 4(d)).
3.4 Experiments on CIFAR-10
SATAE auto-encoders with 100 and 300 basis elements were trained on the CIFAR-10 dataset,
which contains small color images of objects from ten categories. In all of our experiments the auto-
encoders were trained by progressively increasing the saturation penalty (details are provided in the
next section). This allowed us to visually track the effect of the saturation penalty on individual
basis elements. Figure 4(e)-(f) shows the basis learned by SATAE-shrink with small and large
saturation penalty, respectively. Increasing the saturation penalty has the expected effect of reducing
the number of nonzero activations. As the saturation penalty increases, active basis elements become
responsible for reconstructing a larger portion of the input. This induces the basis elements to
become less spatially localized. This effect can be seen by comparing corresponding filters in Figure
4(e) and (f). Figures 4(g)-(h) show the basis elements learned by SATAE-SL with small and large
saturation penalty, respectively. The basis learned by SATAE-SL with a small saturation penalty
resembles the identity basis, as expected (see previous subsection). Once the saturation penalty
is increased small activations become more heavily penalized. To increase their activations the
encoding basis elements may increase in magnitude or align themselves with the input. However, if
the encoding and decoding weights are tied (or fixed in magnitude) then reconstruction error would
increase if the weights were merely scaled up. Thus the basis elements are forced to align with the
data in a way that also facilitates reconstruction. This effect is illustrated in Figure 5 where filters
corresponding to progressively larger values of the regularization parameter are shown. The top
half of the figure shows how an element from the identity basis ( α= 0.1) transforms to a localized
edge (α= 0.5). The bottom half of the figure shows how a localized edge ( α= 0.5) progressively
transforms to a template of a horse (α= 1).
4 Experimental Details
Because the regularizer explicitly encourages activations in the zero gradient regime of the nonlin-
earity, many encoder basis elements would not be updated via back-propagation through the non-
linearity if the saturation penalty were large. In order to allow the basis elements to deviate from
their initial random states we found it necessary to progressively increase the saturation penalty. In
our experiments the weights obtained at a minimum of Equation 2 for a smaller value of α were
used to initialize the optimization for a larger value of α. Typically, the optimization began with
α = 0 and was progressively increased to α = 1 in steps of 0.1. The auto-encoder was trained for
30 epochs at each value of α. This approach also allowed us to track the evolution of basis elements
as a function of α(Figure 5). In all experiments data samples were normalized by subtracting the
mean and dividing by the standard deviation of the dataset. The auto-encoders used to obtain the
results shown in Figure 4 (a),(c)-(f) used 100 basis elements, others used 300 basis elements. In-
creasing the number of elements in the basis did not have a strong qualitative effect except to make
the features represented by the basis more localized. The decoder basis elements of the SATAEs with
5
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 4: Basis elements learned by the SATAE using different nonlinearities on: 28x28 binary
MNIST digits, 12x12 gray scale natural image patches, and CIFAR-10. (a) SATAE-shrink trained on
MNIST, (b) SATAE-saturated-linear trained on MNIST, (c) SATAE-shrink trained on natural image
patches, (d) SATAE-saturated-linear trained on natural image patches, (e)-(f) SATAE-shrink trained
on CIFAR-10 withα= 0.1 and α= 0.5, respectively, (g)-(h) SATAE-SL trained on CIFAR-10 with
α= 0.1 and α= 0.6, respectively. 6
Figure 5: Evolution of two filters with increasing saturation regularization for a SATAE-SL trained
on CIFAR-10. Filters corresponding to larger values of α were initialized using the filter corre-
sponding to the previous α. The regularization parameter was varied from 0.1 to 0.5 (left to right)
in the top five images and 0.5 to 1 in the bottom five
shrink and rectified-linear nonlinearities were reprojected to the unit sphere after every 10 stochastic
gradient updates. The SATAEs which used saturated-linear activation function were trained with
tied weights. All results presented were obtained using stochastic gradient descent with a constant
learning rate of 0.05.
5 Discussion
In this work we have introduced a general and conceptually simple latent state regularizer. It was
demonstrated that a variety of feature sets can be obtained using a single framework. The utility of
these features depend on the application. In this section we extend the definition of the saturation
regularizer to include functions without a zero-gradient region. The relationship of SATAEs with
other regularized auto-encoders will be discussed. We conclude with a discussion on future work.
5.1 Extension to Differentiable Functions
We would like to extend the saturation penalty definition (Equation 1) to differentiable functions
without a zero-gradient region. An appealing first guess for the complimentary function is some
positive function of the first derivative, fc(x) = |f′(x)|for instance. This may be an appropriate
choice for monotonic activation functions which have their lowest gradient regions at the extrema
(e.g. sigmoids). However some activation functions may contain regions of small or zero gradient
which have negligible extent, at the extrema for instance. We would like our definition of the com-
plimentary function to not only measure the local gradient in some region, but to also measure it’s
extent. For this purpose we employ the concept of average variation over a finite interval. We define
the average variation of f at xin the positive and negative directions at scale l, respectively as:
∆+
l f(x) = 1
l
∫ x+l
x
|f′(u)|du= |f′(x)|∗Π+
l (x)
∆−
l f(x) = 1
l
∫ x
x−l
|f′(u)|du= |f′(x)|∗Π−
l (x).
Where ∗denotes the continuous convolution operator. Π+
l (x) and Π−
l (x) are uniform averaging
kernels in the positive and negative directions, respectively. Next, define a directional measure of
variation of f by integrating the average variation at all scales.
7
Figure 6: Illustration of the complimentary function ( fc) as defined by Equation 3 for a non-
monotonic activation function (f). The absolute derivative of f is shown for comparison.
M+f(x) =
∫ +∞
0
∆+
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π+
l (x)dl
]
∗|f′(x)|
M−f(x) =
∫ +∞
0
∆−
l f(x)w(l)dl=
[∫ +∞
0
w(l)Π−
l (x)dl
]
∗|f′(x)|.
Where w(l) is chosen to be a sufficiently fast decreasing function of l to insure convergence of
the integral. The integral with which |f′(x)|is convolved in the above equation evaluates to some
decreasing function of xfor Π+ with support x≥0. Similarly, the integral involving Π−evaluates
to some increasing function of x with support x ≤0. This function will depend on w(l). The
functions M+f(x) and M−f(x) measure the average variation off(x) at all scales lin the positive
and negative direction, respectively. We define the complimentary functionfc(x) as:
fc(x) = min(M+f(x),M−f(x)). (3)
An example of a complimentary function defined using the above formulation is shown in Figure 6.
Whereas |f′(x)|is minimized at the extrema off, the complimentary function only plateaus at these
locations.
5.2 Relationship with the Contractive Auto-Encoder
Let hi be the output of theith hidden unit of a single-layer auto-encoder with point-wise nonlinearity
f(·). The regularizer imposed by the contractive auto-encoder (CAE) can be expressed as follows:
∑
ij
(∂hi
∂xj
)2
=
dh∑
i
f′(
d∑
j=1
We
ijxj + bi)2∥We
i ∥2
,
where x is a d-dimensional data vector, f′(·) is the derivative of f(·), bi is the bias of the ith
encoding unit, andWe
i denotes the ith row of the encoding weight matrix. The first term in the above
equation tries to adjust the weights so as to push the activations into the low gradient (saturation)
regime of the nonlinearity, but is only defined for differentiable activation functions. Therefore the
CAE indirectly encourages operation in the saturation regime. Computing the Jacobian, however,
can be cumbersome for deep networks. Furthermore, the complexity of computing the Jacobian is
O(d×dh), although a more efficient implementation is possible [3], compared to the O(dh) for the
saturation penalty.
8
5.3 Relationship with the Sparse Auto-Encoder
In Section 3.2 it was shown that SATAEs with shrink or rectified-linear activation functions are
equivalent to a sparse auto-encoder. Interestingly, the fact that the saturation penalty happens to
correspond to L1 regularization in the case of SATAE-shrink agrees with the findings in [7]. In their
efforts to find an architecture to approximate inference in sparse coding, Gregor et al. found that
the shrink function is particularly compatible with L1 minimization. Equivalence to sparsity only
for some activation functions suggests that SATAEs are a generalization of sparse auto-encoders.
Like the sparsity penalty, the saturation penalty can be applied at any point in a deep network for the
same computational cost. However, unlike the sparsity penalty the saturation penalty is adapted to
the nonlinearity of the particular layer to which it is applied.
5.4 Future Work
We intend to experimentally demonstrate that the representations learned by SATAEs are useful as
features for learning common tasks such as classification and denoising. We will also address several
open questions, namely: (i) how to select (or learn) the width parameter (λ) of the nonlinearity, and
(ii) how to methodically constrain the weights. We will also explore SATAEs that use a wider class
of non-linearities and architectures.
References
[1] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra and Yann LeCun. Efficient Learn-
ing of Sparse Representations with an Energy- Based Model, in J. Platt et al. (Eds),Advances in
Neural Information Processing Systems (NIPS 2006), 19, MIT Press, 2006.
[2] Marc’Aurelio Ranzato, Fu-Jie Huang, Y-Lan Boureau and Yann LeCun: Unsupervised Learn-
ing of Invariant Feature Hierarchies with Applications to Object Recognition, Proc. Computer
Vision and Pattern Recognition Conference (CVPR’07), IEEE Press, 2007
[3] Rifai, S. and Vincent, P. and Muller, X. and Glorot, X. and Bengio, Y . Contractive auto-encoders:
Explicit invariance during feature extraction, Proceedings of the Twenty-eight International
Conference on Machine Learning, ICML 2011
[4] P. Vincent, H. Larochelle, Y . Bengio, P.A. Manzagol. Extracting and Composing Robust Fea-
tures with Denoising Autoencoders Proceedings of the 25th International Conference on Ma-
chine Learning (ICML’2008), 2008.
[5] R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley & Sons,
2001, pp. xx + 654, ISBN: 0-471-05669-3
[6] Olhausen, Bruno A.; Field, David J. (1997). Sparse Coding with an Overcomplete Basis Set: A
Strategy Employed by V1?. Vision Research 37 (23): 3311-3325.
[7] Karol Gregor and Yann LeCun: Learning Fast Approximations of Sparse Coding, Proc. Inter-
national Conference on Machine learning (ICML’10), 2010
[8] Guillaume Alain and Yoshua Bengio, What Regularized Auto-Encoders Learn from the Data
Generating Distribution. arXiv:1211.4246v3 [cs.LG]
9
|
Ross Goroshin, Yann LeCun
|
Unknown
| 2,013
|
{"id": "yGgjGkkbeFSbt", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358468100000, "tmdate": 1358468100000, "ddate": null, "number": 39, "content": {"title": "Saturating Auto-Encoder", "decision": "conferencePoster-iclr2013-conference", "abstract": "We introduce a simple new regularizer for auto-encoders whose hidden-unit activation functions contain at least one zero-gradient (saturated) region. This regularizer explicitly encourages activations in the saturated region(s) of the corresponding activation function. We call these Saturating Auto-Encoders (SATAE). We show that the saturation regularizer explicitly limits the SATAE's ability to reconstruct inputs which are not near the data manifold. Furthermore, we show that a wide variety of features can be learned when different activation functions are used. Finally, connections are established with the Contractive and Sparse Auto-Encoders.", "pdf": "https://arxiv.org/abs/1301.3577", "paperhash": "goroshin|saturating_autoencoder", "keywords": [], "conflicts": [], "authors": ["Ross Goroshin", "Yann LeCun"], "authorids": ["rgoroshin@gmail.com", "ylecun@gmail.com"]}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rgoroshin@gmail.com"], "writers": []}
|
[Review]:
This paper proposes a regularizer for auto-encoders with
nonlinearities that have a zegion with zero-gradient. The paper
mentions three nonlinearities that fit into that category: shrinkage,
saturated linear, rectified linear.
The regularizer basically penalizes how much the activation deviates
from saturation. The insight is that at saturation, the unit conveys
less information compared to when it is in a non-saturated region.
While I generally like the paper, I think it could be made a lot
stronger by having more experimental results showing the practical
benefits of the nonlinearities and their associated regularizers.
I am particularly interested in the case of saturated linear
function. It will be interesting to compare the results of the
proposed regularizer and the sparsity penalty. More concretely, f(x) =
1 would incur some loss under the conventional sparsity; whereas, the
new regularizer does not. From the energy conservation point of view,
it is not appealing to maintain the neuron at high activation, and the
new regularizer does not capture that. But it may be the case that,
for a network to generalize, we need to only restrict the neurons to
be in the saturation regions. Any numerical comparisons on some
classification benchmarks would be helpful.
It would also be interesting that the method is tested on a
classification dataset to see if it makes a different to use the new
regularizers.
|
anonymous reviewer 3942
| null | null |
{"id": "BSYbBsx9_5Suw", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361946900000, "tmdate": 1361946900000, "ddate": null, "number": 3, "content": {"title": "review of Saturating Auto-Encoder", "review": "This paper proposes a regularizer for auto-encoders with\r\nnonlinearities that have a zegion with zero-gradient. The paper\r\nmentions three nonlinearities that fit into that category: shrinkage,\r\nsaturated linear, rectified linear.\r\n\r\nThe regularizer basically penalizes how much the activation deviates\r\nfrom saturation. The insight is that at saturation, the unit conveys\r\nless information compared to when it is in a non-saturated region.\r\n\r\nWhile I generally like the paper, I think it could be made a lot\r\nstronger by having more experimental results showing the practical\r\nbenefits of the nonlinearities and their associated regularizers.\r\n\r\nI am particularly interested in the case of saturated linear\r\nfunction. It will be interesting to compare the results of the\r\nproposed regularizer and the sparsity penalty. More concretely, f(x) =\r\n1 would incur some loss under the conventional sparsity; whereas, the\r\nnew regularizer does not. From the energy conservation point of view,\r\nit is not appealing to maintain the neuron at high activation, and the\r\nnew regularizer does not capture that. But it may be the case that,\r\nfor a network to generalize, we need to only restrict the neurons to\r\nbe in the saturation regions. Any numerical comparisons on some\r\nclassification benchmarks would be helpful.\r\n\r\nIt would also be interesting that the method is tested on a\r\nclassification dataset to see if it makes a different to use the new\r\nregularizers."}, "forum": "yGgjGkkbeFSbt", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "yGgjGkkbeFSbt", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 3942"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 8,
"praise": 0,
"presentation_and_reporting": 1,
"results_and_discussion": 2,
"suggestion_and_solution": 5,
"total": 12
}
| 1.5
| 1.484218
| 0.015782
| 1.526436
| 0.315033
| 0.026436
| 0.083333
| 0
| 0.083333
| 0.666667
| 0
| 0.083333
| 0.166667
| 0.416667
|
{
"criticism": 0.08333333333333333,
"example": 0,
"importance_and_relevance": 0.08333333333333333,
"materials_and_methods": 0.6666666666666666,
"praise": 0,
"presentation_and_reporting": 0.08333333333333333,
"results_and_discussion": 0.16666666666666666,
"suggestion_and_solution": 0.4166666666666667
}
| 1.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttxM6DQKghdOi
|
Discrete Restricted Boltzmann Machines
|
In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code
|
Discrete Restricted Boltzmann Machines
Guido Mont´ufar GFM 10@ PSU .EDU
Jason Morton MORTON @MATH .PSU .EDU
Department of Mathematics
Pennsylvania State University
University Park, PA 16802, USA
Abstract
We describe discrete restricted Boltzmann machines: probabilistic graphical models with bipar-
tite interactions between visible and hidden discrete variables. Examples are binary restricted
Boltzmann machines and discrete na ¨ıve Bayes models. We detail the inference functions and
distributed representations arising in these models in terms of configurations of projected prod-
ucts of simplices and normal fans of products of simplices. We bound the number of hidden
variables, depending on the cardinalities of their state spaces, for which these models can ap-
proximate any probability distribution on their visible states to any given accuracy. In addition,
we use algebraic methods and coding theory to compute their dimension.
Keywords: Restricted Boltzmann Machine, Na¨ıve Bayes Model, Representational Power, Dis-
tributed Representation, Expected Dimension
1 Introduction
A restricted Boltzmann machine (RBM) is a probabilistic graphical model with bipartite interactions
between an observed set and a hidden set of units [see Smolensky, 1986, Freund and Haussler,
1991, Hinton, 2002, 2010]. A characterizing property of these models is that the observed units
are independent given the states of the hidden units and vice versa. This is a consequence of the
bipartiteness of the interaction graph and does not depend on the units’ state spaces. Typically
RBMs are defined with binary units, but other types of units have also been considered, including
continuous, discrete, and mixed type units [see Welling et al., 2005, Marks and Movellan, 2001,
Salakhutdinov et al., 2007, Dahl et al., 2012, Tran et al., 2011]. We study discrete RBMs, also called
multinomial or softmax RBMs, which are special types of exponential family harmoniums [Welling
et al., 2005]. While each unit Xi of a binary RBM has the state space {0,1}, the state space of
each unit Xi of a discrete RBM is a finite set Xi = {0,1,...,r i −1}. Like binary RBMs, discrete
RBMs can be trained using contrastive divergence (CD) [Hinton, 1999, 2002, Carreira-Perpi˜nan and
Hinton, 2005] or expectation-maximization (EM) [Dempster et al., 1977] and can be used to train
the parameters of deep systems layer by layer [Hinton et al., 2006, Bengio et al., 2007].
Non-binary visible units are natural because they can directly encode non-binary features. The
situation with hidden units is more subtle. States that appear in different hidden units can be acti-
1
arXiv:1301.3529v4 [stat.ML] 22 Apr 2014
MONT ´UFAR AND MORTON
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
24 40 79
Figure 1: Examples of probability models treated in this paper, in the special case of binary visible
variables. The light (dark) nodes represent visible (hidden) variables with the indicated number of
states. The total parameter count of each model is indicated at the top. From left to right: a binary
RBM; a discrete RBM with one 8-valued and one binary hidden units; and a binary na ¨ıve Bayes
model with 16 hidden classes.
vated by the same visible vector, but states that appear in the same hidden unit are mutually exclu-
sive. Non-binary hidden units thus allow one to explicitly represent complex exclusive relationships.
For example, a discrete RBM topic model would allow some topics to be mutually exclusive and
other topics to be mixed together freely. This provides a better match to the semantics of several
learning problems, although the learnability of such representations is mostly open. The practical
need to represent mutually exclusive properties is evidenced by the common approach of adding
activation sparsity parameters to binary RBM hidden states, which artificially create mutually ex-
clusive non-binary states by penalizing models which have more than a certain percentage of hidden
units active.
A discrete RBM is a product of experts [Hinton, 1999]; each hidden unit represents an expert
which is a mixture model of product distributions, or na¨ıve Bayes model. Hence discrete RBMs cap-
ture both na¨ıve Bayes models and binary RBMs, and interpolate between non-distributed mixture
representations and distributed mixture representations [Bengio, 2009, Mont´ufar and Morton, 2012].
See Figure 1. Na¨ıve Bayes models have been studied across many disciplines. In machine learning
they are most commonly used for classification and clustering, but have also been considered for
probabilistic modelling [Lowd and Domingos, 2005, Mont ´ufar, 2013]. Theoretical work on binary
RBM models includes results on universal approximation [Freund and Haussler, 1991, Le Roux
and Bengio, 2008, Mont ´ufar and Ay, 2011], dimension and parameter identifiability [Cueto et al.,
2010], Bayesian learning coefficients [Aoyagi, 2010], complexity [Long and Servedio, 2010], and
approximation errors [Mont´ufar et al., 2011]. In this paper we generalize some of these theoretical
results to discrete RBMs.
Probability models with more general interactions than strictly bipartite have also been consid-
ered, including semi-restricted Boltzmann machines and higher-order interaction Boltzmann ma-
chines [see Sejnowski, 1986, Memisevic and Hinton, 2010, Osindero and Hinton, 2008, Ranzato
et al., 2010]. The techniques that we develop in this paper also serve to treat a general class of
RBM-like models allowing within-layer interactions, a generalization that will be carried out in a
forthcoming work [Mont´ufar and Morton, 2013].
Section 2 collects basic facts about independence models, na ¨ıve Bayes models, and binary
RBMs, including an overview on the aforementioned theoretical results. Section 3 defines discrete
RBMs formally and describes them as (i) products of mixtures of product distributions (Proposi-
tion 7) and (ii) as restricted mixtures of product distributions. Section 4 elaborates on distributed
representations and inference functions represented by discrete RBMs (Proposition 11, Lemma 12,
2
DISCRETE RESTRICTED BOLTZMANN MACHINES
ex1=1
ex2=1
ex3=1
ex1=1
ex1=2
ex2=1
Figure 2: The convex support of the independence model of three binary variables (left) and of a
binary-ternary pair of variables (right) discussed in Example 1.
and Proposition 14). Section 5 addresses the expressive power of discrete RBMs by describing
explicit submodels (Theorem 15) and provides results on their maximal approximation errors and
universal approximation properties (Theorem 16). Section 6 treats the dimension of discrete RBM
models (Proposition 17 and Theorem 19). Section 7 contains an algebraic-combinatorial discussion
of tropical discrete RBM models (Theorem 21) with consequences for their dimension collected in
Propositions 24, 25, and 26.
2 Preliminaries
2.1 Independence models
Consider a system of n <∞random variables X1,...,X n. Assume that Xi takes states xi in a
finite set Xi = {0,1,...,r i −1}for all i ∈{1,...,n }=: [n]. The state space of this system is
X:= X1 ×···×X n. We write xλ = (xi)i∈λ for a joint state of the variables with index i∈λfor
any λ⊆[n], and x= (x1,...,x n) for a joint state of all variables. We denote by ∆(X) the set of
all probability distributions on X. We write ⟨a,b⟩for the inner product a⊤b.
The independence model of the variables X1,...,X n is the set of product distributions p(x) =∏
i∈[n] pi(xi) for all x∈X, where pi is a probability distribution with state space Xi for all i∈[n].
This model is the closure EX (in the Euclidean topology) of the exponential family
EX :=
{ 1
Z(θ) exp(⟨θ,A(X)⟩): θ∈RdX
}
, (1)
where A(X) ∈RdX×X is a matrix of sufficient statistics; with rows equal to the indicator functions
1X and 1{x: xi=yi}for all yi ∈Xi \{0}for all i ∈[n]. The partition function Z(θ) normalizes
the distributions. The convex support of EX is the convex hull QX := conv({A(X)
x }x∈X) of the
columns of A(X), which is a Cartesian product of simplices with QX ∼= ∆(X1) ×···× ∆(Xn).
Example 1. The sufficient statistics of the independence models EX and EX′ with state spaces
3
MONT ´UFAR AND MORTON
X= {0,1}3 and X′= {0,1,2}×{0,1}are, with rows labeled by indicator functions,
A(X) =
[1
1
1
] [1
1
0
] [1
0
1
] [1
0
0
] [0
1
1
] [0
1
0
] [0
0
1
] [0
0
0
]
1 1 1 1 1 1 1 1
1 1 1 1 0 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
x3 = 1
x2 = 1
x1 = 1
A(X′) =
[1
2
] [1
1
] [1
0
] [0
2
] [0
1
] [0
0
]
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
x2 = 1
x1 = 2
x1 = 1
.
In the first case the convex support is a cube and in the second it is a prism. Both convex supports
are three-dimensional polytopes, but the prism has fewer vertices and is more similar to a simplex,
meaning that its vertex set is affinely more independent than that of the cube. See Figure 2.
2.2 Na ¨ıve Bayes models
Let k∈N. The k-mixture of the independence model, or na¨ıve Bayes modelwith khidden classes,
with visible variables X1,...,X n is the set of all probability distributions expressible as convex
combinations of kpoints in EX:
MX,k :=
{∑
i∈[k]
λip(i) : p(i) ∈EX, λi ≥0, for all i∈[k], and
∑
i∈[k]
λi = 1
}
. (2)
We write Mn,k for the k-mixture of the independence model of nbinary variables. The dimen-
sions of mixtures of binary independence models are known:
Theorem 2 (Catalisano et al. [2011]). The mixtures of binary independence models Mn,k have the
dimension expected from counting parameters,min{nk+ (k−1),2n−1}, except for M4,3, which
has dimension 13 instead of 14.
Let AX(d) denote the maximal cardinality of a subset X′⊆X of minimum Hamming distance
at least d, i.e., the maximal cardinality of a subset X′⊆X with dH(x,y) ≥dfor all distinct points
x,y ∈X′, where dH(x,y) := |{i∈[n]: xi ̸= yi}|denotes the Hamming distance betweenxand y.
The function AXis familiar in coding theory. Thek-mixtures of independence models are universal
approximators when kis large enough. This can be made precise in terms of AX(2):
Theorem 3 (Mont´ufar [2013]). The mixture model MX,k can approximate any probability distri-
bution on Xarbitrarily well if k≥|X|/maxi∈[n] |Xi|and only if k≥AX(2).
By results from [Gilbert, 1952, Varshamov, 1957], when q is a power of a prime number and
X= {0,1,...,q −1}n, then AX = qn−1. In these cases the previous theorem shows that MX,k
is a universal approximator of distributions on Xif and only if k ≥qn−1. In particular, the small-
est na¨ıve Bayes model universal approximator of distributions on {0,1}n has 2n−1(n+ 1) −1
parameters.
Some of the distributions not representable by a given na¨ıve Bayes model can be characterized
in terms of their modes. A state x∈X is a mode of a distribution p∈∆(X) if p(x) >p(y) for all
ywith dH(x,y) = 1 and it is a strong mode if p(x) >∑
y: dH(x,y)=1 p(y).
Lemma 4 (Mont´ufar and Morton [2012]). If a mixture of product distributions p = ∑
iλip(i) has
strong modes C⊆X , then there is a mixture component p(i) with mode xfor each x∈C.
4
DISCRETE RESTRICTED BOLTZMANN MACHINES
2.3 Binary restricted Boltzmann machines
The binary RBM model with nvisible and mhidden units, denoted RBMn,m, is the set of distribu-
tions on {0,1}n of the form
p(x) = 1
Z(W,B,C )
∑
h∈{0,1}m
exp(h⊤Wx + B⊤x+ C⊤h) for all x∈{0,1}n, (3)
where xdenotes states of the visible units, hdenotes states of the hidden units, W = (Wji)ji ∈
Rm×n is a matrix of interaction weights, B ∈Rn and C ∈Rm are vectors of bias weights, and
Z(W,B,C ) = ∑
x∈{0,1}n
∑
h∈{0,1}m exp(h⊤Wx + B⊤x+ C⊤h) is the normalizing partition
function.
It is known that these models have the expected dimension for many choices of nand m:
Theorem 5 (Cueto et al. [2010]). The dimension of the model RBMn,m is equal to nm+ n+ m
when m+ 1 ≤2n−⌈log2(n+1)⌉and it is equal to 2n −1 when m≥2n−⌊log2(n+1)⌋.
It is also known that with enough hidden units, binary RBMs are universal approximators:
Theorem 6 (Mont´ufar and Ay [2011]). The model RBMn,m can approximate any distribution on
{0,1}n arbitrarily well whenever m≥2n−1 −1.
A previous result by Le Roux and Bengio [2008, Theorem 2] shows thatRBMn,m is a universal
approximator wheneverm≥2n+1. It is not known whether the bounds from Theorem 6 are always
tight, but they show that for any given n, the smallest RBM universal approximator of distributions
on {0,1}n has at most 2n−1(n+ 1) −1 parameters and hence not more than the smallest na ¨ıve
Bayes model universal approximator (Theorem 3).
3 Discrete restricted Boltzmann machines
Let Xi = {0,1,...,r i−1}for all i∈[n] and Yj = {0,1,...,s j−1}for all j ∈[m]. The graphical
model with full bipartite interactions {{i,j}: i∈[n],j ∈[m]}on X×Y is the exponential family
EX,Y:=
{ 1
Z(θ) exp(⟨θ,A(X,Y)⟩): θ∈RdXdY
}
, (4)
with sufficient statistics matrix equal to the Kronecker product A(X,Y) = A(X) ⊗A(Y) of the
sufficient statistics matrices A(X) and A(Y) of the independence models EX and EY. The matrix
A(X,Y) has dXdY =
(∑
i∈[n](|Xi|−1) + 1
)(∑
j∈[m](|Yi|−1) + 1
)
linearly independent rows
and |X×Y| columns, each column corresponding to a joint state (x,y) of all variables. Disregard-
ing the entry of θ that is multiplied with the constant row of A(X,Y), which cancels out with the
normalization function Z(θ), this parametrization of EX,Y is one-to-one. In particular, this model
has dimension dim(EX,Y) = dXdY−1.
The discrete RBM model RBMX,Yis the following set of marginal distributions:
RBMX,Y:=
{
q(x) =
∑
y∈Y
p(x,y) for all x∈X : p∈EX,Y
}
. (5)
5
MONT ´UFAR AND MORTON
In the case of one single hidden unit, this model is the na¨ıve Bayes model onXwith |Y1|hidden
classes. When all units are binary, X = {0,1}n and Y= {0,1}m, this model is RBMn,m. Note
that the exponent in eq. (3) can be written as (h⊤Wx + B⊤x+ C⊤h) = ⟨θ,A(X,Y)
(x,h) ⟩, taking for θ
the column-by-column vectorization of the matrix
(0 B⊤
C W
)
.
Conditional distributions
The conditional distributions of discrete RBMs can be described in the following way. Consider a
vector θ ∈RdXdY parametrizing EX,Y, and the matrix Θ ∈RdY×dX with column-by-column vec-
torization equal toθ. A lemma by Roth [1934] shows thatθ⊤(A(X)⊗A(Y))(x,y) = (A(X)
x )⊤Θ⊤A(Y)
y
for all x∈X, y∈Y, and hence
⣨
θ,A(X,Y)
(x,y)
⟩
=
⣨
ΘA(X)
x ,A(Y)
y
⟩
=
⣨
Θ⊤A(Y)
y ,A(X)
x
⟩
∀x∈X,y ∈Y. (6)
The inner product in eq. (6) describes following probability distributions:
pθ(·,·) = 1
Z(θ) exp
(⟨
θ,A(X,Y)⟩)
, (7)
pθ(·|x) = 1
Z
(
ΘA(X)
x
)exp
(⟨
ΘA(X)
x ,A(Y)⟩)
, and (8)
pθ(·|y) = 1
Z
(
Θ⊤A(Y)
y
)exp
(⟨
Θ⊤A(Y)
y ,A(X)⟩)
. (9)
Geometrically, ΘA(X) is a linear projection of the columns of the sufficient statistics matrix A(X)
into the parameter space of EY, and similarly, Θ⊤A(Y) is a linear projection of the columns of A(Y)
into the parameter space of EX.
Polynomial parametrization
Discrete RBMs can be parametrized not only in the exponential way discussed above, but also by
simple polynomials. The exponential family EX,Ycan be parametrized by square free monomials:
p(v,h) = 1
Z
∏
{j,i}∈ [m] ×[n],
(y′
j,x′
i) ∈Yj ×Xi
(γ{j,i},(y′
j,x′
i))
δy′
j
(hj)δx′
i
(vi)
for all (v,h) ∈Y×X , (10)
where γ{j,i},(y′
j,x′
i) are positive reals. The probability distributions in RBMX,Ycan be written as
p(v) = 1
Z
∏
j∈[m]
( ∑
hj∈Yj
γ{j,1},(hj,v1) ···γ{j,n},(hj,vn)
)
for all v∈X. (11)
The parameters γ{j,i},(y′
j,x′
i) correspond to exp(θ{j,i},(y′
j,x′
i)) in the parametrization given in eq. (4).
6
DISCRETE RESTRICTED BOLTZMANN MACHINES
Products of mixtures and mixtures of products
In the following we describe discrete RBMs from two complementary perspectives: (i) as products
of experts, where each expert is a mixture of products, and (ii) as restricted mixtures of product
distributions. The renormalized entry-wise (Hadamard) product of two probability distributions p
and qon Xis defined as p◦q := (p(x)q(x))x∈X/∑
y∈Xp(y)q(y). Here we assume that pand q
have overlapping supports, such that the definition makes sense.
Proposition 7. The model RBMX,Yis a Hadamard product of mixtures of product distributions:
RBMX,Y= MX,|Y1|◦···◦M X,|Ym|.
Proof. The statement can be seen directly by considering the parametrization from eq. (11). To
make this explicit, one can use a homogeneous version of the matrix A(X,Y) which we denote by
Aand which defines the same model. Each row of Ais indexed by an edge {i,j}of the bipartite
graph and a joint state (xi,hj) of the visible and hidden units connected by this edge. Such a row
has a one in any column when these states agree with the global state, and zero otherwise. For any
j ∈[m] let Aj,: denote the matrix containing the rows of Awith indices ({i,j},(xi,hj)) for all
xi ∈Xi for all i∈[n] for all hj ∈Yj, and let A(x,h) denote the (x,h)-column of A. We have
p(x) = 1
Z
∑
h
exp(⟨θ,A(x,h)⟩)
= 1
Z
∑
h
exp(⟨θ1,:,A1,:(x,h)⟩) exp(⟨θ2,:,A2,:(x,h)⟩) ···exp(⟨θm,:,Am,:(x,h)⟩)
= 1
Z
(∑
h1
exp(⟨θ1,:,A1,:(x,h1)⟩)
)
···
(∑
hm
exp(⟨θm,:,Am,:(x,hm)⟩)
)
= 1
Z(Z1p(1)(x)) ···(Zmp(m)(x)) = 1
Z′p(1)(x) ···p(m)(x),
where p(j) ∈MX,|Yj|and Zj = ∑
x∈X
∑
hj∈Yj exp(⟨θj,:,Aj,:(x,hj)⟩) for all j ∈[m]. Since the
vectors θj,: can be chosen arbitrarily, the factors p(j) can be made arbitrary within MX,|Yj|.
Of course, every distribution in RBMX,Y is a mixture distribution p(x) = ∑
h∈Yp(x|h)q(h).
The mixture weights are given by the marginals q(h) on Yof distributions from EX,Y, and the
mixture components can be described as follows.
Proposition 8. The set of conditional distributions p(·|h), h∈Y of a distribution in EX,Yis the set
of product distributions in EX with parameters θh = Θ⊤A(Y)
h , h ∈Y equal to a linear projection
of the vertices {A(Y)
h : h∈Y} of the Cartesian product of simplices QY∼= ∆(Y1) ×···× ∆(Ym).
Proof. This is by eq. (6).
4 Products of simplices and their normal fans
Binary RBMs have been analyzed by considering each of the mhidden units as defining a hyper-
plane Hj slicing the n-cube into two regions. To generalize the results provided by this analysis, in
7
MONT ´UFAR AND MORTON
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet
R0
R1
R2
0
1
2(0,0) (0,1)
(1,0) (1 ,1)
Θ−1(R2)
Θ−1(R1)
Θ−1(R0)
Figure 3: Three slicings of a square by the normal fan of a triangle with maximal conesR0, R1, and
R2, corresponding to three possible inference functions of RBM{0,1}2,{0,1,2}.
this section we replace the n-cube with a general product of simplices QX, and replace the two re-
gions defined by the hyperplane Hj by the |Yj|regions defined by the maximal cones of the normal
fan of the simplex ∆(Yj).
Subdivisions of independence models
The normal cone of a polytope Q ⊂Rd at a point x ∈Q is the set of all vectors v ∈Rd with
⟨v,(x−y)⟩≥ 0 for all y ∈Q. We denote by Rx the normal cone of the product of simplices
QX = conv{A(X)
x }x∈X at the vertex A(X)
x . The normal fan FX is the set of all normal cones of
QX. The product distributions pθ = 1
Z(θ) exp(⟨θ,A(X)⟩) ∈EX strictly maximized at x∈X, with
pθ(x) >pθ(y) for all y∈X\{ x}, are those with parameter vector θin the relative interior of Rx.
Hence the normal fan FX partitions the parameter space of the independence model into regions of
distributions with maxima at different inputs.
Inference functions and slicings
For any choice of parameters of the model RBMX,Y, there is an inference function π: X →Y,
(or more generally π: X→ 2Y), which computes the most likely hidden state given a visible state.
These functions are not necessarily injective nor surjective. For a visible state x, the conditional
distribution on the hidden states is a product distribution p(y|X = x) = 1
Z exp(⟨ΘA(X)
x ,A(Y)
y ⟩)
which is maximized at the state yfor which ΘA(X)
x ∈Ry. The preimages of the cones Ry by the
map Θ partition the input spaceRdX and are called inference regions. See Figure 3 and Example 10.
Definition 9. A Y-slicing of a finite set Z⊂ RdX is a partition of Zinto the preimages of the cones
Ry, y ∈Y by a linear map Θ: RdX →RdY. We assume that Θ is generic, such that it maps each
element of Zinto the interior of some Ry.
For example, when Y= {0,1}, the fan FY consists of a hyperplane and the two closed half-
spaces defined by that hyperplane. A Y-slicing is in this case a standard slicing by a hyperplane.
Example 10. Let X = {0,1,2}×{ 0,1}and Y = {0,1}4. The maximal cones Ry, y ∈Y of
the normal fan of the 4-cube with vertices {0,1}4 are the closed orthants of R4. The 6 vertices
{A(X)
x : x ∈ X}of the prism ∆({0,1,2}) ×∆({0,1}) can be mapped into 6 distinct orthants
8
DISCRETE RESTRICTED BOLTZMANN MACHINES
of R4, each orthant with an even number of positive coordinates:
3 −2 −2 −2
1 2 −2 −2
1 −2 −2 2
1 −2 2 −2
Θ
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
A(X)
=
−1 −1 1 1 1 3
1 1 3 −1 −1 1
−3 1 −1 −1 3 1
1 −3 −1 3 −1 1
. (12)
Even in the case of one single hidden unit the slicings can be complex, but the following simple
type of slicing is always available.
Proposition 11. Any slicing by k−1 parallel hyperplanes is a {1,2,...,k }-slicing.
Proof. We show that there is a line L= {λr−b: λ ∈R}, r,b ∈Rk intersecting all cells of FY,
Y= {1,...,k }. We need to show that there is a choice of rand bsuch that for every y∈Y the set
Iy ⊆R of all λwith ⟨λr−b,(ey −ez)⟩>0 for all z∈Y\{ y}has a non-empty interior. Now, Iy
is the set of λwith
λ(ry −rz) >by −bz for all z̸= y. (13)
Choosing b1 < ··· < bk and ry = f(by), where f is a strictly increasing and strictly concave
function, we get I1 = (−∞,b2−b1
r2−r1
), Iy = ( by−by−1
ry−ry−1
,by+1−by
ry+1−ry ) for y = 2,3,...,k −1, and Ik =
(bk−bk−1
rk−rk−1
,∞). The lengths ∞,l2,...,l k−1,∞of the intervals I1,...,I k can be adjusted arbitrarily
by choosing suitable differences rj+1 −rj for all j = 1,...,k −1.
Strong modes
Recall the definition of strong modes given in page 4.
Lemma 12. Let C⊆X be a set of arrays which are pairwise different in at least two entries (a
code of minimum distance two).
•If RBMX,Y contains a probability distribution with strong modes C, then there is a linear
map Θ of {A(Y)
y : y ∈Y} into the C-cells of FX (the cones Rx above the codewords x∈C)
sending at least one vertex into each cell.
•If there is a linear mapΘ of {A(Y)
y : y∈Y} into the C-cells of FX, with maxx{⟨Θ⊤A(Y)
y ,A(X)
x ⟩}=
cfor all y∈Y, then RBMX,Ycontains a probability distribution with strong modes C.
Proof. This is by Proposition 8 and Lemma 4.
A simple consequence of the previous lemma is that if the model RBMX,Y is a universal ap-
proximator of distributions on X, then necessarily the number of hidden states is at least as large as
the maximum code of visible states of minimum distance two,|Y|≥ AX(2). Hence discrete RBMs
may not be universal approximators even when their parameter count surpasses the dimension of
the ambient probability simplex.
Example 13. Let X= {0,1,2}nand Y= {0,1,..., 4}m. In this case AX(2) = 3n−1. If RBMX,Y
is a universal approximator with n= 3 and n= 4, then m≥2 and m≥3, respectively, although
the smallest mfor which RBMX,Yhas 3n −1 parameters is m= 1 and m= 2, respectively.
Using Lemma 12 and the analysis of [Mont´ufar and Morton, 2012] gives the following.
Proposition 14. If 4⌈m/3⌉≤ n, then RBMX,Ycontains distributions with 2m strong modes.
9
MONT ´UFAR AND MORTON
5 Representational power and approximation errors
In this section we describe submodels of discrete RBMs and use them to provide bounds on the
model approximation errors depending on the number of units and their state spaces. Universal
approximation results follow as special cases with vanishing approximation error.
Theorem 15. The model RBMX,Ycan approximate the following arbitrarily well:
•Any mixture of dY= 1 + ∑m
j=1(|Yj|−1) product distributions with disjoint supports.
•When dY ≥(∏
i∈[k] |Xi|)/maxj∈[k] |Xj|for some k ≤n, any distribution from the model P
of distributions with constant value on each block {x1}×···×{ xk}×Xk+1 ×···×X n for
all xi ∈Xi, for all i∈[k].
•Any probability distribution with support contained in the union ofdYsets of the form {x1}×
···×{ xk−1}×Xk ×{xk+1}×···×{ xn}.
Proof. By Proposition 7 the model RBMX,Y contains any Hadamard product p(1) ◦···◦ p(m)
with mixtures of products as factors, p(j) ∈ MX,|Yj| for all j ∈[m]. In particular, it contains
p= p(0) ◦(1 + ˜λ1 ˜p(1)) ◦···◦ (1 + ˜λm˜p(m)), where p(0) ∈EX, ˜p(j) ∈MX,|Yj|−1, and ˜λj ∈R+.
Choosing the factors ˜p(j) with pairwise disjoint supports shows thatp= ∑m
j=0 λjp(j), whereby p(0)
can be any product distribution and p(j) can be any distribution from MX,|Yj|−1 for all j ∈[m], as
long as supp(p(j)) ∩supp(p(j′)) for all j ̸= j′. This proves the first item.
For the second item: Any point in the set Pis a mixture of uniform distributions supported
on the disjoint blocks {x1}×···×{ xk}×X k+1 ×···×X n for all (x1,...,x k) ∈X1 ×···×
Xk. Each of these uniform distributions is a product distribution, since it factorizes as px1,...,xk =∏
i∈[k] δxi
∏
i∈[n]\[k] ui, where ui denotes the uniform distribution on Xi. For any j ∈ [k] any
mixture ∑
xj∈Xj λxj px1,...,xk is also a product distribution, since it factorizes as
( ∑
xj∈Xj
λxj δxj
) ∏
i∈[k]\{j}
δxi
∏
i∈[n]\[k]
ui. (14)
Hence any distribution from the set Pis a mixture of (∏
i∈[k] |Xi|)/maxj∈[k] |Xj|product distribu-
tions with disjoint supports. The claim now follows from the first item.
For the third item: The modelEXcontains any distribution with support of the form{x1}×···×
{xk−1}×Xk ×{xk+1}×···×{ xn}. Hence, by the first item, the RBM model can approximate
any distribution arbitrarily well whose support can be covered by dYsets of that form.
We now analyse the RBM model approximation errors. Let pand qbe two probability distribu-
tions on X. The Kullback-Leibler divergence frompto qis defined as D(p∥q) := ∑
x∈Xp(x) log p(x)
q(x)
when supp(p) ⊆ supp(q) and D(p∥q) := ∞otherwise. The divergence from p to a model
M ⊆∆(X) is defined as D(p∥M) := inf q∈MD(p∥q) and the maximal approximation error
of Mis supp∈∆(X) D(p∥M).
The maximal approximation error of the independence modelEXsatisfies supp∈∆(X) D(p∥EX) ≤
|X|/maxi∈[n] |Xi|, with equality when all units have the same number of states [see Ay and Knauf,
2006, Corollary 4.10].
10
DISCRETE RESTRICTED BOLTZMANN MACHINES
0 100 200 300 400 500
100
200
300
400
500
0 100 200 300 400 500
100
200
300
400
500
0.5
1
1.5
2
2.5
x 10
7
82
84
86
88
90
92
94
96
98
k
m
Maximal-error bound
k
m
Nr. parameters
Figure 4: Illustration of Theorem 16. The left panel shows a heat map of the upper bound on the
Kullback-Leibler approximation errors of discrete RBMs with 100 visible binary units and the right
panel shows a map of the total number of model parameters, both depending on the number of
hidden units mand their possible states k= |Yj|for all j ∈[m].
Theorem 16. If ∏
i∈[n]\Λ |Xi|≤ 1 +∑
j∈[m](|Yj|−1) = dYfor some Λ ⊆[n], then the Kullback-
Leibler divergence from any distribution pon Xto the model RBMX,Yis bounded by
D(p∥RBMX,Y) ≤log
∏
i∈Λ |Xi|
maxi∈Λ |Xi|.
In particular, the model RBMX,Yis a universal approximator whenever dY≥|X|/maxi∈[n] |Xi|.
Proof. The submodel Pof RBMX,Y described in the second item of Theorem 15 is a partition
model. The maximal divergence from such a model is equal to the logarithm of the cardinality of
the largest block with constant values [see Mat ´uˇs and Ay, 2003]. Thus maxpD(p∥RBMX,Y) ≤
maxpD(p∥P) = log
(
(∏
i∈Λ |Xi|)/maxi∈Λ |Xi|
)
, as was claimed.
Theorem 16 shows that, on a large scale, the maximal model approximation error ofRBMX,Yis
smaller than that of the independence model EXby at least log(1 +∑
j∈[m](|Yj|−1)), or vanishes.
The theorem is illustrated in Figure 4. The line k = 2 shows bounds on the approximation error of
binary RBMs with mhidden units, previously treated in [Mont ´ufar et al., 2011, Theorem 5.1], and
the line m= 1 shows bounds for na¨ıve Bayes models withkhidden classes.
6 Dimension
In this section we study the dimension of the model RBMX,Y. One reason RBMs are attractive is
that they have a large learning capacity, e.g. may be built with millions of parameters. Dimension
calculations show whether those parameters are wasted, or translate into higher-dimensional spaces
of representable distributions. Our analysis builds on previous work by Cueto, Morton, and Sturm-
fels [2010], where binary RBMs are treated. The idea is to bound the dimension from below by
the dimension of a related max-plus model, called the tropical RBM model [Pachter and Sturmfels,
2004], and from above by the dimension expected from counting parameters.
11
MONT ´UFAR AND MORTON
The dimension of a discrete RBM model can be bounded from above not only by its expected
dimension, but also by a function of the dimension of its Hadamard factors:
Proposition 17. The dimension of RBMX,Yis bounded as
dim(RBMX,Y) ≤dim(MX,|Yi|) +
∑
j∈[m]\{i}
dim(MX,|Yj|−1) + (m−1) for all i∈[m]. (15)
Proof. Let udenote the uniform distribution. Note thatEX◦EX = EXand also EX◦MX,k = MX,k.
This observation, together with Proposition 7, shows that the RBM model can be factorized as
RBMX,Y= (MX,|Y1|) ◦(λ1u+ (1 −λ1)MX,|Y1|) ◦···◦ (λmu+ (1 −λm)MX,|Ym|−1),
from which the claim follows.
By the previous proposition, the model RBMX,Y can have the expected dimension only if (i)
the right hand side of eq. (15) equals |X|− 1, or (ii) each mixture model MX,k has the expected
dimension for allk≤maxj∈[m] |Yj|. Sometimes none of both conditions is satisfied and the models
‘waste’ parameters:
Example 18. The k-mixture of the independence model on X1 ×X2 is a subset of the set of
|X1|×|X 2|matrices with non-negative entries and rank at most k. It is known that the set of
M ×N matrices of rank at most k has dimension k(M + N −k) for all 1 ≤k <min{M,N }.
Hence the model MX1×X2,k has dimension smaller than its parameter count whenever 1 < k <
min{|X1|,|X2|}. By Proposition 17 if (∑
j∈[m](|Yj|−1) + 1)(|X1|+ |X2|−1) ≤|X1 ×X2|and
1 < |Yj|≤ min{|X1|,|X2|}for some j ∈[m], then RBMX1×X2,Y does not have the expected
dimension.
The next theorem indicates choices of Xand Yfor which the model RBMX,Yhas the expected
dimension. Given a sufficient statistics matrix A(X), we say that a set Z⊆X has full rank when
the matrix with columns {A(X)
x : x∈Z} has full rank.
Theorem 19. When Xcontains mdisjoint Hamming balls of radii 2(|Yj|−1) −1, j ∈[m] and
the subset of Xnot intersected by these balls has full rank, then the model RBMX,Yhas dimension
equal to the number of model parameters,
dim(RBMX,Y) = (1 +
∑
i∈[n]
(|Xi|−1))(1 +
∑
j∈[m]
(|Yj|−1)) −1.
On the other hand, if mHamming balls of radius one cover X, then
dim(RBMX,Y) = |X|− 1.
In order to prove this theorem we will need two main tools: slicings by normal fans of simplices,
described in Section 4, and the tropical RBM model, described in Section 7. The theorem will follow
from the analysis contained in Section 7.
12
DISCRETE RESTRICTED BOLTZMANN MACHINES
7 Tropical model
Definition 20. The tropical model RBMtropical
X,Y is the image of the tropical morphism
RdXdY ∋θ ↦→ Φ(v; θ) = max{⟨θ,A(X,Y)
(v,h) ⟩: h∈Y} for all v∈X, (16)
which evaluates log( 1
Z(θ)
∑
h∈Yexp(⟨θ,A(X,Y)
(v,h) ⟩)) for all v ∈X for each θ within the max-plus
algebra (addition becomes a+ b = max {a,b}) up to additive constants independent of v (i.e.,
disregarding the normalization factor Z(θ)).
The idea behind this definition is thatlog(exp(a)+exp(b)) ≈max{a,b}when aand bhave dif-
ferent order of magnitude. The tropical model captures important properties of the original model.
Of particular interest is following consequence of the Bieri-Groves theorem [see Draisma, 2008],
which gives us a tool to estimate the dimension of RBMX,Y:
dim(RBMtropical
X,Y ) ≤dim(RBMX,Y) ≤min{dim(EX,Y),|X|− 1}. (17)
The following Theorem 21 describes the regions of linearity of the map Φ. Each of these
regions corresponds to a collection of Yj-slicings (see Definition 9) of the set {A(X)
x : x ∈X} for
all j ∈[m]. This result allows us to express the dimension of RBMtropical
X,Y as the maximum rank of
a class of matrices defined by collections of slicings.
For each j ∈[m] let Cj = {Cj,1,...,C j,|Yj|}be a Yj-slicing of {A(X)
x : x∈X} and let ACj,k
be the |X|× dX-matrix with x-th row equal to (A(X)
x )⊤when x∈Cj,k and equal to a row of zeros
otherwise. Let ACj = (ACj,1 |···| ACj,|Yj|) ∈R|X|×|Yj|dX and d= ∑
j∈[m] |Yj|dX.
Theorem 21. On each region of linearity, the tropical morphism Φ is the linear map Rd →
RBMtropical
X,Y represented by the |X|× d-matrix
A= (AC1 |···| ACm),
modulo constant functions. In particular, dim(RBMtropical
X,Y ) + 1 is the maximum rank of Aover all
possible collections of slicings C1,...,C m.
Proof. Again use the homogeneous version of the matrix A(X,Y) as in the proof of Proposition
7; this will not affect the rank of A. Let θhj = ( θ{j,i},(hj,xi))i∈[n],xi∈Xi and let Ahj denote the
submatrix of A(X,Y) containing the rows with indices {{j,i},(hj,xi): i∈[n],xi ∈Xi}. For any
given v∈X we have
max
{⟨
θ,A(X,Y)
(v,h)
⟩
: h∈Y
}
=
∑
j∈[m]
max
{⟨
θhj ,Ahj (v,hj)
⟩
: hj ∈Yj
}
,
from which the claim follows.
In the following we evaluate the maximum rank of the matrixAfor various choices of Xand Y
by examining good slicings. We focus on slicings by parallel hyperplanes.
Lemma 22. For any x∗∈X and 0 <k <n the affine hull of the set {A(X)
x : dH(x,x∗) = k}has
dimension ∑
i∈[n](|Xi|−1) −1.
13
MONT ´UFAR AND MORTON
Proof. Without loss of generality let x∗ = (0,..., 0). The set Zk := {A(X)
x : dH(x,x∗) = k}is
the intersection of {A(X)
x : x ∈X} with the hyperplane Hk := {z: ⟨1,z⟩= k+ 1}. Now note
that the two vertices of an edge of QX either lie in the same hyperplane Hl, or in two adjacent
parallel hyperplanes Hl and Hl+1, with l ∈N. Hence the hyperplane Hk does not slice any edges
of QX and conv(Zk) = QX ∩Hk. The set Zk is not contained in any proper face of QX and
hence conv(Zk) intersects the interior of QX. Thus dim(conv(Zk)) = dim( QX) −1, as was
claimed.
Lemma 22 implies the following.
Corollary 23. Let x ∈X , and 2k−3 ≤n. There is a slicing C1 = {C1,1,...,C 1,k}of Xby
k−1 parallel hyperplanes such that ∪k−1
l=1 C1,l = Bx(2k−3) is the Hamming ball of radius 2k−3
centered at xand the matrix AC1 = (AC1,1 |···| AC1,k−1 ) has full rank.
Recall that AX(d) denotes the maximal cardinality of a subset of X of minimum Hamming
distance at least d. When X= {0,1,...,q −1}n we write Aq(n,d). Let KX(d) denote the minimal
cardinality of a subset of Xwith covering radius d.
Proposition 24 (Binary visible units) . Let X = {0,1}n and |Yj|= sj for all j ∈[m]. If X
contains mdisjoint Hamming balls of radii 2sj −3, j ∈[m] whose complement has full rank, then
RBMtropical
X,Y has the expected dimension, min{∑
j∈[m](sj −1)(n+ 1) +n,2n −1}.
In particular, ifX= {0,1}nand Y= {0,1,...,s −1}mwith m< A2(n,d) and d= 4(s−1)−
1, then RBMX,Yhas the expected dimension. It is known that A2(n,d) ≥2n−⌈log2(∑d−2
j=0 (n−1
j ))⌉.
Proposition 25 (Binary hidden units). Let Y= {0,1}m and Xbe arbitrary.
•If m+ 1 ≤AX(3), then RBMtropical
X,{0,1}m has dimension (1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If m+ 1 ≥KX(1), then RBMtropical
X,{0,1}m has dimension |X|− 1.
Let Y= {0,1}m and X= {0,1,...,q −1}n, where qis a prime power.
•If m+ 1 ≤qn−⌈logq(1+(n−1)(q−1)+1)⌉, then RBMtropical
X,Y has dimension
(1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If n = ( qr −1)/(q−1) for some r ≥2, then AX(3) = KX(1), and RBMtropical
X,Y has the
expected dimension for any m.
In particular, when all units are binary andm< 2n−⌈log2(n+1)⌉, then RBMX,Yhas the expected
dimension; this was shown in [Cueto et al., 2010].
Proposition 26 (Arbitrary sized units). If Xcontains mdisjoint Hamming balls of radii 2|Y1|−
3,..., 2|Ym|−3, and the complement of their union has full rank, thenRBMtropical
X,Y has the expected
dimension.
14
DISCRETE RESTRICTED BOLTZMANN MACHINES
Proof. Propositions 24, 25, and 26 follow from Theorem 21 and Corollary 23 together with the
following explicit bounds on A by [Gilbert, 1952, Varshamov, 1957]:
Aq(n,d) ≥ qn
∑d−1
j=0
(n
j
)
(q−1)j.
If qis a prime power, thenAq(n,d) ≥qk, where kis the largest integer withqk < qn
∑d−2
j=0 (n−1
j )(q−1)j .
In particular, A2(n,3) ≥2k, where k is the largest integer with 2k < 2n
(n−1)+1 = 2n−log2(n), i.e.,
k= n−⌈log2(n+ 1)⌉.
Example 27. Many results in coding theory can now be translated directly to statements about
the dimension of discrete RBMs. Here is an example. Let X = {1,2,...,s }×{ 1,2,...,s }×
{1,2,...,t }, s ≤t. The minimum cardinality of a code C ⊆X with covering-radius one equals
KX(1) = s2 −
⌊
(3s−t)2
8
⌋
if t ≤3s, and KX(1) = s2 otherwise [see Cohen et al., 2005, Theo-
rem 3.7.4]. Hence RBMtropical
X,{0,1}m has dimension |X|−1 when m+ 1 ≥s2 −
⌊
(3s−t)2
8
⌋
and t≤3s,
and when m+ 1 ≥s2 and t> 3s.
8 Discussion
In this note we study the representational power of RBMs with discrete units. Our results generalize
a diversity of previously known results for standard binary RBMs and na ¨ıve Bayes models. They
help contrasting the geometric-combinatorial properties of distributed products of experts versus
non-distributed mixtures of experts.
We estimate the number of hidden units for which discrete RBM models can approximate any
distribution to any desired accuracy, depending on the cardinalities of their units’ state spaces. This
analysis shows that the maximal approximation error increases at most logarithmically with the
total number of visible states and decreases at least logarithmically with the sum of the number of
states of the hidden units. This observation could be helpful, for example, in designing a penalty
term to allow comparison of models with differing numbers of units. It is worth mentioning that the
submodels of discrete RBMs described in Theorem 15 can be used not only to estimate the maximal
model approximation errors, but also the expected model approximation errors given a prior of target
distributions on the probability simplex. See [Mont ´ufar and Rauh, 2012] for an exact analysis of
Dirichlet priors. In future work it would be interesting to study the statistical approximation errors
of discrete RBMs and to complement the theory by an empirical evaluation.
The combinatorics of tropical discrete RBMs allows us to relate the dimension of discrete RBM
models to the solutions of linear optimization problems and slicings of convex support polytopes by
normal fans of simplices. We use this to show that the modelRBMX,Yhas the expected dimension
for many choices of Xand Y, but not for all choices. We based our explicit computations of the
dimension of RBMs on slicings by collections of parallel hyperplanes, but more general classes of
slicings may be considered. The same tools presented in this paper can be used to estimate the
dimension of a general class of models involving interactions within layers, defined as Kronecker
products of hierarchical models [see Mont ´ufar and Morton, 2013]. We think that the geometric-
combinatorial picture of discrete RBMs developed in this paper may be helpful in solving various
long standing theoretical problems in the future, for example: What is the exact dimension of na¨ıve
15
MONT ´UFAR AND MORTON
Bayes models with general discrete variables? What is the smallest number of hidden variables that
make an RBM a universal approximator? Do binary RBMs always have the expected dimension?
Acknowledgments
We are grateful to the ICLR 2013 community for very valuable comments. This work was accom-
plished in part at the Max Planck Institute for Mathematics in the Sciences. This work is supported
in part by DARPA grant FA8650-11-1-7145.
References
M. Aoyagi. Stochastic complexity and generalization error of a Restricted Boltzmann Machine in
Bayesian estimation. J. Mach. Learn. Res., 99:1243–1272, August 2010.
N. Ay and A. Knauf. Maximizing multi-information. Kybernetika, 42(5):517–538, 2006.
Y . Bengio. Learning deep architectures for AI.Found. Trends Mach. Learn., 2(1):1–127, 2009.
Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks.
In B. Sch ¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing
Systems 19, pages 153–160. MIT Press, Cambridge, MA, 2007.
M. A. Carreira-Perpi ˜nan and G. E. Hinton. On contrastive divergence learning. In Proceedings of
the 10-th Interantional Workshop on Artificial Intelligence and Statistics, 2005.
M. V . Catalisano, A. V . Geramita, and A. Gimigliano. Secant varieties ofP1 ×···× P1 (n-times)
are not defective for n≥5. J. Algebraic Geometry, 20:295–327, 2011.
G. Cohen, I. Honkala, S. Litsyn, and A. Lobstein. Covering Codes. North-Holland Mathematical
Library. Elsevier Science, 2005.
M. A. Cueto, J. Morton, and B. Sturmfels. Geometry of the restricted Boltzmann machine. In
M. Viana and H. Wynn, editors, Algebraic methods in statistics and probability II, AMS Special
Session, volume 2. American Mathematical Society, 2010.
G. E. Dahl, R. P. Adams, and H. Larochelle. Training restricted Boltzmann machines on word
observations. arXiv:1202.5695, 2012.
A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological) , 39(1):1–38,
1977.
J. Draisma. A tropical approach to secant dimensions. J. Pure Appl. Algebra , 212(2):349–363,
2008.
Y . Freund and D. Haussler. Unsupervised learning of distributions of binary vectors using 2-layer
networks. In J. E. Moody, S. J. Hanson, and R. Lippmann, editors, Advances in Neural Informa-
tion Processing Systems 4, pages 912–919. Morgan Kaufmann, 1991.
16
DISCRETE RESTRICTED BOLTZMANN MACHINES
E. N. Gilbert. A comparison of signalling alphabets. Bell System Technical Journal, 31:504–522,
1952.
G. E. Hinton. Products of experts. In Proceedings 9-th ICANN, volume 1, pages 1–6, 1999.
G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Compu-
tation, 14:1771–1800, 2002.
G. E. Hinton. A practical guide to training restricted Boltzmann machines, version 1. Technical
report, UTML2010-003, University of Toronto, 2010.
G. E. Hinton, S. Osindero, and Y . Teh. A fast learning algorithm for deep belief nets. Neural
Computation, 18:1527–1554, 2006.
N. Le Roux and Y . Bengio. Representational power of restricted Boltzmann machines and deep
belief networks. Neural Computation, 20(6):1631–1649, 2008.
P. M. Long and R. A. Servedio. Restricted Boltzmann machines are hard to approximately evaluate
or simulate. In J. F ¨urnkranz and T. Joachims, editors, Proceedings of the 27th International
Conference on Machine Learning (ICML-10), pages 703–710. Omnipress, 2010.
D. Lowd and P. Domingos. Naive Bayes models for probability estimation. In Proceedings of the
22nd International Conference on Machine Learning, pages 529–536. ACM Press, 2005.
T. K. Marks and J. R. Movellan. Diffusion networks, products of experts, and factor analysis. In
Proc. 3rd Int. Conf. Independent Component Anal. Signal Separation, pages 481–485, 2001.
F. Mat´uˇs and N. Ay. On maximization of the information divergence from an exponential family. In
Proceedings of the WUPES’03, pages 199–204. University of Economics, Prague, 2003.
R. Memisevic and G. E. Hinton. Learning to represent spatial transformations with factored higher-
order Boltzmann machines. Neural Computation, 22(6):1473–1492, June 2010.
G. Mont´ufar. Mixture decompositions of exponential families using a decomposition of their sample
spaces. Kybernetika, 49(1), 2013.
G. Mont ´ufar and N. Ay. Refinements of universal approximation results for deep belief networks
and restricted Boltzmann machines. Neural Computation, 23(5):1306–1319, 2011.
G. Mont ´ufar and J. Morton. When does a mixture of products contain a product of mixtures?
http://arxiv.org/abs/1206.0387, 2012.
G. Mont´ufar and J. Morton. Geometry of hierarchical models on hidden-visible products of simpli-
cial complexes. 2013. In preparation.
G. Mont´ufar and J. Rauh. Scaling of model approximation errors and expected entropy distances.
In Proc. of the 9th Workshop on Uncertainty Processing (WUPES 2012), pages 137–148, 2012.
Preprint available at http://arxiv.org/abs/1207.3399.
G. Mont ´ufar, J. Rauh, and N. Ay. Expressive power and approximation errors of restricted Boltz-
mann machines. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. C. N. Pereira, and K. Q. Weinberger,
editors, Advances in Neural Information Processing Systems 24, pages 415–423, 2011.
17
MONT ´UFAR AND MORTON
S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of Markov random
fields. In J. C. Platt, D. Koller, Y . Singer, and S. Roweis, editors,Advances in Neural Information
Processing Systems 20, pages 1121–1128. MIT Press, Cambridge, MA, 2008.
L. Pachter and B. Sturmfels. Tropical geometry of statistical models. Proceedings of the National
Academy of Sciences of the United States of America, 101(46):16132–16137, Nov. 2004.
M. Ranzato, A. Krizhevsky, and G. E. Hinton. Factored 3-Way Restricted Boltzmann Machines For
Modeling Natural Images. In Proc. Thirteenth International Conference on Artificial Intelligence
and Statistics (AISTATS), pages 621–628, 2010.
W. E. Roth. On direct product matrices. Bulletin of the American Mathematical Society , 40:461–
468, 1934.
R. Salakhutdinov, A. Mnih, and G. E. Hinton. Restricted Boltzmann machines for collaborative
filtering. In Proceedings of the 24th International Conference on Machine Learning, pages 791–
798, 2007.
T. J. Sejnowski. Higher-order Boltzmann machines. In Neural Networks for Computing , pages
398–403. American Institute of Physics, 1986.
P. Smolensky. Information processing in dynamical systems: foundations of harmony theory. In
Symposium on Parallel and Distributed Processing, 1986.
T. Tran, D. Phung, and S. Venkatesh. Mixed-variate restricted Boltzmann machines. InProc. of 3rd
Asian Conference on Machine Learning (ACML), pages 213–229, 2011.
R. R. Varshamov. Estimate of the number of signals in error correcting codes.Doklady Akad. Nauk
SSSR, 117:739–741, 1957.
M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application
to information retrieval. In L. K. Saul, Y . Weiss, and L. Bottou, editors, Advances in Neural
Information Processing Systems 17, pages 1481–1488. MIT Press, Cambridge, MA, 2005.
18
|
Guido F. Montufar, Jason Morton
|
Unknown
| 2,013
|
{"id": "ttxM6DQKghdOi", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358411400000, "tmdate": 1358411400000, "ddate": null, "number": 59, "content": {"title": "Discrete Restricted Boltzmann Machines", "decision": "conferenceOral-iclr2013-conference", "abstract": "In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code", "pdf": "https://arxiv.org/abs/1301.3529", "paperhash": "montufar|discrete_restricted_boltzmann_machines", "keywords": [], "conflicts": [], "authors": ["Guido F. Montufar", "Jason Morton"], "authorids": ["guidomontufar@googlemail.com", "jason.morton@gmail.com"]}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["guidomontufar@googlemail.com"], "writers": []}
|
[Review]:
We appreciate the comments of all three reviewers. We posted a revised version of the paper to the arxiv (scheduled to be announced March 18 2013).
While reviewer 1922 found the paper ``comprehensive'' and ``clearly written'', reviewers e437 and fce0 were very concerned with the presentation of the paper, describing it as ``clearly not written for a machine learning audience'' and ``As it is, the paper does not cater to a machine learning crowd '' and recommended ``this paper should be submitted to a journal'' (e437) and ``I advise the authors to either: - submit it to an algebraic geometry venue - give as many intuitions as possible to help the reader get a full grasp on the results presented. '' (fce0).
Having these recommendations in mind we recognized how certain parts of the original paper might have been too technical to be presented in this venue. We decided to revise the paper focusing on the results that could be most interesting for ICLR, providing a more intuitive picture of the main results, and to treat the purely mathematical problems elsewhere.
We significantly shortened the paper from 20 to 11.5 pages + references. We reorganized the entire paper in order to improve the readability and reduce the number of definitions and concepts used throughout. In the revision we focus on the main results which do not require much mathematical background. Following the recommendation ``it is unreasonable to put all the proof in the supplementary material where they are unlikely to receive the necessary attention'' we included the proofs in the main part of the paper.
We appreciate the positive comments of reviewer 1922, which served as orientation for which of the results could be most interesting to present here in detail. Further, we thank reviewer 1922 for the literature suggestions regarding RBMs with interactions within layers and training, but in the re-organized paper we elected not to treat these topics.
|
Guido F. Montufar, Jason Morton
| null | null |
{"id": "uc6XK8UgDGKmi", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363572060000, "tmdate": 1363572060000, "ddate": null, "number": 2, "content": {"title": "", "review": "We appreciate the comments of all three reviewers. We posted a revised version of the paper to the arxiv (scheduled to be announced March 18 2013). \r\n\r\nWhile reviewer 1922 found the paper ``comprehensive'' and ``clearly written'', reviewers e437 and fce0 were very concerned with the presentation of the paper, describing it as ``clearly not written for a machine learning audience'' and ``As it is, the paper does not cater to a machine learning crowd '' and recommended ``this paper should be submitted to a journal'' (e437) and ``I advise the authors to either: - submit it to an algebraic geometry venue - give as many intuitions as possible to help the reader get a full grasp on the results presented. '' (fce0). \r\n\r\nHaving these recommendations in mind we recognized how certain parts of the original paper might have been too technical to be presented in this venue. We decided to revise the paper focusing on the results that could be most interesting for ICLR, providing a more intuitive picture of the main results, and to treat the purely mathematical problems elsewhere. \r\n\r\nWe significantly shortened the paper from 20 to 11.5 pages + references. We reorganized the entire paper in order to improve the readability and reduce the number of definitions and concepts used throughout. In the revision we focus on the main results which do not require much mathematical background. Following the recommendation ``it is unreasonable to put all the proof in the supplementary material where they are unlikely to receive the necessary attention'' we included the proofs in the main part of the paper. \r\n\r\nWe appreciate the positive comments of reviewer 1922, which served as orientation for which of the results could be most interesting to present here in detail. Further, we thank reviewer 1922 for the literature suggestions regarding RBMs with interactions within layers and training, but in the re-organized paper we elected not to treat these topics."}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttxM6DQKghdOi", "readers": ["everyone"], "nonreaders": [], "signatures": ["Guido F. Montufar, Jason Morton"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 1,
"importance_and_relevance": 2,
"materials_and_methods": 0,
"praise": 2,
"presentation_and_reporting": 2,
"results_and_discussion": 4,
"suggestion_and_solution": 4,
"total": 12
}
| 1.416667
| 1.400884
| 0.015782
| 1.430652
| 0.202083
| 0.013985
| 0.166667
| 0.083333
| 0.166667
| 0
| 0.166667
| 0.166667
| 0.333333
| 0.333333
|
{
"criticism": 0.16666666666666666,
"example": 0.08333333333333333,
"importance_and_relevance": 0.16666666666666666,
"materials_and_methods": 0,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0.16666666666666666,
"results_and_discussion": 0.3333333333333333,
"suggestion_and_solution": 0.3333333333333333
}
| 1.416667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttxM6DQKghdOi
|
Discrete Restricted Boltzmann Machines
|
In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code
|
Discrete Restricted Boltzmann Machines
Guido Mont´ufar GFM 10@ PSU .EDU
Jason Morton MORTON @MATH .PSU .EDU
Department of Mathematics
Pennsylvania State University
University Park, PA 16802, USA
Abstract
We describe discrete restricted Boltzmann machines: probabilistic graphical models with bipar-
tite interactions between visible and hidden discrete variables. Examples are binary restricted
Boltzmann machines and discrete na ¨ıve Bayes models. We detail the inference functions and
distributed representations arising in these models in terms of configurations of projected prod-
ucts of simplices and normal fans of products of simplices. We bound the number of hidden
variables, depending on the cardinalities of their state spaces, for which these models can ap-
proximate any probability distribution on their visible states to any given accuracy. In addition,
we use algebraic methods and coding theory to compute their dimension.
Keywords: Restricted Boltzmann Machine, Na¨ıve Bayes Model, Representational Power, Dis-
tributed Representation, Expected Dimension
1 Introduction
A restricted Boltzmann machine (RBM) is a probabilistic graphical model with bipartite interactions
between an observed set and a hidden set of units [see Smolensky, 1986, Freund and Haussler,
1991, Hinton, 2002, 2010]. A characterizing property of these models is that the observed units
are independent given the states of the hidden units and vice versa. This is a consequence of the
bipartiteness of the interaction graph and does not depend on the units’ state spaces. Typically
RBMs are defined with binary units, but other types of units have also been considered, including
continuous, discrete, and mixed type units [see Welling et al., 2005, Marks and Movellan, 2001,
Salakhutdinov et al., 2007, Dahl et al., 2012, Tran et al., 2011]. We study discrete RBMs, also called
multinomial or softmax RBMs, which are special types of exponential family harmoniums [Welling
et al., 2005]. While each unit Xi of a binary RBM has the state space {0,1}, the state space of
each unit Xi of a discrete RBM is a finite set Xi = {0,1,...,r i −1}. Like binary RBMs, discrete
RBMs can be trained using contrastive divergence (CD) [Hinton, 1999, 2002, Carreira-Perpi˜nan and
Hinton, 2005] or expectation-maximization (EM) [Dempster et al., 1977] and can be used to train
the parameters of deep systems layer by layer [Hinton et al., 2006, Bengio et al., 2007].
Non-binary visible units are natural because they can directly encode non-binary features. The
situation with hidden units is more subtle. States that appear in different hidden units can be acti-
1
arXiv:1301.3529v4 [stat.ML] 22 Apr 2014
MONT ´UFAR AND MORTON
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
24 40 79
Figure 1: Examples of probability models treated in this paper, in the special case of binary visible
variables. The light (dark) nodes represent visible (hidden) variables with the indicated number of
states. The total parameter count of each model is indicated at the top. From left to right: a binary
RBM; a discrete RBM with one 8-valued and one binary hidden units; and a binary na ¨ıve Bayes
model with 16 hidden classes.
vated by the same visible vector, but states that appear in the same hidden unit are mutually exclu-
sive. Non-binary hidden units thus allow one to explicitly represent complex exclusive relationships.
For example, a discrete RBM topic model would allow some topics to be mutually exclusive and
other topics to be mixed together freely. This provides a better match to the semantics of several
learning problems, although the learnability of such representations is mostly open. The practical
need to represent mutually exclusive properties is evidenced by the common approach of adding
activation sparsity parameters to binary RBM hidden states, which artificially create mutually ex-
clusive non-binary states by penalizing models which have more than a certain percentage of hidden
units active.
A discrete RBM is a product of experts [Hinton, 1999]; each hidden unit represents an expert
which is a mixture model of product distributions, or na¨ıve Bayes model. Hence discrete RBMs cap-
ture both na¨ıve Bayes models and binary RBMs, and interpolate between non-distributed mixture
representations and distributed mixture representations [Bengio, 2009, Mont´ufar and Morton, 2012].
See Figure 1. Na¨ıve Bayes models have been studied across many disciplines. In machine learning
they are most commonly used for classification and clustering, but have also been considered for
probabilistic modelling [Lowd and Domingos, 2005, Mont ´ufar, 2013]. Theoretical work on binary
RBM models includes results on universal approximation [Freund and Haussler, 1991, Le Roux
and Bengio, 2008, Mont ´ufar and Ay, 2011], dimension and parameter identifiability [Cueto et al.,
2010], Bayesian learning coefficients [Aoyagi, 2010], complexity [Long and Servedio, 2010], and
approximation errors [Mont´ufar et al., 2011]. In this paper we generalize some of these theoretical
results to discrete RBMs.
Probability models with more general interactions than strictly bipartite have also been consid-
ered, including semi-restricted Boltzmann machines and higher-order interaction Boltzmann ma-
chines [see Sejnowski, 1986, Memisevic and Hinton, 2010, Osindero and Hinton, 2008, Ranzato
et al., 2010]. The techniques that we develop in this paper also serve to treat a general class of
RBM-like models allowing within-layer interactions, a generalization that will be carried out in a
forthcoming work [Mont´ufar and Morton, 2013].
Section 2 collects basic facts about independence models, na ¨ıve Bayes models, and binary
RBMs, including an overview on the aforementioned theoretical results. Section 3 defines discrete
RBMs formally and describes them as (i) products of mixtures of product distributions (Proposi-
tion 7) and (ii) as restricted mixtures of product distributions. Section 4 elaborates on distributed
representations and inference functions represented by discrete RBMs (Proposition 11, Lemma 12,
2
DISCRETE RESTRICTED BOLTZMANN MACHINES
ex1=1
ex2=1
ex3=1
ex1=1
ex1=2
ex2=1
Figure 2: The convex support of the independence model of three binary variables (left) and of a
binary-ternary pair of variables (right) discussed in Example 1.
and Proposition 14). Section 5 addresses the expressive power of discrete RBMs by describing
explicit submodels (Theorem 15) and provides results on their maximal approximation errors and
universal approximation properties (Theorem 16). Section 6 treats the dimension of discrete RBM
models (Proposition 17 and Theorem 19). Section 7 contains an algebraic-combinatorial discussion
of tropical discrete RBM models (Theorem 21) with consequences for their dimension collected in
Propositions 24, 25, and 26.
2 Preliminaries
2.1 Independence models
Consider a system of n <∞random variables X1,...,X n. Assume that Xi takes states xi in a
finite set Xi = {0,1,...,r i −1}for all i ∈{1,...,n }=: [n]. The state space of this system is
X:= X1 ×···×X n. We write xλ = (xi)i∈λ for a joint state of the variables with index i∈λfor
any λ⊆[n], and x= (x1,...,x n) for a joint state of all variables. We denote by ∆(X) the set of
all probability distributions on X. We write ⟨a,b⟩for the inner product a⊤b.
The independence model of the variables X1,...,X n is the set of product distributions p(x) =∏
i∈[n] pi(xi) for all x∈X, where pi is a probability distribution with state space Xi for all i∈[n].
This model is the closure EX (in the Euclidean topology) of the exponential family
EX :=
{ 1
Z(θ) exp(⟨θ,A(X)⟩): θ∈RdX
}
, (1)
where A(X) ∈RdX×X is a matrix of sufficient statistics; with rows equal to the indicator functions
1X and 1{x: xi=yi}for all yi ∈Xi \{0}for all i ∈[n]. The partition function Z(θ) normalizes
the distributions. The convex support of EX is the convex hull QX := conv({A(X)
x }x∈X) of the
columns of A(X), which is a Cartesian product of simplices with QX ∼= ∆(X1) ×···× ∆(Xn).
Example 1. The sufficient statistics of the independence models EX and EX′ with state spaces
3
MONT ´UFAR AND MORTON
X= {0,1}3 and X′= {0,1,2}×{0,1}are, with rows labeled by indicator functions,
A(X) =
[1
1
1
] [1
1
0
] [1
0
1
] [1
0
0
] [0
1
1
] [0
1
0
] [0
0
1
] [0
0
0
]
1 1 1 1 1 1 1 1
1 1 1 1 0 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
x3 = 1
x2 = 1
x1 = 1
A(X′) =
[1
2
] [1
1
] [1
0
] [0
2
] [0
1
] [0
0
]
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
x2 = 1
x1 = 2
x1 = 1
.
In the first case the convex support is a cube and in the second it is a prism. Both convex supports
are three-dimensional polytopes, but the prism has fewer vertices and is more similar to a simplex,
meaning that its vertex set is affinely more independent than that of the cube. See Figure 2.
2.2 Na ¨ıve Bayes models
Let k∈N. The k-mixture of the independence model, or na¨ıve Bayes modelwith khidden classes,
with visible variables X1,...,X n is the set of all probability distributions expressible as convex
combinations of kpoints in EX:
MX,k :=
{∑
i∈[k]
λip(i) : p(i) ∈EX, λi ≥0, for all i∈[k], and
∑
i∈[k]
λi = 1
}
. (2)
We write Mn,k for the k-mixture of the independence model of nbinary variables. The dimen-
sions of mixtures of binary independence models are known:
Theorem 2 (Catalisano et al. [2011]). The mixtures of binary independence models Mn,k have the
dimension expected from counting parameters,min{nk+ (k−1),2n−1}, except for M4,3, which
has dimension 13 instead of 14.
Let AX(d) denote the maximal cardinality of a subset X′⊆X of minimum Hamming distance
at least d, i.e., the maximal cardinality of a subset X′⊆X with dH(x,y) ≥dfor all distinct points
x,y ∈X′, where dH(x,y) := |{i∈[n]: xi ̸= yi}|denotes the Hamming distance betweenxand y.
The function AXis familiar in coding theory. Thek-mixtures of independence models are universal
approximators when kis large enough. This can be made precise in terms of AX(2):
Theorem 3 (Mont´ufar [2013]). The mixture model MX,k can approximate any probability distri-
bution on Xarbitrarily well if k≥|X|/maxi∈[n] |Xi|and only if k≥AX(2).
By results from [Gilbert, 1952, Varshamov, 1957], when q is a power of a prime number and
X= {0,1,...,q −1}n, then AX = qn−1. In these cases the previous theorem shows that MX,k
is a universal approximator of distributions on Xif and only if k ≥qn−1. In particular, the small-
est na¨ıve Bayes model universal approximator of distributions on {0,1}n has 2n−1(n+ 1) −1
parameters.
Some of the distributions not representable by a given na¨ıve Bayes model can be characterized
in terms of their modes. A state x∈X is a mode of a distribution p∈∆(X) if p(x) >p(y) for all
ywith dH(x,y) = 1 and it is a strong mode if p(x) >∑
y: dH(x,y)=1 p(y).
Lemma 4 (Mont´ufar and Morton [2012]). If a mixture of product distributions p = ∑
iλip(i) has
strong modes C⊆X , then there is a mixture component p(i) with mode xfor each x∈C.
4
DISCRETE RESTRICTED BOLTZMANN MACHINES
2.3 Binary restricted Boltzmann machines
The binary RBM model with nvisible and mhidden units, denoted RBMn,m, is the set of distribu-
tions on {0,1}n of the form
p(x) = 1
Z(W,B,C )
∑
h∈{0,1}m
exp(h⊤Wx + B⊤x+ C⊤h) for all x∈{0,1}n, (3)
where xdenotes states of the visible units, hdenotes states of the hidden units, W = (Wji)ji ∈
Rm×n is a matrix of interaction weights, B ∈Rn and C ∈Rm are vectors of bias weights, and
Z(W,B,C ) = ∑
x∈{0,1}n
∑
h∈{0,1}m exp(h⊤Wx + B⊤x+ C⊤h) is the normalizing partition
function.
It is known that these models have the expected dimension for many choices of nand m:
Theorem 5 (Cueto et al. [2010]). The dimension of the model RBMn,m is equal to nm+ n+ m
when m+ 1 ≤2n−⌈log2(n+1)⌉and it is equal to 2n −1 when m≥2n−⌊log2(n+1)⌋.
It is also known that with enough hidden units, binary RBMs are universal approximators:
Theorem 6 (Mont´ufar and Ay [2011]). The model RBMn,m can approximate any distribution on
{0,1}n arbitrarily well whenever m≥2n−1 −1.
A previous result by Le Roux and Bengio [2008, Theorem 2] shows thatRBMn,m is a universal
approximator wheneverm≥2n+1. It is not known whether the bounds from Theorem 6 are always
tight, but they show that for any given n, the smallest RBM universal approximator of distributions
on {0,1}n has at most 2n−1(n+ 1) −1 parameters and hence not more than the smallest na ¨ıve
Bayes model universal approximator (Theorem 3).
3 Discrete restricted Boltzmann machines
Let Xi = {0,1,...,r i−1}for all i∈[n] and Yj = {0,1,...,s j−1}for all j ∈[m]. The graphical
model with full bipartite interactions {{i,j}: i∈[n],j ∈[m]}on X×Y is the exponential family
EX,Y:=
{ 1
Z(θ) exp(⟨θ,A(X,Y)⟩): θ∈RdXdY
}
, (4)
with sufficient statistics matrix equal to the Kronecker product A(X,Y) = A(X) ⊗A(Y) of the
sufficient statistics matrices A(X) and A(Y) of the independence models EX and EY. The matrix
A(X,Y) has dXdY =
(∑
i∈[n](|Xi|−1) + 1
)(∑
j∈[m](|Yi|−1) + 1
)
linearly independent rows
and |X×Y| columns, each column corresponding to a joint state (x,y) of all variables. Disregard-
ing the entry of θ that is multiplied with the constant row of A(X,Y), which cancels out with the
normalization function Z(θ), this parametrization of EX,Y is one-to-one. In particular, this model
has dimension dim(EX,Y) = dXdY−1.
The discrete RBM model RBMX,Yis the following set of marginal distributions:
RBMX,Y:=
{
q(x) =
∑
y∈Y
p(x,y) for all x∈X : p∈EX,Y
}
. (5)
5
MONT ´UFAR AND MORTON
In the case of one single hidden unit, this model is the na¨ıve Bayes model onXwith |Y1|hidden
classes. When all units are binary, X = {0,1}n and Y= {0,1}m, this model is RBMn,m. Note
that the exponent in eq. (3) can be written as (h⊤Wx + B⊤x+ C⊤h) = ⟨θ,A(X,Y)
(x,h) ⟩, taking for θ
the column-by-column vectorization of the matrix
(0 B⊤
C W
)
.
Conditional distributions
The conditional distributions of discrete RBMs can be described in the following way. Consider a
vector θ ∈RdXdY parametrizing EX,Y, and the matrix Θ ∈RdY×dX with column-by-column vec-
torization equal toθ. A lemma by Roth [1934] shows thatθ⊤(A(X)⊗A(Y))(x,y) = (A(X)
x )⊤Θ⊤A(Y)
y
for all x∈X, y∈Y, and hence
⣨
θ,A(X,Y)
(x,y)
⟩
=
⣨
ΘA(X)
x ,A(Y)
y
⟩
=
⣨
Θ⊤A(Y)
y ,A(X)
x
⟩
∀x∈X,y ∈Y. (6)
The inner product in eq. (6) describes following probability distributions:
pθ(·,·) = 1
Z(θ) exp
(⟨
θ,A(X,Y)⟩)
, (7)
pθ(·|x) = 1
Z
(
ΘA(X)
x
)exp
(⟨
ΘA(X)
x ,A(Y)⟩)
, and (8)
pθ(·|y) = 1
Z
(
Θ⊤A(Y)
y
)exp
(⟨
Θ⊤A(Y)
y ,A(X)⟩)
. (9)
Geometrically, ΘA(X) is a linear projection of the columns of the sufficient statistics matrix A(X)
into the parameter space of EY, and similarly, Θ⊤A(Y) is a linear projection of the columns of A(Y)
into the parameter space of EX.
Polynomial parametrization
Discrete RBMs can be parametrized not only in the exponential way discussed above, but also by
simple polynomials. The exponential family EX,Ycan be parametrized by square free monomials:
p(v,h) = 1
Z
∏
{j,i}∈ [m] ×[n],
(y′
j,x′
i) ∈Yj ×Xi
(γ{j,i},(y′
j,x′
i))
δy′
j
(hj)δx′
i
(vi)
for all (v,h) ∈Y×X , (10)
where γ{j,i},(y′
j,x′
i) are positive reals. The probability distributions in RBMX,Ycan be written as
p(v) = 1
Z
∏
j∈[m]
( ∑
hj∈Yj
γ{j,1},(hj,v1) ···γ{j,n},(hj,vn)
)
for all v∈X. (11)
The parameters γ{j,i},(y′
j,x′
i) correspond to exp(θ{j,i},(y′
j,x′
i)) in the parametrization given in eq. (4).
6
DISCRETE RESTRICTED BOLTZMANN MACHINES
Products of mixtures and mixtures of products
In the following we describe discrete RBMs from two complementary perspectives: (i) as products
of experts, where each expert is a mixture of products, and (ii) as restricted mixtures of product
distributions. The renormalized entry-wise (Hadamard) product of two probability distributions p
and qon Xis defined as p◦q := (p(x)q(x))x∈X/∑
y∈Xp(y)q(y). Here we assume that pand q
have overlapping supports, such that the definition makes sense.
Proposition 7. The model RBMX,Yis a Hadamard product of mixtures of product distributions:
RBMX,Y= MX,|Y1|◦···◦M X,|Ym|.
Proof. The statement can be seen directly by considering the parametrization from eq. (11). To
make this explicit, one can use a homogeneous version of the matrix A(X,Y) which we denote by
Aand which defines the same model. Each row of Ais indexed by an edge {i,j}of the bipartite
graph and a joint state (xi,hj) of the visible and hidden units connected by this edge. Such a row
has a one in any column when these states agree with the global state, and zero otherwise. For any
j ∈[m] let Aj,: denote the matrix containing the rows of Awith indices ({i,j},(xi,hj)) for all
xi ∈Xi for all i∈[n] for all hj ∈Yj, and let A(x,h) denote the (x,h)-column of A. We have
p(x) = 1
Z
∑
h
exp(⟨θ,A(x,h)⟩)
= 1
Z
∑
h
exp(⟨θ1,:,A1,:(x,h)⟩) exp(⟨θ2,:,A2,:(x,h)⟩) ···exp(⟨θm,:,Am,:(x,h)⟩)
= 1
Z
(∑
h1
exp(⟨θ1,:,A1,:(x,h1)⟩)
)
···
(∑
hm
exp(⟨θm,:,Am,:(x,hm)⟩)
)
= 1
Z(Z1p(1)(x)) ···(Zmp(m)(x)) = 1
Z′p(1)(x) ···p(m)(x),
where p(j) ∈MX,|Yj|and Zj = ∑
x∈X
∑
hj∈Yj exp(⟨θj,:,Aj,:(x,hj)⟩) for all j ∈[m]. Since the
vectors θj,: can be chosen arbitrarily, the factors p(j) can be made arbitrary within MX,|Yj|.
Of course, every distribution in RBMX,Y is a mixture distribution p(x) = ∑
h∈Yp(x|h)q(h).
The mixture weights are given by the marginals q(h) on Yof distributions from EX,Y, and the
mixture components can be described as follows.
Proposition 8. The set of conditional distributions p(·|h), h∈Y of a distribution in EX,Yis the set
of product distributions in EX with parameters θh = Θ⊤A(Y)
h , h ∈Y equal to a linear projection
of the vertices {A(Y)
h : h∈Y} of the Cartesian product of simplices QY∼= ∆(Y1) ×···× ∆(Ym).
Proof. This is by eq. (6).
4 Products of simplices and their normal fans
Binary RBMs have been analyzed by considering each of the mhidden units as defining a hyper-
plane Hj slicing the n-cube into two regions. To generalize the results provided by this analysis, in
7
MONT ´UFAR AND MORTON
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet
R0
R1
R2
0
1
2(0,0) (0,1)
(1,0) (1 ,1)
Θ−1(R2)
Θ−1(R1)
Θ−1(R0)
Figure 3: Three slicings of a square by the normal fan of a triangle with maximal conesR0, R1, and
R2, corresponding to three possible inference functions of RBM{0,1}2,{0,1,2}.
this section we replace the n-cube with a general product of simplices QX, and replace the two re-
gions defined by the hyperplane Hj by the |Yj|regions defined by the maximal cones of the normal
fan of the simplex ∆(Yj).
Subdivisions of independence models
The normal cone of a polytope Q ⊂Rd at a point x ∈Q is the set of all vectors v ∈Rd with
⟨v,(x−y)⟩≥ 0 for all y ∈Q. We denote by Rx the normal cone of the product of simplices
QX = conv{A(X)
x }x∈X at the vertex A(X)
x . The normal fan FX is the set of all normal cones of
QX. The product distributions pθ = 1
Z(θ) exp(⟨θ,A(X)⟩) ∈EX strictly maximized at x∈X, with
pθ(x) >pθ(y) for all y∈X\{ x}, are those with parameter vector θin the relative interior of Rx.
Hence the normal fan FX partitions the parameter space of the independence model into regions of
distributions with maxima at different inputs.
Inference functions and slicings
For any choice of parameters of the model RBMX,Y, there is an inference function π: X →Y,
(or more generally π: X→ 2Y), which computes the most likely hidden state given a visible state.
These functions are not necessarily injective nor surjective. For a visible state x, the conditional
distribution on the hidden states is a product distribution p(y|X = x) = 1
Z exp(⟨ΘA(X)
x ,A(Y)
y ⟩)
which is maximized at the state yfor which ΘA(X)
x ∈Ry. The preimages of the cones Ry by the
map Θ partition the input spaceRdX and are called inference regions. See Figure 3 and Example 10.
Definition 9. A Y-slicing of a finite set Z⊂ RdX is a partition of Zinto the preimages of the cones
Ry, y ∈Y by a linear map Θ: RdX →RdY. We assume that Θ is generic, such that it maps each
element of Zinto the interior of some Ry.
For example, when Y= {0,1}, the fan FY consists of a hyperplane and the two closed half-
spaces defined by that hyperplane. A Y-slicing is in this case a standard slicing by a hyperplane.
Example 10. Let X = {0,1,2}×{ 0,1}and Y = {0,1}4. The maximal cones Ry, y ∈Y of
the normal fan of the 4-cube with vertices {0,1}4 are the closed orthants of R4. The 6 vertices
{A(X)
x : x ∈ X}of the prism ∆({0,1,2}) ×∆({0,1}) can be mapped into 6 distinct orthants
8
DISCRETE RESTRICTED BOLTZMANN MACHINES
of R4, each orthant with an even number of positive coordinates:
3 −2 −2 −2
1 2 −2 −2
1 −2 −2 2
1 −2 2 −2
Θ
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
A(X)
=
−1 −1 1 1 1 3
1 1 3 −1 −1 1
−3 1 −1 −1 3 1
1 −3 −1 3 −1 1
. (12)
Even in the case of one single hidden unit the slicings can be complex, but the following simple
type of slicing is always available.
Proposition 11. Any slicing by k−1 parallel hyperplanes is a {1,2,...,k }-slicing.
Proof. We show that there is a line L= {λr−b: λ ∈R}, r,b ∈Rk intersecting all cells of FY,
Y= {1,...,k }. We need to show that there is a choice of rand bsuch that for every y∈Y the set
Iy ⊆R of all λwith ⟨λr−b,(ey −ez)⟩>0 for all z∈Y\{ y}has a non-empty interior. Now, Iy
is the set of λwith
λ(ry −rz) >by −bz for all z̸= y. (13)
Choosing b1 < ··· < bk and ry = f(by), where f is a strictly increasing and strictly concave
function, we get I1 = (−∞,b2−b1
r2−r1
), Iy = ( by−by−1
ry−ry−1
,by+1−by
ry+1−ry ) for y = 2,3,...,k −1, and Ik =
(bk−bk−1
rk−rk−1
,∞). The lengths ∞,l2,...,l k−1,∞of the intervals I1,...,I k can be adjusted arbitrarily
by choosing suitable differences rj+1 −rj for all j = 1,...,k −1.
Strong modes
Recall the definition of strong modes given in page 4.
Lemma 12. Let C⊆X be a set of arrays which are pairwise different in at least two entries (a
code of minimum distance two).
•If RBMX,Y contains a probability distribution with strong modes C, then there is a linear
map Θ of {A(Y)
y : y ∈Y} into the C-cells of FX (the cones Rx above the codewords x∈C)
sending at least one vertex into each cell.
•If there is a linear mapΘ of {A(Y)
y : y∈Y} into the C-cells of FX, with maxx{⟨Θ⊤A(Y)
y ,A(X)
x ⟩}=
cfor all y∈Y, then RBMX,Ycontains a probability distribution with strong modes C.
Proof. This is by Proposition 8 and Lemma 4.
A simple consequence of the previous lemma is that if the model RBMX,Y is a universal ap-
proximator of distributions on X, then necessarily the number of hidden states is at least as large as
the maximum code of visible states of minimum distance two,|Y|≥ AX(2). Hence discrete RBMs
may not be universal approximators even when their parameter count surpasses the dimension of
the ambient probability simplex.
Example 13. Let X= {0,1,2}nand Y= {0,1,..., 4}m. In this case AX(2) = 3n−1. If RBMX,Y
is a universal approximator with n= 3 and n= 4, then m≥2 and m≥3, respectively, although
the smallest mfor which RBMX,Yhas 3n −1 parameters is m= 1 and m= 2, respectively.
Using Lemma 12 and the analysis of [Mont´ufar and Morton, 2012] gives the following.
Proposition 14. If 4⌈m/3⌉≤ n, then RBMX,Ycontains distributions with 2m strong modes.
9
MONT ´UFAR AND MORTON
5 Representational power and approximation errors
In this section we describe submodels of discrete RBMs and use them to provide bounds on the
model approximation errors depending on the number of units and their state spaces. Universal
approximation results follow as special cases with vanishing approximation error.
Theorem 15. The model RBMX,Ycan approximate the following arbitrarily well:
•Any mixture of dY= 1 + ∑m
j=1(|Yj|−1) product distributions with disjoint supports.
•When dY ≥(∏
i∈[k] |Xi|)/maxj∈[k] |Xj|for some k ≤n, any distribution from the model P
of distributions with constant value on each block {x1}×···×{ xk}×Xk+1 ×···×X n for
all xi ∈Xi, for all i∈[k].
•Any probability distribution with support contained in the union ofdYsets of the form {x1}×
···×{ xk−1}×Xk ×{xk+1}×···×{ xn}.
Proof. By Proposition 7 the model RBMX,Y contains any Hadamard product p(1) ◦···◦ p(m)
with mixtures of products as factors, p(j) ∈ MX,|Yj| for all j ∈[m]. In particular, it contains
p= p(0) ◦(1 + ˜λ1 ˜p(1)) ◦···◦ (1 + ˜λm˜p(m)), where p(0) ∈EX, ˜p(j) ∈MX,|Yj|−1, and ˜λj ∈R+.
Choosing the factors ˜p(j) with pairwise disjoint supports shows thatp= ∑m
j=0 λjp(j), whereby p(0)
can be any product distribution and p(j) can be any distribution from MX,|Yj|−1 for all j ∈[m], as
long as supp(p(j)) ∩supp(p(j′)) for all j ̸= j′. This proves the first item.
For the second item: Any point in the set Pis a mixture of uniform distributions supported
on the disjoint blocks {x1}×···×{ xk}×X k+1 ×···×X n for all (x1,...,x k) ∈X1 ×···×
Xk. Each of these uniform distributions is a product distribution, since it factorizes as px1,...,xk =∏
i∈[k] δxi
∏
i∈[n]\[k] ui, where ui denotes the uniform distribution on Xi. For any j ∈ [k] any
mixture ∑
xj∈Xj λxj px1,...,xk is also a product distribution, since it factorizes as
( ∑
xj∈Xj
λxj δxj
) ∏
i∈[k]\{j}
δxi
∏
i∈[n]\[k]
ui. (14)
Hence any distribution from the set Pis a mixture of (∏
i∈[k] |Xi|)/maxj∈[k] |Xj|product distribu-
tions with disjoint supports. The claim now follows from the first item.
For the third item: The modelEXcontains any distribution with support of the form{x1}×···×
{xk−1}×Xk ×{xk+1}×···×{ xn}. Hence, by the first item, the RBM model can approximate
any distribution arbitrarily well whose support can be covered by dYsets of that form.
We now analyse the RBM model approximation errors. Let pand qbe two probability distribu-
tions on X. The Kullback-Leibler divergence frompto qis defined as D(p∥q) := ∑
x∈Xp(x) log p(x)
q(x)
when supp(p) ⊆ supp(q) and D(p∥q) := ∞otherwise. The divergence from p to a model
M ⊆∆(X) is defined as D(p∥M) := inf q∈MD(p∥q) and the maximal approximation error
of Mis supp∈∆(X) D(p∥M).
The maximal approximation error of the independence modelEXsatisfies supp∈∆(X) D(p∥EX) ≤
|X|/maxi∈[n] |Xi|, with equality when all units have the same number of states [see Ay and Knauf,
2006, Corollary 4.10].
10
DISCRETE RESTRICTED BOLTZMANN MACHINES
0 100 200 300 400 500
100
200
300
400
500
0 100 200 300 400 500
100
200
300
400
500
0.5
1
1.5
2
2.5
x 10
7
82
84
86
88
90
92
94
96
98
k
m
Maximal-error bound
k
m
Nr. parameters
Figure 4: Illustration of Theorem 16. The left panel shows a heat map of the upper bound on the
Kullback-Leibler approximation errors of discrete RBMs with 100 visible binary units and the right
panel shows a map of the total number of model parameters, both depending on the number of
hidden units mand their possible states k= |Yj|for all j ∈[m].
Theorem 16. If ∏
i∈[n]\Λ |Xi|≤ 1 +∑
j∈[m](|Yj|−1) = dYfor some Λ ⊆[n], then the Kullback-
Leibler divergence from any distribution pon Xto the model RBMX,Yis bounded by
D(p∥RBMX,Y) ≤log
∏
i∈Λ |Xi|
maxi∈Λ |Xi|.
In particular, the model RBMX,Yis a universal approximator whenever dY≥|X|/maxi∈[n] |Xi|.
Proof. The submodel Pof RBMX,Y described in the second item of Theorem 15 is a partition
model. The maximal divergence from such a model is equal to the logarithm of the cardinality of
the largest block with constant values [see Mat ´uˇs and Ay, 2003]. Thus maxpD(p∥RBMX,Y) ≤
maxpD(p∥P) = log
(
(∏
i∈Λ |Xi|)/maxi∈Λ |Xi|
)
, as was claimed.
Theorem 16 shows that, on a large scale, the maximal model approximation error ofRBMX,Yis
smaller than that of the independence model EXby at least log(1 +∑
j∈[m](|Yj|−1)), or vanishes.
The theorem is illustrated in Figure 4. The line k = 2 shows bounds on the approximation error of
binary RBMs with mhidden units, previously treated in [Mont ´ufar et al., 2011, Theorem 5.1], and
the line m= 1 shows bounds for na¨ıve Bayes models withkhidden classes.
6 Dimension
In this section we study the dimension of the model RBMX,Y. One reason RBMs are attractive is
that they have a large learning capacity, e.g. may be built with millions of parameters. Dimension
calculations show whether those parameters are wasted, or translate into higher-dimensional spaces
of representable distributions. Our analysis builds on previous work by Cueto, Morton, and Sturm-
fels [2010], where binary RBMs are treated. The idea is to bound the dimension from below by
the dimension of a related max-plus model, called the tropical RBM model [Pachter and Sturmfels,
2004], and from above by the dimension expected from counting parameters.
11
MONT ´UFAR AND MORTON
The dimension of a discrete RBM model can be bounded from above not only by its expected
dimension, but also by a function of the dimension of its Hadamard factors:
Proposition 17. The dimension of RBMX,Yis bounded as
dim(RBMX,Y) ≤dim(MX,|Yi|) +
∑
j∈[m]\{i}
dim(MX,|Yj|−1) + (m−1) for all i∈[m]. (15)
Proof. Let udenote the uniform distribution. Note thatEX◦EX = EXand also EX◦MX,k = MX,k.
This observation, together with Proposition 7, shows that the RBM model can be factorized as
RBMX,Y= (MX,|Y1|) ◦(λ1u+ (1 −λ1)MX,|Y1|) ◦···◦ (λmu+ (1 −λm)MX,|Ym|−1),
from which the claim follows.
By the previous proposition, the model RBMX,Y can have the expected dimension only if (i)
the right hand side of eq. (15) equals |X|− 1, or (ii) each mixture model MX,k has the expected
dimension for allk≤maxj∈[m] |Yj|. Sometimes none of both conditions is satisfied and the models
‘waste’ parameters:
Example 18. The k-mixture of the independence model on X1 ×X2 is a subset of the set of
|X1|×|X 2|matrices with non-negative entries and rank at most k. It is known that the set of
M ×N matrices of rank at most k has dimension k(M + N −k) for all 1 ≤k <min{M,N }.
Hence the model MX1×X2,k has dimension smaller than its parameter count whenever 1 < k <
min{|X1|,|X2|}. By Proposition 17 if (∑
j∈[m](|Yj|−1) + 1)(|X1|+ |X2|−1) ≤|X1 ×X2|and
1 < |Yj|≤ min{|X1|,|X2|}for some j ∈[m], then RBMX1×X2,Y does not have the expected
dimension.
The next theorem indicates choices of Xand Yfor which the model RBMX,Yhas the expected
dimension. Given a sufficient statistics matrix A(X), we say that a set Z⊆X has full rank when
the matrix with columns {A(X)
x : x∈Z} has full rank.
Theorem 19. When Xcontains mdisjoint Hamming balls of radii 2(|Yj|−1) −1, j ∈[m] and
the subset of Xnot intersected by these balls has full rank, then the model RBMX,Yhas dimension
equal to the number of model parameters,
dim(RBMX,Y) = (1 +
∑
i∈[n]
(|Xi|−1))(1 +
∑
j∈[m]
(|Yj|−1)) −1.
On the other hand, if mHamming balls of radius one cover X, then
dim(RBMX,Y) = |X|− 1.
In order to prove this theorem we will need two main tools: slicings by normal fans of simplices,
described in Section 4, and the tropical RBM model, described in Section 7. The theorem will follow
from the analysis contained in Section 7.
12
DISCRETE RESTRICTED BOLTZMANN MACHINES
7 Tropical model
Definition 20. The tropical model RBMtropical
X,Y is the image of the tropical morphism
RdXdY ∋θ ↦→ Φ(v; θ) = max{⟨θ,A(X,Y)
(v,h) ⟩: h∈Y} for all v∈X, (16)
which evaluates log( 1
Z(θ)
∑
h∈Yexp(⟨θ,A(X,Y)
(v,h) ⟩)) for all v ∈X for each θ within the max-plus
algebra (addition becomes a+ b = max {a,b}) up to additive constants independent of v (i.e.,
disregarding the normalization factor Z(θ)).
The idea behind this definition is thatlog(exp(a)+exp(b)) ≈max{a,b}when aand bhave dif-
ferent order of magnitude. The tropical model captures important properties of the original model.
Of particular interest is following consequence of the Bieri-Groves theorem [see Draisma, 2008],
which gives us a tool to estimate the dimension of RBMX,Y:
dim(RBMtropical
X,Y ) ≤dim(RBMX,Y) ≤min{dim(EX,Y),|X|− 1}. (17)
The following Theorem 21 describes the regions of linearity of the map Φ. Each of these
regions corresponds to a collection of Yj-slicings (see Definition 9) of the set {A(X)
x : x ∈X} for
all j ∈[m]. This result allows us to express the dimension of RBMtropical
X,Y as the maximum rank of
a class of matrices defined by collections of slicings.
For each j ∈[m] let Cj = {Cj,1,...,C j,|Yj|}be a Yj-slicing of {A(X)
x : x∈X} and let ACj,k
be the |X|× dX-matrix with x-th row equal to (A(X)
x )⊤when x∈Cj,k and equal to a row of zeros
otherwise. Let ACj = (ACj,1 |···| ACj,|Yj|) ∈R|X|×|Yj|dX and d= ∑
j∈[m] |Yj|dX.
Theorem 21. On each region of linearity, the tropical morphism Φ is the linear map Rd →
RBMtropical
X,Y represented by the |X|× d-matrix
A= (AC1 |···| ACm),
modulo constant functions. In particular, dim(RBMtropical
X,Y ) + 1 is the maximum rank of Aover all
possible collections of slicings C1,...,C m.
Proof. Again use the homogeneous version of the matrix A(X,Y) as in the proof of Proposition
7; this will not affect the rank of A. Let θhj = ( θ{j,i},(hj,xi))i∈[n],xi∈Xi and let Ahj denote the
submatrix of A(X,Y) containing the rows with indices {{j,i},(hj,xi): i∈[n],xi ∈Xi}. For any
given v∈X we have
max
{⟨
θ,A(X,Y)
(v,h)
⟩
: h∈Y
}
=
∑
j∈[m]
max
{⟨
θhj ,Ahj (v,hj)
⟩
: hj ∈Yj
}
,
from which the claim follows.
In the following we evaluate the maximum rank of the matrixAfor various choices of Xand Y
by examining good slicings. We focus on slicings by parallel hyperplanes.
Lemma 22. For any x∗∈X and 0 <k <n the affine hull of the set {A(X)
x : dH(x,x∗) = k}has
dimension ∑
i∈[n](|Xi|−1) −1.
13
MONT ´UFAR AND MORTON
Proof. Without loss of generality let x∗ = (0,..., 0). The set Zk := {A(X)
x : dH(x,x∗) = k}is
the intersection of {A(X)
x : x ∈X} with the hyperplane Hk := {z: ⟨1,z⟩= k+ 1}. Now note
that the two vertices of an edge of QX either lie in the same hyperplane Hl, or in two adjacent
parallel hyperplanes Hl and Hl+1, with l ∈N. Hence the hyperplane Hk does not slice any edges
of QX and conv(Zk) = QX ∩Hk. The set Zk is not contained in any proper face of QX and
hence conv(Zk) intersects the interior of QX. Thus dim(conv(Zk)) = dim( QX) −1, as was
claimed.
Lemma 22 implies the following.
Corollary 23. Let x ∈X , and 2k−3 ≤n. There is a slicing C1 = {C1,1,...,C 1,k}of Xby
k−1 parallel hyperplanes such that ∪k−1
l=1 C1,l = Bx(2k−3) is the Hamming ball of radius 2k−3
centered at xand the matrix AC1 = (AC1,1 |···| AC1,k−1 ) has full rank.
Recall that AX(d) denotes the maximal cardinality of a subset of X of minimum Hamming
distance at least d. When X= {0,1,...,q −1}n we write Aq(n,d). Let KX(d) denote the minimal
cardinality of a subset of Xwith covering radius d.
Proposition 24 (Binary visible units) . Let X = {0,1}n and |Yj|= sj for all j ∈[m]. If X
contains mdisjoint Hamming balls of radii 2sj −3, j ∈[m] whose complement has full rank, then
RBMtropical
X,Y has the expected dimension, min{∑
j∈[m](sj −1)(n+ 1) +n,2n −1}.
In particular, ifX= {0,1}nand Y= {0,1,...,s −1}mwith m< A2(n,d) and d= 4(s−1)−
1, then RBMX,Yhas the expected dimension. It is known that A2(n,d) ≥2n−⌈log2(∑d−2
j=0 (n−1
j ))⌉.
Proposition 25 (Binary hidden units). Let Y= {0,1}m and Xbe arbitrary.
•If m+ 1 ≤AX(3), then RBMtropical
X,{0,1}m has dimension (1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If m+ 1 ≥KX(1), then RBMtropical
X,{0,1}m has dimension |X|− 1.
Let Y= {0,1}m and X= {0,1,...,q −1}n, where qis a prime power.
•If m+ 1 ≤qn−⌈logq(1+(n−1)(q−1)+1)⌉, then RBMtropical
X,Y has dimension
(1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If n = ( qr −1)/(q−1) for some r ≥2, then AX(3) = KX(1), and RBMtropical
X,Y has the
expected dimension for any m.
In particular, when all units are binary andm< 2n−⌈log2(n+1)⌉, then RBMX,Yhas the expected
dimension; this was shown in [Cueto et al., 2010].
Proposition 26 (Arbitrary sized units). If Xcontains mdisjoint Hamming balls of radii 2|Y1|−
3,..., 2|Ym|−3, and the complement of their union has full rank, thenRBMtropical
X,Y has the expected
dimension.
14
DISCRETE RESTRICTED BOLTZMANN MACHINES
Proof. Propositions 24, 25, and 26 follow from Theorem 21 and Corollary 23 together with the
following explicit bounds on A by [Gilbert, 1952, Varshamov, 1957]:
Aq(n,d) ≥ qn
∑d−1
j=0
(n
j
)
(q−1)j.
If qis a prime power, thenAq(n,d) ≥qk, where kis the largest integer withqk < qn
∑d−2
j=0 (n−1
j )(q−1)j .
In particular, A2(n,3) ≥2k, where k is the largest integer with 2k < 2n
(n−1)+1 = 2n−log2(n), i.e.,
k= n−⌈log2(n+ 1)⌉.
Example 27. Many results in coding theory can now be translated directly to statements about
the dimension of discrete RBMs. Here is an example. Let X = {1,2,...,s }×{ 1,2,...,s }×
{1,2,...,t }, s ≤t. The minimum cardinality of a code C ⊆X with covering-radius one equals
KX(1) = s2 −
⌊
(3s−t)2
8
⌋
if t ≤3s, and KX(1) = s2 otherwise [see Cohen et al., 2005, Theo-
rem 3.7.4]. Hence RBMtropical
X,{0,1}m has dimension |X|−1 when m+ 1 ≥s2 −
⌊
(3s−t)2
8
⌋
and t≤3s,
and when m+ 1 ≥s2 and t> 3s.
8 Discussion
In this note we study the representational power of RBMs with discrete units. Our results generalize
a diversity of previously known results for standard binary RBMs and na ¨ıve Bayes models. They
help contrasting the geometric-combinatorial properties of distributed products of experts versus
non-distributed mixtures of experts.
We estimate the number of hidden units for which discrete RBM models can approximate any
distribution to any desired accuracy, depending on the cardinalities of their units’ state spaces. This
analysis shows that the maximal approximation error increases at most logarithmically with the
total number of visible states and decreases at least logarithmically with the sum of the number of
states of the hidden units. This observation could be helpful, for example, in designing a penalty
term to allow comparison of models with differing numbers of units. It is worth mentioning that the
submodels of discrete RBMs described in Theorem 15 can be used not only to estimate the maximal
model approximation errors, but also the expected model approximation errors given a prior of target
distributions on the probability simplex. See [Mont ´ufar and Rauh, 2012] for an exact analysis of
Dirichlet priors. In future work it would be interesting to study the statistical approximation errors
of discrete RBMs and to complement the theory by an empirical evaluation.
The combinatorics of tropical discrete RBMs allows us to relate the dimension of discrete RBM
models to the solutions of linear optimization problems and slicings of convex support polytopes by
normal fans of simplices. We use this to show that the modelRBMX,Yhas the expected dimension
for many choices of Xand Y, but not for all choices. We based our explicit computations of the
dimension of RBMs on slicings by collections of parallel hyperplanes, but more general classes of
slicings may be considered. The same tools presented in this paper can be used to estimate the
dimension of a general class of models involving interactions within layers, defined as Kronecker
products of hierarchical models [see Mont ´ufar and Morton, 2013]. We think that the geometric-
combinatorial picture of discrete RBMs developed in this paper may be helpful in solving various
long standing theoretical problems in the future, for example: What is the exact dimension of na¨ıve
15
MONT ´UFAR AND MORTON
Bayes models with general discrete variables? What is the smallest number of hidden variables that
make an RBM a universal approximator? Do binary RBMs always have the expected dimension?
Acknowledgments
We are grateful to the ICLR 2013 community for very valuable comments. This work was accom-
plished in part at the Max Planck Institute for Mathematics in the Sciences. This work is supported
in part by DARPA grant FA8650-11-1-7145.
References
M. Aoyagi. Stochastic complexity and generalization error of a Restricted Boltzmann Machine in
Bayesian estimation. J. Mach. Learn. Res., 99:1243–1272, August 2010.
N. Ay and A. Knauf. Maximizing multi-information. Kybernetika, 42(5):517–538, 2006.
Y . Bengio. Learning deep architectures for AI.Found. Trends Mach. Learn., 2(1):1–127, 2009.
Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks.
In B. Sch ¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing
Systems 19, pages 153–160. MIT Press, Cambridge, MA, 2007.
M. A. Carreira-Perpi ˜nan and G. E. Hinton. On contrastive divergence learning. In Proceedings of
the 10-th Interantional Workshop on Artificial Intelligence and Statistics, 2005.
M. V . Catalisano, A. V . Geramita, and A. Gimigliano. Secant varieties ofP1 ×···× P1 (n-times)
are not defective for n≥5. J. Algebraic Geometry, 20:295–327, 2011.
G. Cohen, I. Honkala, S. Litsyn, and A. Lobstein. Covering Codes. North-Holland Mathematical
Library. Elsevier Science, 2005.
M. A. Cueto, J. Morton, and B. Sturmfels. Geometry of the restricted Boltzmann machine. In
M. Viana and H. Wynn, editors, Algebraic methods in statistics and probability II, AMS Special
Session, volume 2. American Mathematical Society, 2010.
G. E. Dahl, R. P. Adams, and H. Larochelle. Training restricted Boltzmann machines on word
observations. arXiv:1202.5695, 2012.
A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological) , 39(1):1–38,
1977.
J. Draisma. A tropical approach to secant dimensions. J. Pure Appl. Algebra , 212(2):349–363,
2008.
Y . Freund and D. Haussler. Unsupervised learning of distributions of binary vectors using 2-layer
networks. In J. E. Moody, S. J. Hanson, and R. Lippmann, editors, Advances in Neural Informa-
tion Processing Systems 4, pages 912–919. Morgan Kaufmann, 1991.
16
DISCRETE RESTRICTED BOLTZMANN MACHINES
E. N. Gilbert. A comparison of signalling alphabets. Bell System Technical Journal, 31:504–522,
1952.
G. E. Hinton. Products of experts. In Proceedings 9-th ICANN, volume 1, pages 1–6, 1999.
G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Compu-
tation, 14:1771–1800, 2002.
G. E. Hinton. A practical guide to training restricted Boltzmann machines, version 1. Technical
report, UTML2010-003, University of Toronto, 2010.
G. E. Hinton, S. Osindero, and Y . Teh. A fast learning algorithm for deep belief nets. Neural
Computation, 18:1527–1554, 2006.
N. Le Roux and Y . Bengio. Representational power of restricted Boltzmann machines and deep
belief networks. Neural Computation, 20(6):1631–1649, 2008.
P. M. Long and R. A. Servedio. Restricted Boltzmann machines are hard to approximately evaluate
or simulate. In J. F ¨urnkranz and T. Joachims, editors, Proceedings of the 27th International
Conference on Machine Learning (ICML-10), pages 703–710. Omnipress, 2010.
D. Lowd and P. Domingos. Naive Bayes models for probability estimation. In Proceedings of the
22nd International Conference on Machine Learning, pages 529–536. ACM Press, 2005.
T. K. Marks and J. R. Movellan. Diffusion networks, products of experts, and factor analysis. In
Proc. 3rd Int. Conf. Independent Component Anal. Signal Separation, pages 481–485, 2001.
F. Mat´uˇs and N. Ay. On maximization of the information divergence from an exponential family. In
Proceedings of the WUPES’03, pages 199–204. University of Economics, Prague, 2003.
R. Memisevic and G. E. Hinton. Learning to represent spatial transformations with factored higher-
order Boltzmann machines. Neural Computation, 22(6):1473–1492, June 2010.
G. Mont´ufar. Mixture decompositions of exponential families using a decomposition of their sample
spaces. Kybernetika, 49(1), 2013.
G. Mont ´ufar and N. Ay. Refinements of universal approximation results for deep belief networks
and restricted Boltzmann machines. Neural Computation, 23(5):1306–1319, 2011.
G. Mont ´ufar and J. Morton. When does a mixture of products contain a product of mixtures?
http://arxiv.org/abs/1206.0387, 2012.
G. Mont´ufar and J. Morton. Geometry of hierarchical models on hidden-visible products of simpli-
cial complexes. 2013. In preparation.
G. Mont´ufar and J. Rauh. Scaling of model approximation errors and expected entropy distances.
In Proc. of the 9th Workshop on Uncertainty Processing (WUPES 2012), pages 137–148, 2012.
Preprint available at http://arxiv.org/abs/1207.3399.
G. Mont ´ufar, J. Rauh, and N. Ay. Expressive power and approximation errors of restricted Boltz-
mann machines. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. C. N. Pereira, and K. Q. Weinberger,
editors, Advances in Neural Information Processing Systems 24, pages 415–423, 2011.
17
MONT ´UFAR AND MORTON
S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of Markov random
fields. In J. C. Platt, D. Koller, Y . Singer, and S. Roweis, editors,Advances in Neural Information
Processing Systems 20, pages 1121–1128. MIT Press, Cambridge, MA, 2008.
L. Pachter and B. Sturmfels. Tropical geometry of statistical models. Proceedings of the National
Academy of Sciences of the United States of America, 101(46):16132–16137, Nov. 2004.
M. Ranzato, A. Krizhevsky, and G. E. Hinton. Factored 3-Way Restricted Boltzmann Machines For
Modeling Natural Images. In Proc. Thirteenth International Conference on Artificial Intelligence
and Statistics (AISTATS), pages 621–628, 2010.
W. E. Roth. On direct product matrices. Bulletin of the American Mathematical Society , 40:461–
468, 1934.
R. Salakhutdinov, A. Mnih, and G. E. Hinton. Restricted Boltzmann machines for collaborative
filtering. In Proceedings of the 24th International Conference on Machine Learning, pages 791–
798, 2007.
T. J. Sejnowski. Higher-order Boltzmann machines. In Neural Networks for Computing , pages
398–403. American Institute of Physics, 1986.
P. Smolensky. Information processing in dynamical systems: foundations of harmony theory. In
Symposium on Parallel and Distributed Processing, 1986.
T. Tran, D. Phung, and S. Venkatesh. Mixed-variate restricted Boltzmann machines. InProc. of 3rd
Asian Conference on Machine Learning (ACML), pages 213–229, 2011.
R. R. Varshamov. Estimate of the number of signals in error correcting codes.Doklady Akad. Nauk
SSSR, 117:739–741, 1957.
M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application
to information retrieval. In L. K. Saul, Y . Weiss, and L. Bottou, editors, Advances in Neural
Information Processing Systems 17, pages 1481–1488. MIT Press, Cambridge, MA, 2005.
18
|
Guido F. Montufar, Jason Morton
|
Unknown
| 2,013
|
{"id": "ttxM6DQKghdOi", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358411400000, "tmdate": 1358411400000, "ddate": null, "number": 59, "content": {"title": "Discrete Restricted Boltzmann Machines", "decision": "conferenceOral-iclr2013-conference", "abstract": "In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code", "pdf": "https://arxiv.org/abs/1301.3529", "paperhash": "montufar|discrete_restricted_boltzmann_machines", "keywords": [], "conflicts": [], "authors": ["Guido F. Montufar", "Jason Morton"], "authorids": ["guidomontufar@googlemail.com", "jason.morton@gmail.com"]}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["guidomontufar@googlemail.com"], "writers": []}
|
[Review]:
The paper provides a theoretical analysis of Restricted Boltzmann Machines with multivalued discrete units, with the emphasis on representation capacity of such models.
Discrete RBMs are a special case of exponential family harmoniums introduced by Welling et al. [1] and have been known under the name of multinomial or softmax RBMs. The parameter updates given in the paper, which are its only not purely theoretical contribution, are not novel and have been known for some time. Though the authors claim that their analysis can serve as a starting point for developing novel machine learning algorithms, I am unable to see how that applies to any of the results in the paper. Thus the only contributions of the paper are theoretical.
Unfortunately, those theoretical contributions do not seem particularly interesting, at least from the machine learning perspective, appearing to be direct generalizations of the corresponding results for binary RBMs. The biggest problem with the paper, however, is presentation. The paper is clearly not written for a machine learning audience. The presentation is extremely technical and even the 'non-technical' outline in Section 4 is difficult to follow. Given that the only novel contribution of the paper is the results proved in it, it is unreasonable to put all the proof in the supplementary material where they are unlikely to receive the necessary attention. The fact that the proofs will not fit in the paper due to the ICLR page limit, simply highlights the fact that this paper should be submitted to a journal.
[1] Welling, M., Rosen-Zvi, M., & Hinton, G. (2005). Exponential family harmoniums with an application to information retrieval. Advances in Neural Information Processing Systems, 17, 1481-1488.
|
anonymous reviewer e437
| null | null |
{"id": "gE0uE2A98H59Y", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1360957080000, "tmdate": 1360957080000, "ddate": null, "number": 3, "content": {"title": "review of Discrete Restricted Boltzmann Machines", "review": "The paper provides a theoretical analysis of Restricted Boltzmann Machines with multivalued discrete units, with the emphasis on representation capacity of such models.\r\n\r\nDiscrete RBMs are a special case of exponential family harmoniums introduced by Welling et al. [1] and have been known under the name of multinomial or softmax RBMs. The parameter updates given in the paper, which are its only not purely theoretical contribution, are not novel and have been known for some time. Though the authors claim that their analysis can serve as a starting point for developing novel machine learning algorithms, I am unable to see how that applies to any of the results in the paper. Thus the only contributions of the paper are theoretical.\r\n\r\nUnfortunately, those theoretical contributions do not seem particularly interesting, at least from the machine learning perspective, appearing to be direct generalizations of the corresponding results for binary RBMs. The biggest problem with the paper, however, is presentation. The paper is clearly not written for a machine learning audience. The presentation is extremely technical and even the 'non-technical' outline in Section 4 is difficult to follow. Given that the only novel contribution of the paper is the results proved in it, it is unreasonable to put all the proof in the supplementary material where they are unlikely to receive the necessary attention. The fact that the proofs will not fit in the paper due to the ICLR page limit, simply highlights the fact that this paper should be submitted to a journal.\r\n\r\n[1] Welling, M., Rosen-Zvi, M., & Hinton, G. (2005). Exponential family harmoniums with an application to information retrieval. Advances in Neural Information Processing Systems, 17, 1481-1488."}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttxM6DQKghdOi", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer e437"], "writers": ["anonymous"]}
|
{
"criticism": 7,
"example": 0,
"importance_and_relevance": 4,
"materials_and_methods": 3,
"praise": 2,
"presentation_and_reporting": 3,
"results_and_discussion": 3,
"suggestion_and_solution": 2,
"total": 15
}
| 1.6
| 1.53687
| 0.06313
| 1.616254
| 0.203588
| 0.016254
| 0.466667
| 0
| 0.266667
| 0.2
| 0.133333
| 0.2
| 0.2
| 0.133333
|
{
"criticism": 0.4666666666666667,
"example": 0,
"importance_and_relevance": 0.26666666666666666,
"materials_and_methods": 0.2,
"praise": 0.13333333333333333,
"presentation_and_reporting": 0.2,
"results_and_discussion": 0.2,
"suggestion_and_solution": 0.13333333333333333
}
| 1.6
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttxM6DQKghdOi
|
Discrete Restricted Boltzmann Machines
|
In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code
|
Discrete Restricted Boltzmann Machines
Guido Mont´ufar GFM 10@ PSU .EDU
Jason Morton MORTON @MATH .PSU .EDU
Department of Mathematics
Pennsylvania State University
University Park, PA 16802, USA
Abstract
We describe discrete restricted Boltzmann machines: probabilistic graphical models with bipar-
tite interactions between visible and hidden discrete variables. Examples are binary restricted
Boltzmann machines and discrete na ¨ıve Bayes models. We detail the inference functions and
distributed representations arising in these models in terms of configurations of projected prod-
ucts of simplices and normal fans of products of simplices. We bound the number of hidden
variables, depending on the cardinalities of their state spaces, for which these models can ap-
proximate any probability distribution on their visible states to any given accuracy. In addition,
we use algebraic methods and coding theory to compute their dimension.
Keywords: Restricted Boltzmann Machine, Na¨ıve Bayes Model, Representational Power, Dis-
tributed Representation, Expected Dimension
1 Introduction
A restricted Boltzmann machine (RBM) is a probabilistic graphical model with bipartite interactions
between an observed set and a hidden set of units [see Smolensky, 1986, Freund and Haussler,
1991, Hinton, 2002, 2010]. A characterizing property of these models is that the observed units
are independent given the states of the hidden units and vice versa. This is a consequence of the
bipartiteness of the interaction graph and does not depend on the units’ state spaces. Typically
RBMs are defined with binary units, but other types of units have also been considered, including
continuous, discrete, and mixed type units [see Welling et al., 2005, Marks and Movellan, 2001,
Salakhutdinov et al., 2007, Dahl et al., 2012, Tran et al., 2011]. We study discrete RBMs, also called
multinomial or softmax RBMs, which are special types of exponential family harmoniums [Welling
et al., 2005]. While each unit Xi of a binary RBM has the state space {0,1}, the state space of
each unit Xi of a discrete RBM is a finite set Xi = {0,1,...,r i −1}. Like binary RBMs, discrete
RBMs can be trained using contrastive divergence (CD) [Hinton, 1999, 2002, Carreira-Perpi˜nan and
Hinton, 2005] or expectation-maximization (EM) [Dempster et al., 1977] and can be used to train
the parameters of deep systems layer by layer [Hinton et al., 2006, Bengio et al., 2007].
Non-binary visible units are natural because they can directly encode non-binary features. The
situation with hidden units is more subtle. States that appear in different hidden units can be acti-
1
arXiv:1301.3529v4 [stat.ML] 22 Apr 2014
MONT ´UFAR AND MORTON
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
24 40 79
Figure 1: Examples of probability models treated in this paper, in the special case of binary visible
variables. The light (dark) nodes represent visible (hidden) variables with the indicated number of
states. The total parameter count of each model is indicated at the top. From left to right: a binary
RBM; a discrete RBM with one 8-valued and one binary hidden units; and a binary na ¨ıve Bayes
model with 16 hidden classes.
vated by the same visible vector, but states that appear in the same hidden unit are mutually exclu-
sive. Non-binary hidden units thus allow one to explicitly represent complex exclusive relationships.
For example, a discrete RBM topic model would allow some topics to be mutually exclusive and
other topics to be mixed together freely. This provides a better match to the semantics of several
learning problems, although the learnability of such representations is mostly open. The practical
need to represent mutually exclusive properties is evidenced by the common approach of adding
activation sparsity parameters to binary RBM hidden states, which artificially create mutually ex-
clusive non-binary states by penalizing models which have more than a certain percentage of hidden
units active.
A discrete RBM is a product of experts [Hinton, 1999]; each hidden unit represents an expert
which is a mixture model of product distributions, or na¨ıve Bayes model. Hence discrete RBMs cap-
ture both na¨ıve Bayes models and binary RBMs, and interpolate between non-distributed mixture
representations and distributed mixture representations [Bengio, 2009, Mont´ufar and Morton, 2012].
See Figure 1. Na¨ıve Bayes models have been studied across many disciplines. In machine learning
they are most commonly used for classification and clustering, but have also been considered for
probabilistic modelling [Lowd and Domingos, 2005, Mont ´ufar, 2013]. Theoretical work on binary
RBM models includes results on universal approximation [Freund and Haussler, 1991, Le Roux
and Bengio, 2008, Mont ´ufar and Ay, 2011], dimension and parameter identifiability [Cueto et al.,
2010], Bayesian learning coefficients [Aoyagi, 2010], complexity [Long and Servedio, 2010], and
approximation errors [Mont´ufar et al., 2011]. In this paper we generalize some of these theoretical
results to discrete RBMs.
Probability models with more general interactions than strictly bipartite have also been consid-
ered, including semi-restricted Boltzmann machines and higher-order interaction Boltzmann ma-
chines [see Sejnowski, 1986, Memisevic and Hinton, 2010, Osindero and Hinton, 2008, Ranzato
et al., 2010]. The techniques that we develop in this paper also serve to treat a general class of
RBM-like models allowing within-layer interactions, a generalization that will be carried out in a
forthcoming work [Mont´ufar and Morton, 2013].
Section 2 collects basic facts about independence models, na ¨ıve Bayes models, and binary
RBMs, including an overview on the aforementioned theoretical results. Section 3 defines discrete
RBMs formally and describes them as (i) products of mixtures of product distributions (Proposi-
tion 7) and (ii) as restricted mixtures of product distributions. Section 4 elaborates on distributed
representations and inference functions represented by discrete RBMs (Proposition 11, Lemma 12,
2
DISCRETE RESTRICTED BOLTZMANN MACHINES
ex1=1
ex2=1
ex3=1
ex1=1
ex1=2
ex2=1
Figure 2: The convex support of the independence model of three binary variables (left) and of a
binary-ternary pair of variables (right) discussed in Example 1.
and Proposition 14). Section 5 addresses the expressive power of discrete RBMs by describing
explicit submodels (Theorem 15) and provides results on their maximal approximation errors and
universal approximation properties (Theorem 16). Section 6 treats the dimension of discrete RBM
models (Proposition 17 and Theorem 19). Section 7 contains an algebraic-combinatorial discussion
of tropical discrete RBM models (Theorem 21) with consequences for their dimension collected in
Propositions 24, 25, and 26.
2 Preliminaries
2.1 Independence models
Consider a system of n <∞random variables X1,...,X n. Assume that Xi takes states xi in a
finite set Xi = {0,1,...,r i −1}for all i ∈{1,...,n }=: [n]. The state space of this system is
X:= X1 ×···×X n. We write xλ = (xi)i∈λ for a joint state of the variables with index i∈λfor
any λ⊆[n], and x= (x1,...,x n) for a joint state of all variables. We denote by ∆(X) the set of
all probability distributions on X. We write ⟨a,b⟩for the inner product a⊤b.
The independence model of the variables X1,...,X n is the set of product distributions p(x) =∏
i∈[n] pi(xi) for all x∈X, where pi is a probability distribution with state space Xi for all i∈[n].
This model is the closure EX (in the Euclidean topology) of the exponential family
EX :=
{ 1
Z(θ) exp(⟨θ,A(X)⟩): θ∈RdX
}
, (1)
where A(X) ∈RdX×X is a matrix of sufficient statistics; with rows equal to the indicator functions
1X and 1{x: xi=yi}for all yi ∈Xi \{0}for all i ∈[n]. The partition function Z(θ) normalizes
the distributions. The convex support of EX is the convex hull QX := conv({A(X)
x }x∈X) of the
columns of A(X), which is a Cartesian product of simplices with QX ∼= ∆(X1) ×···× ∆(Xn).
Example 1. The sufficient statistics of the independence models EX and EX′ with state spaces
3
MONT ´UFAR AND MORTON
X= {0,1}3 and X′= {0,1,2}×{0,1}are, with rows labeled by indicator functions,
A(X) =
[1
1
1
] [1
1
0
] [1
0
1
] [1
0
0
] [0
1
1
] [0
1
0
] [0
0
1
] [0
0
0
]
1 1 1 1 1 1 1 1
1 1 1 1 0 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
x3 = 1
x2 = 1
x1 = 1
A(X′) =
[1
2
] [1
1
] [1
0
] [0
2
] [0
1
] [0
0
]
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
x2 = 1
x1 = 2
x1 = 1
.
In the first case the convex support is a cube and in the second it is a prism. Both convex supports
are three-dimensional polytopes, but the prism has fewer vertices and is more similar to a simplex,
meaning that its vertex set is affinely more independent than that of the cube. See Figure 2.
2.2 Na ¨ıve Bayes models
Let k∈N. The k-mixture of the independence model, or na¨ıve Bayes modelwith khidden classes,
with visible variables X1,...,X n is the set of all probability distributions expressible as convex
combinations of kpoints in EX:
MX,k :=
{∑
i∈[k]
λip(i) : p(i) ∈EX, λi ≥0, for all i∈[k], and
∑
i∈[k]
λi = 1
}
. (2)
We write Mn,k for the k-mixture of the independence model of nbinary variables. The dimen-
sions of mixtures of binary independence models are known:
Theorem 2 (Catalisano et al. [2011]). The mixtures of binary independence models Mn,k have the
dimension expected from counting parameters,min{nk+ (k−1),2n−1}, except for M4,3, which
has dimension 13 instead of 14.
Let AX(d) denote the maximal cardinality of a subset X′⊆X of minimum Hamming distance
at least d, i.e., the maximal cardinality of a subset X′⊆X with dH(x,y) ≥dfor all distinct points
x,y ∈X′, where dH(x,y) := |{i∈[n]: xi ̸= yi}|denotes the Hamming distance betweenxand y.
The function AXis familiar in coding theory. Thek-mixtures of independence models are universal
approximators when kis large enough. This can be made precise in terms of AX(2):
Theorem 3 (Mont´ufar [2013]). The mixture model MX,k can approximate any probability distri-
bution on Xarbitrarily well if k≥|X|/maxi∈[n] |Xi|and only if k≥AX(2).
By results from [Gilbert, 1952, Varshamov, 1957], when q is a power of a prime number and
X= {0,1,...,q −1}n, then AX = qn−1. In these cases the previous theorem shows that MX,k
is a universal approximator of distributions on Xif and only if k ≥qn−1. In particular, the small-
est na¨ıve Bayes model universal approximator of distributions on {0,1}n has 2n−1(n+ 1) −1
parameters.
Some of the distributions not representable by a given na¨ıve Bayes model can be characterized
in terms of their modes. A state x∈X is a mode of a distribution p∈∆(X) if p(x) >p(y) for all
ywith dH(x,y) = 1 and it is a strong mode if p(x) >∑
y: dH(x,y)=1 p(y).
Lemma 4 (Mont´ufar and Morton [2012]). If a mixture of product distributions p = ∑
iλip(i) has
strong modes C⊆X , then there is a mixture component p(i) with mode xfor each x∈C.
4
DISCRETE RESTRICTED BOLTZMANN MACHINES
2.3 Binary restricted Boltzmann machines
The binary RBM model with nvisible and mhidden units, denoted RBMn,m, is the set of distribu-
tions on {0,1}n of the form
p(x) = 1
Z(W,B,C )
∑
h∈{0,1}m
exp(h⊤Wx + B⊤x+ C⊤h) for all x∈{0,1}n, (3)
where xdenotes states of the visible units, hdenotes states of the hidden units, W = (Wji)ji ∈
Rm×n is a matrix of interaction weights, B ∈Rn and C ∈Rm are vectors of bias weights, and
Z(W,B,C ) = ∑
x∈{0,1}n
∑
h∈{0,1}m exp(h⊤Wx + B⊤x+ C⊤h) is the normalizing partition
function.
It is known that these models have the expected dimension for many choices of nand m:
Theorem 5 (Cueto et al. [2010]). The dimension of the model RBMn,m is equal to nm+ n+ m
when m+ 1 ≤2n−⌈log2(n+1)⌉and it is equal to 2n −1 when m≥2n−⌊log2(n+1)⌋.
It is also known that with enough hidden units, binary RBMs are universal approximators:
Theorem 6 (Mont´ufar and Ay [2011]). The model RBMn,m can approximate any distribution on
{0,1}n arbitrarily well whenever m≥2n−1 −1.
A previous result by Le Roux and Bengio [2008, Theorem 2] shows thatRBMn,m is a universal
approximator wheneverm≥2n+1. It is not known whether the bounds from Theorem 6 are always
tight, but they show that for any given n, the smallest RBM universal approximator of distributions
on {0,1}n has at most 2n−1(n+ 1) −1 parameters and hence not more than the smallest na ¨ıve
Bayes model universal approximator (Theorem 3).
3 Discrete restricted Boltzmann machines
Let Xi = {0,1,...,r i−1}for all i∈[n] and Yj = {0,1,...,s j−1}for all j ∈[m]. The graphical
model with full bipartite interactions {{i,j}: i∈[n],j ∈[m]}on X×Y is the exponential family
EX,Y:=
{ 1
Z(θ) exp(⟨θ,A(X,Y)⟩): θ∈RdXdY
}
, (4)
with sufficient statistics matrix equal to the Kronecker product A(X,Y) = A(X) ⊗A(Y) of the
sufficient statistics matrices A(X) and A(Y) of the independence models EX and EY. The matrix
A(X,Y) has dXdY =
(∑
i∈[n](|Xi|−1) + 1
)(∑
j∈[m](|Yi|−1) + 1
)
linearly independent rows
and |X×Y| columns, each column corresponding to a joint state (x,y) of all variables. Disregard-
ing the entry of θ that is multiplied with the constant row of A(X,Y), which cancels out with the
normalization function Z(θ), this parametrization of EX,Y is one-to-one. In particular, this model
has dimension dim(EX,Y) = dXdY−1.
The discrete RBM model RBMX,Yis the following set of marginal distributions:
RBMX,Y:=
{
q(x) =
∑
y∈Y
p(x,y) for all x∈X : p∈EX,Y
}
. (5)
5
MONT ´UFAR AND MORTON
In the case of one single hidden unit, this model is the na¨ıve Bayes model onXwith |Y1|hidden
classes. When all units are binary, X = {0,1}n and Y= {0,1}m, this model is RBMn,m. Note
that the exponent in eq. (3) can be written as (h⊤Wx + B⊤x+ C⊤h) = ⟨θ,A(X,Y)
(x,h) ⟩, taking for θ
the column-by-column vectorization of the matrix
(0 B⊤
C W
)
.
Conditional distributions
The conditional distributions of discrete RBMs can be described in the following way. Consider a
vector θ ∈RdXdY parametrizing EX,Y, and the matrix Θ ∈RdY×dX with column-by-column vec-
torization equal toθ. A lemma by Roth [1934] shows thatθ⊤(A(X)⊗A(Y))(x,y) = (A(X)
x )⊤Θ⊤A(Y)
y
for all x∈X, y∈Y, and hence
⣨
θ,A(X,Y)
(x,y)
⟩
=
⣨
ΘA(X)
x ,A(Y)
y
⟩
=
⣨
Θ⊤A(Y)
y ,A(X)
x
⟩
∀x∈X,y ∈Y. (6)
The inner product in eq. (6) describes following probability distributions:
pθ(·,·) = 1
Z(θ) exp
(⟨
θ,A(X,Y)⟩)
, (7)
pθ(·|x) = 1
Z
(
ΘA(X)
x
)exp
(⟨
ΘA(X)
x ,A(Y)⟩)
, and (8)
pθ(·|y) = 1
Z
(
Θ⊤A(Y)
y
)exp
(⟨
Θ⊤A(Y)
y ,A(X)⟩)
. (9)
Geometrically, ΘA(X) is a linear projection of the columns of the sufficient statistics matrix A(X)
into the parameter space of EY, and similarly, Θ⊤A(Y) is a linear projection of the columns of A(Y)
into the parameter space of EX.
Polynomial parametrization
Discrete RBMs can be parametrized not only in the exponential way discussed above, but also by
simple polynomials. The exponential family EX,Ycan be parametrized by square free monomials:
p(v,h) = 1
Z
∏
{j,i}∈ [m] ×[n],
(y′
j,x′
i) ∈Yj ×Xi
(γ{j,i},(y′
j,x′
i))
δy′
j
(hj)δx′
i
(vi)
for all (v,h) ∈Y×X , (10)
where γ{j,i},(y′
j,x′
i) are positive reals. The probability distributions in RBMX,Ycan be written as
p(v) = 1
Z
∏
j∈[m]
( ∑
hj∈Yj
γ{j,1},(hj,v1) ···γ{j,n},(hj,vn)
)
for all v∈X. (11)
The parameters γ{j,i},(y′
j,x′
i) correspond to exp(θ{j,i},(y′
j,x′
i)) in the parametrization given in eq. (4).
6
DISCRETE RESTRICTED BOLTZMANN MACHINES
Products of mixtures and mixtures of products
In the following we describe discrete RBMs from two complementary perspectives: (i) as products
of experts, where each expert is a mixture of products, and (ii) as restricted mixtures of product
distributions. The renormalized entry-wise (Hadamard) product of two probability distributions p
and qon Xis defined as p◦q := (p(x)q(x))x∈X/∑
y∈Xp(y)q(y). Here we assume that pand q
have overlapping supports, such that the definition makes sense.
Proposition 7. The model RBMX,Yis a Hadamard product of mixtures of product distributions:
RBMX,Y= MX,|Y1|◦···◦M X,|Ym|.
Proof. The statement can be seen directly by considering the parametrization from eq. (11). To
make this explicit, one can use a homogeneous version of the matrix A(X,Y) which we denote by
Aand which defines the same model. Each row of Ais indexed by an edge {i,j}of the bipartite
graph and a joint state (xi,hj) of the visible and hidden units connected by this edge. Such a row
has a one in any column when these states agree with the global state, and zero otherwise. For any
j ∈[m] let Aj,: denote the matrix containing the rows of Awith indices ({i,j},(xi,hj)) for all
xi ∈Xi for all i∈[n] for all hj ∈Yj, and let A(x,h) denote the (x,h)-column of A. We have
p(x) = 1
Z
∑
h
exp(⟨θ,A(x,h)⟩)
= 1
Z
∑
h
exp(⟨θ1,:,A1,:(x,h)⟩) exp(⟨θ2,:,A2,:(x,h)⟩) ···exp(⟨θm,:,Am,:(x,h)⟩)
= 1
Z
(∑
h1
exp(⟨θ1,:,A1,:(x,h1)⟩)
)
···
(∑
hm
exp(⟨θm,:,Am,:(x,hm)⟩)
)
= 1
Z(Z1p(1)(x)) ···(Zmp(m)(x)) = 1
Z′p(1)(x) ···p(m)(x),
where p(j) ∈MX,|Yj|and Zj = ∑
x∈X
∑
hj∈Yj exp(⟨θj,:,Aj,:(x,hj)⟩) for all j ∈[m]. Since the
vectors θj,: can be chosen arbitrarily, the factors p(j) can be made arbitrary within MX,|Yj|.
Of course, every distribution in RBMX,Y is a mixture distribution p(x) = ∑
h∈Yp(x|h)q(h).
The mixture weights are given by the marginals q(h) on Yof distributions from EX,Y, and the
mixture components can be described as follows.
Proposition 8. The set of conditional distributions p(·|h), h∈Y of a distribution in EX,Yis the set
of product distributions in EX with parameters θh = Θ⊤A(Y)
h , h ∈Y equal to a linear projection
of the vertices {A(Y)
h : h∈Y} of the Cartesian product of simplices QY∼= ∆(Y1) ×···× ∆(Ym).
Proof. This is by eq. (6).
4 Products of simplices and their normal fans
Binary RBMs have been analyzed by considering each of the mhidden units as defining a hyper-
plane Hj slicing the n-cube into two regions. To generalize the results provided by this analysis, in
7
MONT ´UFAR AND MORTON
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet
R0
R1
R2
0
1
2(0,0) (0,1)
(1,0) (1 ,1)
Θ−1(R2)
Θ−1(R1)
Θ−1(R0)
Figure 3: Three slicings of a square by the normal fan of a triangle with maximal conesR0, R1, and
R2, corresponding to three possible inference functions of RBM{0,1}2,{0,1,2}.
this section we replace the n-cube with a general product of simplices QX, and replace the two re-
gions defined by the hyperplane Hj by the |Yj|regions defined by the maximal cones of the normal
fan of the simplex ∆(Yj).
Subdivisions of independence models
The normal cone of a polytope Q ⊂Rd at a point x ∈Q is the set of all vectors v ∈Rd with
⟨v,(x−y)⟩≥ 0 for all y ∈Q. We denote by Rx the normal cone of the product of simplices
QX = conv{A(X)
x }x∈X at the vertex A(X)
x . The normal fan FX is the set of all normal cones of
QX. The product distributions pθ = 1
Z(θ) exp(⟨θ,A(X)⟩) ∈EX strictly maximized at x∈X, with
pθ(x) >pθ(y) for all y∈X\{ x}, are those with parameter vector θin the relative interior of Rx.
Hence the normal fan FX partitions the parameter space of the independence model into regions of
distributions with maxima at different inputs.
Inference functions and slicings
For any choice of parameters of the model RBMX,Y, there is an inference function π: X →Y,
(or more generally π: X→ 2Y), which computes the most likely hidden state given a visible state.
These functions are not necessarily injective nor surjective. For a visible state x, the conditional
distribution on the hidden states is a product distribution p(y|X = x) = 1
Z exp(⟨ΘA(X)
x ,A(Y)
y ⟩)
which is maximized at the state yfor which ΘA(X)
x ∈Ry. The preimages of the cones Ry by the
map Θ partition the input spaceRdX and are called inference regions. See Figure 3 and Example 10.
Definition 9. A Y-slicing of a finite set Z⊂ RdX is a partition of Zinto the preimages of the cones
Ry, y ∈Y by a linear map Θ: RdX →RdY. We assume that Θ is generic, such that it maps each
element of Zinto the interior of some Ry.
For example, when Y= {0,1}, the fan FY consists of a hyperplane and the two closed half-
spaces defined by that hyperplane. A Y-slicing is in this case a standard slicing by a hyperplane.
Example 10. Let X = {0,1,2}×{ 0,1}and Y = {0,1}4. The maximal cones Ry, y ∈Y of
the normal fan of the 4-cube with vertices {0,1}4 are the closed orthants of R4. The 6 vertices
{A(X)
x : x ∈ X}of the prism ∆({0,1,2}) ×∆({0,1}) can be mapped into 6 distinct orthants
8
DISCRETE RESTRICTED BOLTZMANN MACHINES
of R4, each orthant with an even number of positive coordinates:
3 −2 −2 −2
1 2 −2 −2
1 −2 −2 2
1 −2 2 −2
Θ
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
A(X)
=
−1 −1 1 1 1 3
1 1 3 −1 −1 1
−3 1 −1 −1 3 1
1 −3 −1 3 −1 1
. (12)
Even in the case of one single hidden unit the slicings can be complex, but the following simple
type of slicing is always available.
Proposition 11. Any slicing by k−1 parallel hyperplanes is a {1,2,...,k }-slicing.
Proof. We show that there is a line L= {λr−b: λ ∈R}, r,b ∈Rk intersecting all cells of FY,
Y= {1,...,k }. We need to show that there is a choice of rand bsuch that for every y∈Y the set
Iy ⊆R of all λwith ⟨λr−b,(ey −ez)⟩>0 for all z∈Y\{ y}has a non-empty interior. Now, Iy
is the set of λwith
λ(ry −rz) >by −bz for all z̸= y. (13)
Choosing b1 < ··· < bk and ry = f(by), where f is a strictly increasing and strictly concave
function, we get I1 = (−∞,b2−b1
r2−r1
), Iy = ( by−by−1
ry−ry−1
,by+1−by
ry+1−ry ) for y = 2,3,...,k −1, and Ik =
(bk−bk−1
rk−rk−1
,∞). The lengths ∞,l2,...,l k−1,∞of the intervals I1,...,I k can be adjusted arbitrarily
by choosing suitable differences rj+1 −rj for all j = 1,...,k −1.
Strong modes
Recall the definition of strong modes given in page 4.
Lemma 12. Let C⊆X be a set of arrays which are pairwise different in at least two entries (a
code of minimum distance two).
•If RBMX,Y contains a probability distribution with strong modes C, then there is a linear
map Θ of {A(Y)
y : y ∈Y} into the C-cells of FX (the cones Rx above the codewords x∈C)
sending at least one vertex into each cell.
•If there is a linear mapΘ of {A(Y)
y : y∈Y} into the C-cells of FX, with maxx{⟨Θ⊤A(Y)
y ,A(X)
x ⟩}=
cfor all y∈Y, then RBMX,Ycontains a probability distribution with strong modes C.
Proof. This is by Proposition 8 and Lemma 4.
A simple consequence of the previous lemma is that if the model RBMX,Y is a universal ap-
proximator of distributions on X, then necessarily the number of hidden states is at least as large as
the maximum code of visible states of minimum distance two,|Y|≥ AX(2). Hence discrete RBMs
may not be universal approximators even when their parameter count surpasses the dimension of
the ambient probability simplex.
Example 13. Let X= {0,1,2}nand Y= {0,1,..., 4}m. In this case AX(2) = 3n−1. If RBMX,Y
is a universal approximator with n= 3 and n= 4, then m≥2 and m≥3, respectively, although
the smallest mfor which RBMX,Yhas 3n −1 parameters is m= 1 and m= 2, respectively.
Using Lemma 12 and the analysis of [Mont´ufar and Morton, 2012] gives the following.
Proposition 14. If 4⌈m/3⌉≤ n, then RBMX,Ycontains distributions with 2m strong modes.
9
MONT ´UFAR AND MORTON
5 Representational power and approximation errors
In this section we describe submodels of discrete RBMs and use them to provide bounds on the
model approximation errors depending on the number of units and their state spaces. Universal
approximation results follow as special cases with vanishing approximation error.
Theorem 15. The model RBMX,Ycan approximate the following arbitrarily well:
•Any mixture of dY= 1 + ∑m
j=1(|Yj|−1) product distributions with disjoint supports.
•When dY ≥(∏
i∈[k] |Xi|)/maxj∈[k] |Xj|for some k ≤n, any distribution from the model P
of distributions with constant value on each block {x1}×···×{ xk}×Xk+1 ×···×X n for
all xi ∈Xi, for all i∈[k].
•Any probability distribution with support contained in the union ofdYsets of the form {x1}×
···×{ xk−1}×Xk ×{xk+1}×···×{ xn}.
Proof. By Proposition 7 the model RBMX,Y contains any Hadamard product p(1) ◦···◦ p(m)
with mixtures of products as factors, p(j) ∈ MX,|Yj| for all j ∈[m]. In particular, it contains
p= p(0) ◦(1 + ˜λ1 ˜p(1)) ◦···◦ (1 + ˜λm˜p(m)), where p(0) ∈EX, ˜p(j) ∈MX,|Yj|−1, and ˜λj ∈R+.
Choosing the factors ˜p(j) with pairwise disjoint supports shows thatp= ∑m
j=0 λjp(j), whereby p(0)
can be any product distribution and p(j) can be any distribution from MX,|Yj|−1 for all j ∈[m], as
long as supp(p(j)) ∩supp(p(j′)) for all j ̸= j′. This proves the first item.
For the second item: Any point in the set Pis a mixture of uniform distributions supported
on the disjoint blocks {x1}×···×{ xk}×X k+1 ×···×X n for all (x1,...,x k) ∈X1 ×···×
Xk. Each of these uniform distributions is a product distribution, since it factorizes as px1,...,xk =∏
i∈[k] δxi
∏
i∈[n]\[k] ui, where ui denotes the uniform distribution on Xi. For any j ∈ [k] any
mixture ∑
xj∈Xj λxj px1,...,xk is also a product distribution, since it factorizes as
( ∑
xj∈Xj
λxj δxj
) ∏
i∈[k]\{j}
δxi
∏
i∈[n]\[k]
ui. (14)
Hence any distribution from the set Pis a mixture of (∏
i∈[k] |Xi|)/maxj∈[k] |Xj|product distribu-
tions with disjoint supports. The claim now follows from the first item.
For the third item: The modelEXcontains any distribution with support of the form{x1}×···×
{xk−1}×Xk ×{xk+1}×···×{ xn}. Hence, by the first item, the RBM model can approximate
any distribution arbitrarily well whose support can be covered by dYsets of that form.
We now analyse the RBM model approximation errors. Let pand qbe two probability distribu-
tions on X. The Kullback-Leibler divergence frompto qis defined as D(p∥q) := ∑
x∈Xp(x) log p(x)
q(x)
when supp(p) ⊆ supp(q) and D(p∥q) := ∞otherwise. The divergence from p to a model
M ⊆∆(X) is defined as D(p∥M) := inf q∈MD(p∥q) and the maximal approximation error
of Mis supp∈∆(X) D(p∥M).
The maximal approximation error of the independence modelEXsatisfies supp∈∆(X) D(p∥EX) ≤
|X|/maxi∈[n] |Xi|, with equality when all units have the same number of states [see Ay and Knauf,
2006, Corollary 4.10].
10
DISCRETE RESTRICTED BOLTZMANN MACHINES
0 100 200 300 400 500
100
200
300
400
500
0 100 200 300 400 500
100
200
300
400
500
0.5
1
1.5
2
2.5
x 10
7
82
84
86
88
90
92
94
96
98
k
m
Maximal-error bound
k
m
Nr. parameters
Figure 4: Illustration of Theorem 16. The left panel shows a heat map of the upper bound on the
Kullback-Leibler approximation errors of discrete RBMs with 100 visible binary units and the right
panel shows a map of the total number of model parameters, both depending on the number of
hidden units mand their possible states k= |Yj|for all j ∈[m].
Theorem 16. If ∏
i∈[n]\Λ |Xi|≤ 1 +∑
j∈[m](|Yj|−1) = dYfor some Λ ⊆[n], then the Kullback-
Leibler divergence from any distribution pon Xto the model RBMX,Yis bounded by
D(p∥RBMX,Y) ≤log
∏
i∈Λ |Xi|
maxi∈Λ |Xi|.
In particular, the model RBMX,Yis a universal approximator whenever dY≥|X|/maxi∈[n] |Xi|.
Proof. The submodel Pof RBMX,Y described in the second item of Theorem 15 is a partition
model. The maximal divergence from such a model is equal to the logarithm of the cardinality of
the largest block with constant values [see Mat ´uˇs and Ay, 2003]. Thus maxpD(p∥RBMX,Y) ≤
maxpD(p∥P) = log
(
(∏
i∈Λ |Xi|)/maxi∈Λ |Xi|
)
, as was claimed.
Theorem 16 shows that, on a large scale, the maximal model approximation error ofRBMX,Yis
smaller than that of the independence model EXby at least log(1 +∑
j∈[m](|Yj|−1)), or vanishes.
The theorem is illustrated in Figure 4. The line k = 2 shows bounds on the approximation error of
binary RBMs with mhidden units, previously treated in [Mont ´ufar et al., 2011, Theorem 5.1], and
the line m= 1 shows bounds for na¨ıve Bayes models withkhidden classes.
6 Dimension
In this section we study the dimension of the model RBMX,Y. One reason RBMs are attractive is
that they have a large learning capacity, e.g. may be built with millions of parameters. Dimension
calculations show whether those parameters are wasted, or translate into higher-dimensional spaces
of representable distributions. Our analysis builds on previous work by Cueto, Morton, and Sturm-
fels [2010], where binary RBMs are treated. The idea is to bound the dimension from below by
the dimension of a related max-plus model, called the tropical RBM model [Pachter and Sturmfels,
2004], and from above by the dimension expected from counting parameters.
11
MONT ´UFAR AND MORTON
The dimension of a discrete RBM model can be bounded from above not only by its expected
dimension, but also by a function of the dimension of its Hadamard factors:
Proposition 17. The dimension of RBMX,Yis bounded as
dim(RBMX,Y) ≤dim(MX,|Yi|) +
∑
j∈[m]\{i}
dim(MX,|Yj|−1) + (m−1) for all i∈[m]. (15)
Proof. Let udenote the uniform distribution. Note thatEX◦EX = EXand also EX◦MX,k = MX,k.
This observation, together with Proposition 7, shows that the RBM model can be factorized as
RBMX,Y= (MX,|Y1|) ◦(λ1u+ (1 −λ1)MX,|Y1|) ◦···◦ (λmu+ (1 −λm)MX,|Ym|−1),
from which the claim follows.
By the previous proposition, the model RBMX,Y can have the expected dimension only if (i)
the right hand side of eq. (15) equals |X|− 1, or (ii) each mixture model MX,k has the expected
dimension for allk≤maxj∈[m] |Yj|. Sometimes none of both conditions is satisfied and the models
‘waste’ parameters:
Example 18. The k-mixture of the independence model on X1 ×X2 is a subset of the set of
|X1|×|X 2|matrices with non-negative entries and rank at most k. It is known that the set of
M ×N matrices of rank at most k has dimension k(M + N −k) for all 1 ≤k <min{M,N }.
Hence the model MX1×X2,k has dimension smaller than its parameter count whenever 1 < k <
min{|X1|,|X2|}. By Proposition 17 if (∑
j∈[m](|Yj|−1) + 1)(|X1|+ |X2|−1) ≤|X1 ×X2|and
1 < |Yj|≤ min{|X1|,|X2|}for some j ∈[m], then RBMX1×X2,Y does not have the expected
dimension.
The next theorem indicates choices of Xand Yfor which the model RBMX,Yhas the expected
dimension. Given a sufficient statistics matrix A(X), we say that a set Z⊆X has full rank when
the matrix with columns {A(X)
x : x∈Z} has full rank.
Theorem 19. When Xcontains mdisjoint Hamming balls of radii 2(|Yj|−1) −1, j ∈[m] and
the subset of Xnot intersected by these balls has full rank, then the model RBMX,Yhas dimension
equal to the number of model parameters,
dim(RBMX,Y) = (1 +
∑
i∈[n]
(|Xi|−1))(1 +
∑
j∈[m]
(|Yj|−1)) −1.
On the other hand, if mHamming balls of radius one cover X, then
dim(RBMX,Y) = |X|− 1.
In order to prove this theorem we will need two main tools: slicings by normal fans of simplices,
described in Section 4, and the tropical RBM model, described in Section 7. The theorem will follow
from the analysis contained in Section 7.
12
DISCRETE RESTRICTED BOLTZMANN MACHINES
7 Tropical model
Definition 20. The tropical model RBMtropical
X,Y is the image of the tropical morphism
RdXdY ∋θ ↦→ Φ(v; θ) = max{⟨θ,A(X,Y)
(v,h) ⟩: h∈Y} for all v∈X, (16)
which evaluates log( 1
Z(θ)
∑
h∈Yexp(⟨θ,A(X,Y)
(v,h) ⟩)) for all v ∈X for each θ within the max-plus
algebra (addition becomes a+ b = max {a,b}) up to additive constants independent of v (i.e.,
disregarding the normalization factor Z(θ)).
The idea behind this definition is thatlog(exp(a)+exp(b)) ≈max{a,b}when aand bhave dif-
ferent order of magnitude. The tropical model captures important properties of the original model.
Of particular interest is following consequence of the Bieri-Groves theorem [see Draisma, 2008],
which gives us a tool to estimate the dimension of RBMX,Y:
dim(RBMtropical
X,Y ) ≤dim(RBMX,Y) ≤min{dim(EX,Y),|X|− 1}. (17)
The following Theorem 21 describes the regions of linearity of the map Φ. Each of these
regions corresponds to a collection of Yj-slicings (see Definition 9) of the set {A(X)
x : x ∈X} for
all j ∈[m]. This result allows us to express the dimension of RBMtropical
X,Y as the maximum rank of
a class of matrices defined by collections of slicings.
For each j ∈[m] let Cj = {Cj,1,...,C j,|Yj|}be a Yj-slicing of {A(X)
x : x∈X} and let ACj,k
be the |X|× dX-matrix with x-th row equal to (A(X)
x )⊤when x∈Cj,k and equal to a row of zeros
otherwise. Let ACj = (ACj,1 |···| ACj,|Yj|) ∈R|X|×|Yj|dX and d= ∑
j∈[m] |Yj|dX.
Theorem 21. On each region of linearity, the tropical morphism Φ is the linear map Rd →
RBMtropical
X,Y represented by the |X|× d-matrix
A= (AC1 |···| ACm),
modulo constant functions. In particular, dim(RBMtropical
X,Y ) + 1 is the maximum rank of Aover all
possible collections of slicings C1,...,C m.
Proof. Again use the homogeneous version of the matrix A(X,Y) as in the proof of Proposition
7; this will not affect the rank of A. Let θhj = ( θ{j,i},(hj,xi))i∈[n],xi∈Xi and let Ahj denote the
submatrix of A(X,Y) containing the rows with indices {{j,i},(hj,xi): i∈[n],xi ∈Xi}. For any
given v∈X we have
max
{⟨
θ,A(X,Y)
(v,h)
⟩
: h∈Y
}
=
∑
j∈[m]
max
{⟨
θhj ,Ahj (v,hj)
⟩
: hj ∈Yj
}
,
from which the claim follows.
In the following we evaluate the maximum rank of the matrixAfor various choices of Xand Y
by examining good slicings. We focus on slicings by parallel hyperplanes.
Lemma 22. For any x∗∈X and 0 <k <n the affine hull of the set {A(X)
x : dH(x,x∗) = k}has
dimension ∑
i∈[n](|Xi|−1) −1.
13
MONT ´UFAR AND MORTON
Proof. Without loss of generality let x∗ = (0,..., 0). The set Zk := {A(X)
x : dH(x,x∗) = k}is
the intersection of {A(X)
x : x ∈X} with the hyperplane Hk := {z: ⟨1,z⟩= k+ 1}. Now note
that the two vertices of an edge of QX either lie in the same hyperplane Hl, or in two adjacent
parallel hyperplanes Hl and Hl+1, with l ∈N. Hence the hyperplane Hk does not slice any edges
of QX and conv(Zk) = QX ∩Hk. The set Zk is not contained in any proper face of QX and
hence conv(Zk) intersects the interior of QX. Thus dim(conv(Zk)) = dim( QX) −1, as was
claimed.
Lemma 22 implies the following.
Corollary 23. Let x ∈X , and 2k−3 ≤n. There is a slicing C1 = {C1,1,...,C 1,k}of Xby
k−1 parallel hyperplanes such that ∪k−1
l=1 C1,l = Bx(2k−3) is the Hamming ball of radius 2k−3
centered at xand the matrix AC1 = (AC1,1 |···| AC1,k−1 ) has full rank.
Recall that AX(d) denotes the maximal cardinality of a subset of X of minimum Hamming
distance at least d. When X= {0,1,...,q −1}n we write Aq(n,d). Let KX(d) denote the minimal
cardinality of a subset of Xwith covering radius d.
Proposition 24 (Binary visible units) . Let X = {0,1}n and |Yj|= sj for all j ∈[m]. If X
contains mdisjoint Hamming balls of radii 2sj −3, j ∈[m] whose complement has full rank, then
RBMtropical
X,Y has the expected dimension, min{∑
j∈[m](sj −1)(n+ 1) +n,2n −1}.
In particular, ifX= {0,1}nand Y= {0,1,...,s −1}mwith m< A2(n,d) and d= 4(s−1)−
1, then RBMX,Yhas the expected dimension. It is known that A2(n,d) ≥2n−⌈log2(∑d−2
j=0 (n−1
j ))⌉.
Proposition 25 (Binary hidden units). Let Y= {0,1}m and Xbe arbitrary.
•If m+ 1 ≤AX(3), then RBMtropical
X,{0,1}m has dimension (1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If m+ 1 ≥KX(1), then RBMtropical
X,{0,1}m has dimension |X|− 1.
Let Y= {0,1}m and X= {0,1,...,q −1}n, where qis a prime power.
•If m+ 1 ≤qn−⌈logq(1+(n−1)(q−1)+1)⌉, then RBMtropical
X,Y has dimension
(1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If n = ( qr −1)/(q−1) for some r ≥2, then AX(3) = KX(1), and RBMtropical
X,Y has the
expected dimension for any m.
In particular, when all units are binary andm< 2n−⌈log2(n+1)⌉, then RBMX,Yhas the expected
dimension; this was shown in [Cueto et al., 2010].
Proposition 26 (Arbitrary sized units). If Xcontains mdisjoint Hamming balls of radii 2|Y1|−
3,..., 2|Ym|−3, and the complement of their union has full rank, thenRBMtropical
X,Y has the expected
dimension.
14
DISCRETE RESTRICTED BOLTZMANN MACHINES
Proof. Propositions 24, 25, and 26 follow from Theorem 21 and Corollary 23 together with the
following explicit bounds on A by [Gilbert, 1952, Varshamov, 1957]:
Aq(n,d) ≥ qn
∑d−1
j=0
(n
j
)
(q−1)j.
If qis a prime power, thenAq(n,d) ≥qk, where kis the largest integer withqk < qn
∑d−2
j=0 (n−1
j )(q−1)j .
In particular, A2(n,3) ≥2k, where k is the largest integer with 2k < 2n
(n−1)+1 = 2n−log2(n), i.e.,
k= n−⌈log2(n+ 1)⌉.
Example 27. Many results in coding theory can now be translated directly to statements about
the dimension of discrete RBMs. Here is an example. Let X = {1,2,...,s }×{ 1,2,...,s }×
{1,2,...,t }, s ≤t. The minimum cardinality of a code C ⊆X with covering-radius one equals
KX(1) = s2 −
⌊
(3s−t)2
8
⌋
if t ≤3s, and KX(1) = s2 otherwise [see Cohen et al., 2005, Theo-
rem 3.7.4]. Hence RBMtropical
X,{0,1}m has dimension |X|−1 when m+ 1 ≥s2 −
⌊
(3s−t)2
8
⌋
and t≤3s,
and when m+ 1 ≥s2 and t> 3s.
8 Discussion
In this note we study the representational power of RBMs with discrete units. Our results generalize
a diversity of previously known results for standard binary RBMs and na ¨ıve Bayes models. They
help contrasting the geometric-combinatorial properties of distributed products of experts versus
non-distributed mixtures of experts.
We estimate the number of hidden units for which discrete RBM models can approximate any
distribution to any desired accuracy, depending on the cardinalities of their units’ state spaces. This
analysis shows that the maximal approximation error increases at most logarithmically with the
total number of visible states and decreases at least logarithmically with the sum of the number of
states of the hidden units. This observation could be helpful, for example, in designing a penalty
term to allow comparison of models with differing numbers of units. It is worth mentioning that the
submodels of discrete RBMs described in Theorem 15 can be used not only to estimate the maximal
model approximation errors, but also the expected model approximation errors given a prior of target
distributions on the probability simplex. See [Mont ´ufar and Rauh, 2012] for an exact analysis of
Dirichlet priors. In future work it would be interesting to study the statistical approximation errors
of discrete RBMs and to complement the theory by an empirical evaluation.
The combinatorics of tropical discrete RBMs allows us to relate the dimension of discrete RBM
models to the solutions of linear optimization problems and slicings of convex support polytopes by
normal fans of simplices. We use this to show that the modelRBMX,Yhas the expected dimension
for many choices of Xand Y, but not for all choices. We based our explicit computations of the
dimension of RBMs on slicings by collections of parallel hyperplanes, but more general classes of
slicings may be considered. The same tools presented in this paper can be used to estimate the
dimension of a general class of models involving interactions within layers, defined as Kronecker
products of hierarchical models [see Mont ´ufar and Morton, 2013]. We think that the geometric-
combinatorial picture of discrete RBMs developed in this paper may be helpful in solving various
long standing theoretical problems in the future, for example: What is the exact dimension of na¨ıve
15
MONT ´UFAR AND MORTON
Bayes models with general discrete variables? What is the smallest number of hidden variables that
make an RBM a universal approximator? Do binary RBMs always have the expected dimension?
Acknowledgments
We are grateful to the ICLR 2013 community for very valuable comments. This work was accom-
plished in part at the Max Planck Institute for Mathematics in the Sciences. This work is supported
in part by DARPA grant FA8650-11-1-7145.
References
M. Aoyagi. Stochastic complexity and generalization error of a Restricted Boltzmann Machine in
Bayesian estimation. J. Mach. Learn. Res., 99:1243–1272, August 2010.
N. Ay and A. Knauf. Maximizing multi-information. Kybernetika, 42(5):517–538, 2006.
Y . Bengio. Learning deep architectures for AI.Found. Trends Mach. Learn., 2(1):1–127, 2009.
Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks.
In B. Sch ¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing
Systems 19, pages 153–160. MIT Press, Cambridge, MA, 2007.
M. A. Carreira-Perpi ˜nan and G. E. Hinton. On contrastive divergence learning. In Proceedings of
the 10-th Interantional Workshop on Artificial Intelligence and Statistics, 2005.
M. V . Catalisano, A. V . Geramita, and A. Gimigliano. Secant varieties ofP1 ×···× P1 (n-times)
are not defective for n≥5. J. Algebraic Geometry, 20:295–327, 2011.
G. Cohen, I. Honkala, S. Litsyn, and A. Lobstein. Covering Codes. North-Holland Mathematical
Library. Elsevier Science, 2005.
M. A. Cueto, J. Morton, and B. Sturmfels. Geometry of the restricted Boltzmann machine. In
M. Viana and H. Wynn, editors, Algebraic methods in statistics and probability II, AMS Special
Session, volume 2. American Mathematical Society, 2010.
G. E. Dahl, R. P. Adams, and H. Larochelle. Training restricted Boltzmann machines on word
observations. arXiv:1202.5695, 2012.
A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological) , 39(1):1–38,
1977.
J. Draisma. A tropical approach to secant dimensions. J. Pure Appl. Algebra , 212(2):349–363,
2008.
Y . Freund and D. Haussler. Unsupervised learning of distributions of binary vectors using 2-layer
networks. In J. E. Moody, S. J. Hanson, and R. Lippmann, editors, Advances in Neural Informa-
tion Processing Systems 4, pages 912–919. Morgan Kaufmann, 1991.
16
DISCRETE RESTRICTED BOLTZMANN MACHINES
E. N. Gilbert. A comparison of signalling alphabets. Bell System Technical Journal, 31:504–522,
1952.
G. E. Hinton. Products of experts. In Proceedings 9-th ICANN, volume 1, pages 1–6, 1999.
G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Compu-
tation, 14:1771–1800, 2002.
G. E. Hinton. A practical guide to training restricted Boltzmann machines, version 1. Technical
report, UTML2010-003, University of Toronto, 2010.
G. E. Hinton, S. Osindero, and Y . Teh. A fast learning algorithm for deep belief nets. Neural
Computation, 18:1527–1554, 2006.
N. Le Roux and Y . Bengio. Representational power of restricted Boltzmann machines and deep
belief networks. Neural Computation, 20(6):1631–1649, 2008.
P. M. Long and R. A. Servedio. Restricted Boltzmann machines are hard to approximately evaluate
or simulate. In J. F ¨urnkranz and T. Joachims, editors, Proceedings of the 27th International
Conference on Machine Learning (ICML-10), pages 703–710. Omnipress, 2010.
D. Lowd and P. Domingos. Naive Bayes models for probability estimation. In Proceedings of the
22nd International Conference on Machine Learning, pages 529–536. ACM Press, 2005.
T. K. Marks and J. R. Movellan. Diffusion networks, products of experts, and factor analysis. In
Proc. 3rd Int. Conf. Independent Component Anal. Signal Separation, pages 481–485, 2001.
F. Mat´uˇs and N. Ay. On maximization of the information divergence from an exponential family. In
Proceedings of the WUPES’03, pages 199–204. University of Economics, Prague, 2003.
R. Memisevic and G. E. Hinton. Learning to represent spatial transformations with factored higher-
order Boltzmann machines. Neural Computation, 22(6):1473–1492, June 2010.
G. Mont´ufar. Mixture decompositions of exponential families using a decomposition of their sample
spaces. Kybernetika, 49(1), 2013.
G. Mont ´ufar and N. Ay. Refinements of universal approximation results for deep belief networks
and restricted Boltzmann machines. Neural Computation, 23(5):1306–1319, 2011.
G. Mont ´ufar and J. Morton. When does a mixture of products contain a product of mixtures?
http://arxiv.org/abs/1206.0387, 2012.
G. Mont´ufar and J. Morton. Geometry of hierarchical models on hidden-visible products of simpli-
cial complexes. 2013. In preparation.
G. Mont´ufar and J. Rauh. Scaling of model approximation errors and expected entropy distances.
In Proc. of the 9th Workshop on Uncertainty Processing (WUPES 2012), pages 137–148, 2012.
Preprint available at http://arxiv.org/abs/1207.3399.
G. Mont ´ufar, J. Rauh, and N. Ay. Expressive power and approximation errors of restricted Boltz-
mann machines. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. C. N. Pereira, and K. Q. Weinberger,
editors, Advances in Neural Information Processing Systems 24, pages 415–423, 2011.
17
MONT ´UFAR AND MORTON
S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of Markov random
fields. In J. C. Platt, D. Koller, Y . Singer, and S. Roweis, editors,Advances in Neural Information
Processing Systems 20, pages 1121–1128. MIT Press, Cambridge, MA, 2008.
L. Pachter and B. Sturmfels. Tropical geometry of statistical models. Proceedings of the National
Academy of Sciences of the United States of America, 101(46):16132–16137, Nov. 2004.
M. Ranzato, A. Krizhevsky, and G. E. Hinton. Factored 3-Way Restricted Boltzmann Machines For
Modeling Natural Images. In Proc. Thirteenth International Conference on Artificial Intelligence
and Statistics (AISTATS), pages 621–628, 2010.
W. E. Roth. On direct product matrices. Bulletin of the American Mathematical Society , 40:461–
468, 1934.
R. Salakhutdinov, A. Mnih, and G. E. Hinton. Restricted Boltzmann machines for collaborative
filtering. In Proceedings of the 24th International Conference on Machine Learning, pages 791–
798, 2007.
T. J. Sejnowski. Higher-order Boltzmann machines. In Neural Networks for Computing , pages
398–403. American Institute of Physics, 1986.
P. Smolensky. Information processing in dynamical systems: foundations of harmony theory. In
Symposium on Parallel and Distributed Processing, 1986.
T. Tran, D. Phung, and S. Venkatesh. Mixed-variate restricted Boltzmann machines. InProc. of 3rd
Asian Conference on Machine Learning (ACML), pages 213–229, 2011.
R. R. Varshamov. Estimate of the number of signals in error correcting codes.Doklady Akad. Nauk
SSSR, 117:739–741, 1957.
M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application
to information retrieval. In L. K. Saul, Y . Weiss, and L. Bottou, editors, Advances in Neural
Information Processing Systems 17, pages 1481–1488. MIT Press, Cambridge, MA, 2005.
18
|
Guido F. Montufar, Jason Morton
|
Unknown
| 2,013
|
{"id": "ttxM6DQKghdOi", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358411400000, "tmdate": 1358411400000, "ddate": null, "number": 59, "content": {"title": "Discrete Restricted Boltzmann Machines", "decision": "conferenceOral-iclr2013-conference", "abstract": "In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code", "pdf": "https://arxiv.org/abs/1301.3529", "paperhash": "montufar|discrete_restricted_boltzmann_machines", "keywords": [], "conflicts": [], "authors": ["Guido F. Montufar", "Jason Morton"], "authorids": ["guidomontufar@googlemail.com", "jason.morton@gmail.com"]}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["guidomontufar@googlemail.com"], "writers": []}
|
[Review]:
To the reviewers of this paper,
There appear to be some disagreement of the utility of the contributions of this paper to a machine learning audience.
Please read over the comments of the other reviewers and submit comment as you see fit.
|
Aaron Courville
| null | null |
{"id": "_YRe0x39e7YBa", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363534860000, "tmdate": 1363534860000, "ddate": null, "number": 1, "content": {"title": "", "review": "To the reviewers of this paper,\r\n\r\nThere appear to be some disagreement of the utility of the contributions of this paper to a machine learning audience. \r\n\r\nPlease read over the comments of the other reviewers and submit comment as you see fit."}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttxM6DQKghdOi", "readers": ["everyone"], "nonreaders": [], "signatures": ["Aaron Courville"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 1,
"total": 2
}
| 1.5
| -0.409674
| 1.909674
| 1.502109
| 0.158289
| 0.002109
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0.5
|
{
"criticism": 0.5,
"example": 0,
"importance_and_relevance": 0.5,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.5
}
| 1.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttxM6DQKghdOi
|
Discrete Restricted Boltzmann Machines
|
In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code
|
Discrete Restricted Boltzmann Machines
Guido Mont´ufar GFM 10@ PSU .EDU
Jason Morton MORTON @MATH .PSU .EDU
Department of Mathematics
Pennsylvania State University
University Park, PA 16802, USA
Abstract
We describe discrete restricted Boltzmann machines: probabilistic graphical models with bipar-
tite interactions between visible and hidden discrete variables. Examples are binary restricted
Boltzmann machines and discrete na ¨ıve Bayes models. We detail the inference functions and
distributed representations arising in these models in terms of configurations of projected prod-
ucts of simplices and normal fans of products of simplices. We bound the number of hidden
variables, depending on the cardinalities of their state spaces, for which these models can ap-
proximate any probability distribution on their visible states to any given accuracy. In addition,
we use algebraic methods and coding theory to compute their dimension.
Keywords: Restricted Boltzmann Machine, Na¨ıve Bayes Model, Representational Power, Dis-
tributed Representation, Expected Dimension
1 Introduction
A restricted Boltzmann machine (RBM) is a probabilistic graphical model with bipartite interactions
between an observed set and a hidden set of units [see Smolensky, 1986, Freund and Haussler,
1991, Hinton, 2002, 2010]. A characterizing property of these models is that the observed units
are independent given the states of the hidden units and vice versa. This is a consequence of the
bipartiteness of the interaction graph and does not depend on the units’ state spaces. Typically
RBMs are defined with binary units, but other types of units have also been considered, including
continuous, discrete, and mixed type units [see Welling et al., 2005, Marks and Movellan, 2001,
Salakhutdinov et al., 2007, Dahl et al., 2012, Tran et al., 2011]. We study discrete RBMs, also called
multinomial or softmax RBMs, which are special types of exponential family harmoniums [Welling
et al., 2005]. While each unit Xi of a binary RBM has the state space {0,1}, the state space of
each unit Xi of a discrete RBM is a finite set Xi = {0,1,...,r i −1}. Like binary RBMs, discrete
RBMs can be trained using contrastive divergence (CD) [Hinton, 1999, 2002, Carreira-Perpi˜nan and
Hinton, 2005] or expectation-maximization (EM) [Dempster et al., 1977] and can be used to train
the parameters of deep systems layer by layer [Hinton et al., 2006, Bengio et al., 2007].
Non-binary visible units are natural because they can directly encode non-binary features. The
situation with hidden units is more subtle. States that appear in different hidden units can be acti-
1
arXiv:1301.3529v4 [stat.ML] 22 Apr 2014
MONT ´UFAR AND MORTON
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
24 40 79
Figure 1: Examples of probability models treated in this paper, in the special case of binary visible
variables. The light (dark) nodes represent visible (hidden) variables with the indicated number of
states. The total parameter count of each model is indicated at the top. From left to right: a binary
RBM; a discrete RBM with one 8-valued and one binary hidden units; and a binary na ¨ıve Bayes
model with 16 hidden classes.
vated by the same visible vector, but states that appear in the same hidden unit are mutually exclu-
sive. Non-binary hidden units thus allow one to explicitly represent complex exclusive relationships.
For example, a discrete RBM topic model would allow some topics to be mutually exclusive and
other topics to be mixed together freely. This provides a better match to the semantics of several
learning problems, although the learnability of such representations is mostly open. The practical
need to represent mutually exclusive properties is evidenced by the common approach of adding
activation sparsity parameters to binary RBM hidden states, which artificially create mutually ex-
clusive non-binary states by penalizing models which have more than a certain percentage of hidden
units active.
A discrete RBM is a product of experts [Hinton, 1999]; each hidden unit represents an expert
which is a mixture model of product distributions, or na¨ıve Bayes model. Hence discrete RBMs cap-
ture both na¨ıve Bayes models and binary RBMs, and interpolate between non-distributed mixture
representations and distributed mixture representations [Bengio, 2009, Mont´ufar and Morton, 2012].
See Figure 1. Na¨ıve Bayes models have been studied across many disciplines. In machine learning
they are most commonly used for classification and clustering, but have also been considered for
probabilistic modelling [Lowd and Domingos, 2005, Mont ´ufar, 2013]. Theoretical work on binary
RBM models includes results on universal approximation [Freund and Haussler, 1991, Le Roux
and Bengio, 2008, Mont ´ufar and Ay, 2011], dimension and parameter identifiability [Cueto et al.,
2010], Bayesian learning coefficients [Aoyagi, 2010], complexity [Long and Servedio, 2010], and
approximation errors [Mont´ufar et al., 2011]. In this paper we generalize some of these theoretical
results to discrete RBMs.
Probability models with more general interactions than strictly bipartite have also been consid-
ered, including semi-restricted Boltzmann machines and higher-order interaction Boltzmann ma-
chines [see Sejnowski, 1986, Memisevic and Hinton, 2010, Osindero and Hinton, 2008, Ranzato
et al., 2010]. The techniques that we develop in this paper also serve to treat a general class of
RBM-like models allowing within-layer interactions, a generalization that will be carried out in a
forthcoming work [Mont´ufar and Morton, 2013].
Section 2 collects basic facts about independence models, na ¨ıve Bayes models, and binary
RBMs, including an overview on the aforementioned theoretical results. Section 3 defines discrete
RBMs formally and describes them as (i) products of mixtures of product distributions (Proposi-
tion 7) and (ii) as restricted mixtures of product distributions. Section 4 elaborates on distributed
representations and inference functions represented by discrete RBMs (Proposition 11, Lemma 12,
2
DISCRETE RESTRICTED BOLTZMANN MACHINES
ex1=1
ex2=1
ex3=1
ex1=1
ex1=2
ex2=1
Figure 2: The convex support of the independence model of three binary variables (left) and of a
binary-ternary pair of variables (right) discussed in Example 1.
and Proposition 14). Section 5 addresses the expressive power of discrete RBMs by describing
explicit submodels (Theorem 15) and provides results on their maximal approximation errors and
universal approximation properties (Theorem 16). Section 6 treats the dimension of discrete RBM
models (Proposition 17 and Theorem 19). Section 7 contains an algebraic-combinatorial discussion
of tropical discrete RBM models (Theorem 21) with consequences for their dimension collected in
Propositions 24, 25, and 26.
2 Preliminaries
2.1 Independence models
Consider a system of n <∞random variables X1,...,X n. Assume that Xi takes states xi in a
finite set Xi = {0,1,...,r i −1}for all i ∈{1,...,n }=: [n]. The state space of this system is
X:= X1 ×···×X n. We write xλ = (xi)i∈λ for a joint state of the variables with index i∈λfor
any λ⊆[n], and x= (x1,...,x n) for a joint state of all variables. We denote by ∆(X) the set of
all probability distributions on X. We write ⟨a,b⟩for the inner product a⊤b.
The independence model of the variables X1,...,X n is the set of product distributions p(x) =∏
i∈[n] pi(xi) for all x∈X, where pi is a probability distribution with state space Xi for all i∈[n].
This model is the closure EX (in the Euclidean topology) of the exponential family
EX :=
{ 1
Z(θ) exp(⟨θ,A(X)⟩): θ∈RdX
}
, (1)
where A(X) ∈RdX×X is a matrix of sufficient statistics; with rows equal to the indicator functions
1X and 1{x: xi=yi}for all yi ∈Xi \{0}for all i ∈[n]. The partition function Z(θ) normalizes
the distributions. The convex support of EX is the convex hull QX := conv({A(X)
x }x∈X) of the
columns of A(X), which is a Cartesian product of simplices with QX ∼= ∆(X1) ×···× ∆(Xn).
Example 1. The sufficient statistics of the independence models EX and EX′ with state spaces
3
MONT ´UFAR AND MORTON
X= {0,1}3 and X′= {0,1,2}×{0,1}are, with rows labeled by indicator functions,
A(X) =
[1
1
1
] [1
1
0
] [1
0
1
] [1
0
0
] [0
1
1
] [0
1
0
] [0
0
1
] [0
0
0
]
1 1 1 1 1 1 1 1
1 1 1 1 0 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
x3 = 1
x2 = 1
x1 = 1
A(X′) =
[1
2
] [1
1
] [1
0
] [0
2
] [0
1
] [0
0
]
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
x2 = 1
x1 = 2
x1 = 1
.
In the first case the convex support is a cube and in the second it is a prism. Both convex supports
are three-dimensional polytopes, but the prism has fewer vertices and is more similar to a simplex,
meaning that its vertex set is affinely more independent than that of the cube. See Figure 2.
2.2 Na ¨ıve Bayes models
Let k∈N. The k-mixture of the independence model, or na¨ıve Bayes modelwith khidden classes,
with visible variables X1,...,X n is the set of all probability distributions expressible as convex
combinations of kpoints in EX:
MX,k :=
{∑
i∈[k]
λip(i) : p(i) ∈EX, λi ≥0, for all i∈[k], and
∑
i∈[k]
λi = 1
}
. (2)
We write Mn,k for the k-mixture of the independence model of nbinary variables. The dimen-
sions of mixtures of binary independence models are known:
Theorem 2 (Catalisano et al. [2011]). The mixtures of binary independence models Mn,k have the
dimension expected from counting parameters,min{nk+ (k−1),2n−1}, except for M4,3, which
has dimension 13 instead of 14.
Let AX(d) denote the maximal cardinality of a subset X′⊆X of minimum Hamming distance
at least d, i.e., the maximal cardinality of a subset X′⊆X with dH(x,y) ≥dfor all distinct points
x,y ∈X′, where dH(x,y) := |{i∈[n]: xi ̸= yi}|denotes the Hamming distance betweenxand y.
The function AXis familiar in coding theory. Thek-mixtures of independence models are universal
approximators when kis large enough. This can be made precise in terms of AX(2):
Theorem 3 (Mont´ufar [2013]). The mixture model MX,k can approximate any probability distri-
bution on Xarbitrarily well if k≥|X|/maxi∈[n] |Xi|and only if k≥AX(2).
By results from [Gilbert, 1952, Varshamov, 1957], when q is a power of a prime number and
X= {0,1,...,q −1}n, then AX = qn−1. In these cases the previous theorem shows that MX,k
is a universal approximator of distributions on Xif and only if k ≥qn−1. In particular, the small-
est na¨ıve Bayes model universal approximator of distributions on {0,1}n has 2n−1(n+ 1) −1
parameters.
Some of the distributions not representable by a given na¨ıve Bayes model can be characterized
in terms of their modes. A state x∈X is a mode of a distribution p∈∆(X) if p(x) >p(y) for all
ywith dH(x,y) = 1 and it is a strong mode if p(x) >∑
y: dH(x,y)=1 p(y).
Lemma 4 (Mont´ufar and Morton [2012]). If a mixture of product distributions p = ∑
iλip(i) has
strong modes C⊆X , then there is a mixture component p(i) with mode xfor each x∈C.
4
DISCRETE RESTRICTED BOLTZMANN MACHINES
2.3 Binary restricted Boltzmann machines
The binary RBM model with nvisible and mhidden units, denoted RBMn,m, is the set of distribu-
tions on {0,1}n of the form
p(x) = 1
Z(W,B,C )
∑
h∈{0,1}m
exp(h⊤Wx + B⊤x+ C⊤h) for all x∈{0,1}n, (3)
where xdenotes states of the visible units, hdenotes states of the hidden units, W = (Wji)ji ∈
Rm×n is a matrix of interaction weights, B ∈Rn and C ∈Rm are vectors of bias weights, and
Z(W,B,C ) = ∑
x∈{0,1}n
∑
h∈{0,1}m exp(h⊤Wx + B⊤x+ C⊤h) is the normalizing partition
function.
It is known that these models have the expected dimension for many choices of nand m:
Theorem 5 (Cueto et al. [2010]). The dimension of the model RBMn,m is equal to nm+ n+ m
when m+ 1 ≤2n−⌈log2(n+1)⌉and it is equal to 2n −1 when m≥2n−⌊log2(n+1)⌋.
It is also known that with enough hidden units, binary RBMs are universal approximators:
Theorem 6 (Mont´ufar and Ay [2011]). The model RBMn,m can approximate any distribution on
{0,1}n arbitrarily well whenever m≥2n−1 −1.
A previous result by Le Roux and Bengio [2008, Theorem 2] shows thatRBMn,m is a universal
approximator wheneverm≥2n+1. It is not known whether the bounds from Theorem 6 are always
tight, but they show that for any given n, the smallest RBM universal approximator of distributions
on {0,1}n has at most 2n−1(n+ 1) −1 parameters and hence not more than the smallest na ¨ıve
Bayes model universal approximator (Theorem 3).
3 Discrete restricted Boltzmann machines
Let Xi = {0,1,...,r i−1}for all i∈[n] and Yj = {0,1,...,s j−1}for all j ∈[m]. The graphical
model with full bipartite interactions {{i,j}: i∈[n],j ∈[m]}on X×Y is the exponential family
EX,Y:=
{ 1
Z(θ) exp(⟨θ,A(X,Y)⟩): θ∈RdXdY
}
, (4)
with sufficient statistics matrix equal to the Kronecker product A(X,Y) = A(X) ⊗A(Y) of the
sufficient statistics matrices A(X) and A(Y) of the independence models EX and EY. The matrix
A(X,Y) has dXdY =
(∑
i∈[n](|Xi|−1) + 1
)(∑
j∈[m](|Yi|−1) + 1
)
linearly independent rows
and |X×Y| columns, each column corresponding to a joint state (x,y) of all variables. Disregard-
ing the entry of θ that is multiplied with the constant row of A(X,Y), which cancels out with the
normalization function Z(θ), this parametrization of EX,Y is one-to-one. In particular, this model
has dimension dim(EX,Y) = dXdY−1.
The discrete RBM model RBMX,Yis the following set of marginal distributions:
RBMX,Y:=
{
q(x) =
∑
y∈Y
p(x,y) for all x∈X : p∈EX,Y
}
. (5)
5
MONT ´UFAR AND MORTON
In the case of one single hidden unit, this model is the na¨ıve Bayes model onXwith |Y1|hidden
classes. When all units are binary, X = {0,1}n and Y= {0,1}m, this model is RBMn,m. Note
that the exponent in eq. (3) can be written as (h⊤Wx + B⊤x+ C⊤h) = ⟨θ,A(X,Y)
(x,h) ⟩, taking for θ
the column-by-column vectorization of the matrix
(0 B⊤
C W
)
.
Conditional distributions
The conditional distributions of discrete RBMs can be described in the following way. Consider a
vector θ ∈RdXdY parametrizing EX,Y, and the matrix Θ ∈RdY×dX with column-by-column vec-
torization equal toθ. A lemma by Roth [1934] shows thatθ⊤(A(X)⊗A(Y))(x,y) = (A(X)
x )⊤Θ⊤A(Y)
y
for all x∈X, y∈Y, and hence
⣨
θ,A(X,Y)
(x,y)
⟩
=
⣨
ΘA(X)
x ,A(Y)
y
⟩
=
⣨
Θ⊤A(Y)
y ,A(X)
x
⟩
∀x∈X,y ∈Y. (6)
The inner product in eq. (6) describes following probability distributions:
pθ(·,·) = 1
Z(θ) exp
(⟨
θ,A(X,Y)⟩)
, (7)
pθ(·|x) = 1
Z
(
ΘA(X)
x
)exp
(⟨
ΘA(X)
x ,A(Y)⟩)
, and (8)
pθ(·|y) = 1
Z
(
Θ⊤A(Y)
y
)exp
(⟨
Θ⊤A(Y)
y ,A(X)⟩)
. (9)
Geometrically, ΘA(X) is a linear projection of the columns of the sufficient statistics matrix A(X)
into the parameter space of EY, and similarly, Θ⊤A(Y) is a linear projection of the columns of A(Y)
into the parameter space of EX.
Polynomial parametrization
Discrete RBMs can be parametrized not only in the exponential way discussed above, but also by
simple polynomials. The exponential family EX,Ycan be parametrized by square free monomials:
p(v,h) = 1
Z
∏
{j,i}∈ [m] ×[n],
(y′
j,x′
i) ∈Yj ×Xi
(γ{j,i},(y′
j,x′
i))
δy′
j
(hj)δx′
i
(vi)
for all (v,h) ∈Y×X , (10)
where γ{j,i},(y′
j,x′
i) are positive reals. The probability distributions in RBMX,Ycan be written as
p(v) = 1
Z
∏
j∈[m]
( ∑
hj∈Yj
γ{j,1},(hj,v1) ···γ{j,n},(hj,vn)
)
for all v∈X. (11)
The parameters γ{j,i},(y′
j,x′
i) correspond to exp(θ{j,i},(y′
j,x′
i)) in the parametrization given in eq. (4).
6
DISCRETE RESTRICTED BOLTZMANN MACHINES
Products of mixtures and mixtures of products
In the following we describe discrete RBMs from two complementary perspectives: (i) as products
of experts, where each expert is a mixture of products, and (ii) as restricted mixtures of product
distributions. The renormalized entry-wise (Hadamard) product of two probability distributions p
and qon Xis defined as p◦q := (p(x)q(x))x∈X/∑
y∈Xp(y)q(y). Here we assume that pand q
have overlapping supports, such that the definition makes sense.
Proposition 7. The model RBMX,Yis a Hadamard product of mixtures of product distributions:
RBMX,Y= MX,|Y1|◦···◦M X,|Ym|.
Proof. The statement can be seen directly by considering the parametrization from eq. (11). To
make this explicit, one can use a homogeneous version of the matrix A(X,Y) which we denote by
Aand which defines the same model. Each row of Ais indexed by an edge {i,j}of the bipartite
graph and a joint state (xi,hj) of the visible and hidden units connected by this edge. Such a row
has a one in any column when these states agree with the global state, and zero otherwise. For any
j ∈[m] let Aj,: denote the matrix containing the rows of Awith indices ({i,j},(xi,hj)) for all
xi ∈Xi for all i∈[n] for all hj ∈Yj, and let A(x,h) denote the (x,h)-column of A. We have
p(x) = 1
Z
∑
h
exp(⟨θ,A(x,h)⟩)
= 1
Z
∑
h
exp(⟨θ1,:,A1,:(x,h)⟩) exp(⟨θ2,:,A2,:(x,h)⟩) ···exp(⟨θm,:,Am,:(x,h)⟩)
= 1
Z
(∑
h1
exp(⟨θ1,:,A1,:(x,h1)⟩)
)
···
(∑
hm
exp(⟨θm,:,Am,:(x,hm)⟩)
)
= 1
Z(Z1p(1)(x)) ···(Zmp(m)(x)) = 1
Z′p(1)(x) ···p(m)(x),
where p(j) ∈MX,|Yj|and Zj = ∑
x∈X
∑
hj∈Yj exp(⟨θj,:,Aj,:(x,hj)⟩) for all j ∈[m]. Since the
vectors θj,: can be chosen arbitrarily, the factors p(j) can be made arbitrary within MX,|Yj|.
Of course, every distribution in RBMX,Y is a mixture distribution p(x) = ∑
h∈Yp(x|h)q(h).
The mixture weights are given by the marginals q(h) on Yof distributions from EX,Y, and the
mixture components can be described as follows.
Proposition 8. The set of conditional distributions p(·|h), h∈Y of a distribution in EX,Yis the set
of product distributions in EX with parameters θh = Θ⊤A(Y)
h , h ∈Y equal to a linear projection
of the vertices {A(Y)
h : h∈Y} of the Cartesian product of simplices QY∼= ∆(Y1) ×···× ∆(Ym).
Proof. This is by eq. (6).
4 Products of simplices and their normal fans
Binary RBMs have been analyzed by considering each of the mhidden units as defining a hyper-
plane Hj slicing the n-cube into two regions. To generalize the results provided by this analysis, in
7
MONT ´UFAR AND MORTON
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet
R0
R1
R2
0
1
2(0,0) (0,1)
(1,0) (1 ,1)
Θ−1(R2)
Θ−1(R1)
Θ−1(R0)
Figure 3: Three slicings of a square by the normal fan of a triangle with maximal conesR0, R1, and
R2, corresponding to three possible inference functions of RBM{0,1}2,{0,1,2}.
this section we replace the n-cube with a general product of simplices QX, and replace the two re-
gions defined by the hyperplane Hj by the |Yj|regions defined by the maximal cones of the normal
fan of the simplex ∆(Yj).
Subdivisions of independence models
The normal cone of a polytope Q ⊂Rd at a point x ∈Q is the set of all vectors v ∈Rd with
⟨v,(x−y)⟩≥ 0 for all y ∈Q. We denote by Rx the normal cone of the product of simplices
QX = conv{A(X)
x }x∈X at the vertex A(X)
x . The normal fan FX is the set of all normal cones of
QX. The product distributions pθ = 1
Z(θ) exp(⟨θ,A(X)⟩) ∈EX strictly maximized at x∈X, with
pθ(x) >pθ(y) for all y∈X\{ x}, are those with parameter vector θin the relative interior of Rx.
Hence the normal fan FX partitions the parameter space of the independence model into regions of
distributions with maxima at different inputs.
Inference functions and slicings
For any choice of parameters of the model RBMX,Y, there is an inference function π: X →Y,
(or more generally π: X→ 2Y), which computes the most likely hidden state given a visible state.
These functions are not necessarily injective nor surjective. For a visible state x, the conditional
distribution on the hidden states is a product distribution p(y|X = x) = 1
Z exp(⟨ΘA(X)
x ,A(Y)
y ⟩)
which is maximized at the state yfor which ΘA(X)
x ∈Ry. The preimages of the cones Ry by the
map Θ partition the input spaceRdX and are called inference regions. See Figure 3 and Example 10.
Definition 9. A Y-slicing of a finite set Z⊂ RdX is a partition of Zinto the preimages of the cones
Ry, y ∈Y by a linear map Θ: RdX →RdY. We assume that Θ is generic, such that it maps each
element of Zinto the interior of some Ry.
For example, when Y= {0,1}, the fan FY consists of a hyperplane and the two closed half-
spaces defined by that hyperplane. A Y-slicing is in this case a standard slicing by a hyperplane.
Example 10. Let X = {0,1,2}×{ 0,1}and Y = {0,1}4. The maximal cones Ry, y ∈Y of
the normal fan of the 4-cube with vertices {0,1}4 are the closed orthants of R4. The 6 vertices
{A(X)
x : x ∈ X}of the prism ∆({0,1,2}) ×∆({0,1}) can be mapped into 6 distinct orthants
8
DISCRETE RESTRICTED BOLTZMANN MACHINES
of R4, each orthant with an even number of positive coordinates:
3 −2 −2 −2
1 2 −2 −2
1 −2 −2 2
1 −2 2 −2
Θ
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
A(X)
=
−1 −1 1 1 1 3
1 1 3 −1 −1 1
−3 1 −1 −1 3 1
1 −3 −1 3 −1 1
. (12)
Even in the case of one single hidden unit the slicings can be complex, but the following simple
type of slicing is always available.
Proposition 11. Any slicing by k−1 parallel hyperplanes is a {1,2,...,k }-slicing.
Proof. We show that there is a line L= {λr−b: λ ∈R}, r,b ∈Rk intersecting all cells of FY,
Y= {1,...,k }. We need to show that there is a choice of rand bsuch that for every y∈Y the set
Iy ⊆R of all λwith ⟨λr−b,(ey −ez)⟩>0 for all z∈Y\{ y}has a non-empty interior. Now, Iy
is the set of λwith
λ(ry −rz) >by −bz for all z̸= y. (13)
Choosing b1 < ··· < bk and ry = f(by), where f is a strictly increasing and strictly concave
function, we get I1 = (−∞,b2−b1
r2−r1
), Iy = ( by−by−1
ry−ry−1
,by+1−by
ry+1−ry ) for y = 2,3,...,k −1, and Ik =
(bk−bk−1
rk−rk−1
,∞). The lengths ∞,l2,...,l k−1,∞of the intervals I1,...,I k can be adjusted arbitrarily
by choosing suitable differences rj+1 −rj for all j = 1,...,k −1.
Strong modes
Recall the definition of strong modes given in page 4.
Lemma 12. Let C⊆X be a set of arrays which are pairwise different in at least two entries (a
code of minimum distance two).
•If RBMX,Y contains a probability distribution with strong modes C, then there is a linear
map Θ of {A(Y)
y : y ∈Y} into the C-cells of FX (the cones Rx above the codewords x∈C)
sending at least one vertex into each cell.
•If there is a linear mapΘ of {A(Y)
y : y∈Y} into the C-cells of FX, with maxx{⟨Θ⊤A(Y)
y ,A(X)
x ⟩}=
cfor all y∈Y, then RBMX,Ycontains a probability distribution with strong modes C.
Proof. This is by Proposition 8 and Lemma 4.
A simple consequence of the previous lemma is that if the model RBMX,Y is a universal ap-
proximator of distributions on X, then necessarily the number of hidden states is at least as large as
the maximum code of visible states of minimum distance two,|Y|≥ AX(2). Hence discrete RBMs
may not be universal approximators even when their parameter count surpasses the dimension of
the ambient probability simplex.
Example 13. Let X= {0,1,2}nand Y= {0,1,..., 4}m. In this case AX(2) = 3n−1. If RBMX,Y
is a universal approximator with n= 3 and n= 4, then m≥2 and m≥3, respectively, although
the smallest mfor which RBMX,Yhas 3n −1 parameters is m= 1 and m= 2, respectively.
Using Lemma 12 and the analysis of [Mont´ufar and Morton, 2012] gives the following.
Proposition 14. If 4⌈m/3⌉≤ n, then RBMX,Ycontains distributions with 2m strong modes.
9
MONT ´UFAR AND MORTON
5 Representational power and approximation errors
In this section we describe submodels of discrete RBMs and use them to provide bounds on the
model approximation errors depending on the number of units and their state spaces. Universal
approximation results follow as special cases with vanishing approximation error.
Theorem 15. The model RBMX,Ycan approximate the following arbitrarily well:
•Any mixture of dY= 1 + ∑m
j=1(|Yj|−1) product distributions with disjoint supports.
•When dY ≥(∏
i∈[k] |Xi|)/maxj∈[k] |Xj|for some k ≤n, any distribution from the model P
of distributions with constant value on each block {x1}×···×{ xk}×Xk+1 ×···×X n for
all xi ∈Xi, for all i∈[k].
•Any probability distribution with support contained in the union ofdYsets of the form {x1}×
···×{ xk−1}×Xk ×{xk+1}×···×{ xn}.
Proof. By Proposition 7 the model RBMX,Y contains any Hadamard product p(1) ◦···◦ p(m)
with mixtures of products as factors, p(j) ∈ MX,|Yj| for all j ∈[m]. In particular, it contains
p= p(0) ◦(1 + ˜λ1 ˜p(1)) ◦···◦ (1 + ˜λm˜p(m)), where p(0) ∈EX, ˜p(j) ∈MX,|Yj|−1, and ˜λj ∈R+.
Choosing the factors ˜p(j) with pairwise disjoint supports shows thatp= ∑m
j=0 λjp(j), whereby p(0)
can be any product distribution and p(j) can be any distribution from MX,|Yj|−1 for all j ∈[m], as
long as supp(p(j)) ∩supp(p(j′)) for all j ̸= j′. This proves the first item.
For the second item: Any point in the set Pis a mixture of uniform distributions supported
on the disjoint blocks {x1}×···×{ xk}×X k+1 ×···×X n for all (x1,...,x k) ∈X1 ×···×
Xk. Each of these uniform distributions is a product distribution, since it factorizes as px1,...,xk =∏
i∈[k] δxi
∏
i∈[n]\[k] ui, where ui denotes the uniform distribution on Xi. For any j ∈ [k] any
mixture ∑
xj∈Xj λxj px1,...,xk is also a product distribution, since it factorizes as
( ∑
xj∈Xj
λxj δxj
) ∏
i∈[k]\{j}
δxi
∏
i∈[n]\[k]
ui. (14)
Hence any distribution from the set Pis a mixture of (∏
i∈[k] |Xi|)/maxj∈[k] |Xj|product distribu-
tions with disjoint supports. The claim now follows from the first item.
For the third item: The modelEXcontains any distribution with support of the form{x1}×···×
{xk−1}×Xk ×{xk+1}×···×{ xn}. Hence, by the first item, the RBM model can approximate
any distribution arbitrarily well whose support can be covered by dYsets of that form.
We now analyse the RBM model approximation errors. Let pand qbe two probability distribu-
tions on X. The Kullback-Leibler divergence frompto qis defined as D(p∥q) := ∑
x∈Xp(x) log p(x)
q(x)
when supp(p) ⊆ supp(q) and D(p∥q) := ∞otherwise. The divergence from p to a model
M ⊆∆(X) is defined as D(p∥M) := inf q∈MD(p∥q) and the maximal approximation error
of Mis supp∈∆(X) D(p∥M).
The maximal approximation error of the independence modelEXsatisfies supp∈∆(X) D(p∥EX) ≤
|X|/maxi∈[n] |Xi|, with equality when all units have the same number of states [see Ay and Knauf,
2006, Corollary 4.10].
10
DISCRETE RESTRICTED BOLTZMANN MACHINES
0 100 200 300 400 500
100
200
300
400
500
0 100 200 300 400 500
100
200
300
400
500
0.5
1
1.5
2
2.5
x 10
7
82
84
86
88
90
92
94
96
98
k
m
Maximal-error bound
k
m
Nr. parameters
Figure 4: Illustration of Theorem 16. The left panel shows a heat map of the upper bound on the
Kullback-Leibler approximation errors of discrete RBMs with 100 visible binary units and the right
panel shows a map of the total number of model parameters, both depending on the number of
hidden units mand their possible states k= |Yj|for all j ∈[m].
Theorem 16. If ∏
i∈[n]\Λ |Xi|≤ 1 +∑
j∈[m](|Yj|−1) = dYfor some Λ ⊆[n], then the Kullback-
Leibler divergence from any distribution pon Xto the model RBMX,Yis bounded by
D(p∥RBMX,Y) ≤log
∏
i∈Λ |Xi|
maxi∈Λ |Xi|.
In particular, the model RBMX,Yis a universal approximator whenever dY≥|X|/maxi∈[n] |Xi|.
Proof. The submodel Pof RBMX,Y described in the second item of Theorem 15 is a partition
model. The maximal divergence from such a model is equal to the logarithm of the cardinality of
the largest block with constant values [see Mat ´uˇs and Ay, 2003]. Thus maxpD(p∥RBMX,Y) ≤
maxpD(p∥P) = log
(
(∏
i∈Λ |Xi|)/maxi∈Λ |Xi|
)
, as was claimed.
Theorem 16 shows that, on a large scale, the maximal model approximation error ofRBMX,Yis
smaller than that of the independence model EXby at least log(1 +∑
j∈[m](|Yj|−1)), or vanishes.
The theorem is illustrated in Figure 4. The line k = 2 shows bounds on the approximation error of
binary RBMs with mhidden units, previously treated in [Mont ´ufar et al., 2011, Theorem 5.1], and
the line m= 1 shows bounds for na¨ıve Bayes models withkhidden classes.
6 Dimension
In this section we study the dimension of the model RBMX,Y. One reason RBMs are attractive is
that they have a large learning capacity, e.g. may be built with millions of parameters. Dimension
calculations show whether those parameters are wasted, or translate into higher-dimensional spaces
of representable distributions. Our analysis builds on previous work by Cueto, Morton, and Sturm-
fels [2010], where binary RBMs are treated. The idea is to bound the dimension from below by
the dimension of a related max-plus model, called the tropical RBM model [Pachter and Sturmfels,
2004], and from above by the dimension expected from counting parameters.
11
MONT ´UFAR AND MORTON
The dimension of a discrete RBM model can be bounded from above not only by its expected
dimension, but also by a function of the dimension of its Hadamard factors:
Proposition 17. The dimension of RBMX,Yis bounded as
dim(RBMX,Y) ≤dim(MX,|Yi|) +
∑
j∈[m]\{i}
dim(MX,|Yj|−1) + (m−1) for all i∈[m]. (15)
Proof. Let udenote the uniform distribution. Note thatEX◦EX = EXand also EX◦MX,k = MX,k.
This observation, together with Proposition 7, shows that the RBM model can be factorized as
RBMX,Y= (MX,|Y1|) ◦(λ1u+ (1 −λ1)MX,|Y1|) ◦···◦ (λmu+ (1 −λm)MX,|Ym|−1),
from which the claim follows.
By the previous proposition, the model RBMX,Y can have the expected dimension only if (i)
the right hand side of eq. (15) equals |X|− 1, or (ii) each mixture model MX,k has the expected
dimension for allk≤maxj∈[m] |Yj|. Sometimes none of both conditions is satisfied and the models
‘waste’ parameters:
Example 18. The k-mixture of the independence model on X1 ×X2 is a subset of the set of
|X1|×|X 2|matrices with non-negative entries and rank at most k. It is known that the set of
M ×N matrices of rank at most k has dimension k(M + N −k) for all 1 ≤k <min{M,N }.
Hence the model MX1×X2,k has dimension smaller than its parameter count whenever 1 < k <
min{|X1|,|X2|}. By Proposition 17 if (∑
j∈[m](|Yj|−1) + 1)(|X1|+ |X2|−1) ≤|X1 ×X2|and
1 < |Yj|≤ min{|X1|,|X2|}for some j ∈[m], then RBMX1×X2,Y does not have the expected
dimension.
The next theorem indicates choices of Xand Yfor which the model RBMX,Yhas the expected
dimension. Given a sufficient statistics matrix A(X), we say that a set Z⊆X has full rank when
the matrix with columns {A(X)
x : x∈Z} has full rank.
Theorem 19. When Xcontains mdisjoint Hamming balls of radii 2(|Yj|−1) −1, j ∈[m] and
the subset of Xnot intersected by these balls has full rank, then the model RBMX,Yhas dimension
equal to the number of model parameters,
dim(RBMX,Y) = (1 +
∑
i∈[n]
(|Xi|−1))(1 +
∑
j∈[m]
(|Yj|−1)) −1.
On the other hand, if mHamming balls of radius one cover X, then
dim(RBMX,Y) = |X|− 1.
In order to prove this theorem we will need two main tools: slicings by normal fans of simplices,
described in Section 4, and the tropical RBM model, described in Section 7. The theorem will follow
from the analysis contained in Section 7.
12
DISCRETE RESTRICTED BOLTZMANN MACHINES
7 Tropical model
Definition 20. The tropical model RBMtropical
X,Y is the image of the tropical morphism
RdXdY ∋θ ↦→ Φ(v; θ) = max{⟨θ,A(X,Y)
(v,h) ⟩: h∈Y} for all v∈X, (16)
which evaluates log( 1
Z(θ)
∑
h∈Yexp(⟨θ,A(X,Y)
(v,h) ⟩)) for all v ∈X for each θ within the max-plus
algebra (addition becomes a+ b = max {a,b}) up to additive constants independent of v (i.e.,
disregarding the normalization factor Z(θ)).
The idea behind this definition is thatlog(exp(a)+exp(b)) ≈max{a,b}when aand bhave dif-
ferent order of magnitude. The tropical model captures important properties of the original model.
Of particular interest is following consequence of the Bieri-Groves theorem [see Draisma, 2008],
which gives us a tool to estimate the dimension of RBMX,Y:
dim(RBMtropical
X,Y ) ≤dim(RBMX,Y) ≤min{dim(EX,Y),|X|− 1}. (17)
The following Theorem 21 describes the regions of linearity of the map Φ. Each of these
regions corresponds to a collection of Yj-slicings (see Definition 9) of the set {A(X)
x : x ∈X} for
all j ∈[m]. This result allows us to express the dimension of RBMtropical
X,Y as the maximum rank of
a class of matrices defined by collections of slicings.
For each j ∈[m] let Cj = {Cj,1,...,C j,|Yj|}be a Yj-slicing of {A(X)
x : x∈X} and let ACj,k
be the |X|× dX-matrix with x-th row equal to (A(X)
x )⊤when x∈Cj,k and equal to a row of zeros
otherwise. Let ACj = (ACj,1 |···| ACj,|Yj|) ∈R|X|×|Yj|dX and d= ∑
j∈[m] |Yj|dX.
Theorem 21. On each region of linearity, the tropical morphism Φ is the linear map Rd →
RBMtropical
X,Y represented by the |X|× d-matrix
A= (AC1 |···| ACm),
modulo constant functions. In particular, dim(RBMtropical
X,Y ) + 1 is the maximum rank of Aover all
possible collections of slicings C1,...,C m.
Proof. Again use the homogeneous version of the matrix A(X,Y) as in the proof of Proposition
7; this will not affect the rank of A. Let θhj = ( θ{j,i},(hj,xi))i∈[n],xi∈Xi and let Ahj denote the
submatrix of A(X,Y) containing the rows with indices {{j,i},(hj,xi): i∈[n],xi ∈Xi}. For any
given v∈X we have
max
{⟨
θ,A(X,Y)
(v,h)
⟩
: h∈Y
}
=
∑
j∈[m]
max
{⟨
θhj ,Ahj (v,hj)
⟩
: hj ∈Yj
}
,
from which the claim follows.
In the following we evaluate the maximum rank of the matrixAfor various choices of Xand Y
by examining good slicings. We focus on slicings by parallel hyperplanes.
Lemma 22. For any x∗∈X and 0 <k <n the affine hull of the set {A(X)
x : dH(x,x∗) = k}has
dimension ∑
i∈[n](|Xi|−1) −1.
13
MONT ´UFAR AND MORTON
Proof. Without loss of generality let x∗ = (0,..., 0). The set Zk := {A(X)
x : dH(x,x∗) = k}is
the intersection of {A(X)
x : x ∈X} with the hyperplane Hk := {z: ⟨1,z⟩= k+ 1}. Now note
that the two vertices of an edge of QX either lie in the same hyperplane Hl, or in two adjacent
parallel hyperplanes Hl and Hl+1, with l ∈N. Hence the hyperplane Hk does not slice any edges
of QX and conv(Zk) = QX ∩Hk. The set Zk is not contained in any proper face of QX and
hence conv(Zk) intersects the interior of QX. Thus dim(conv(Zk)) = dim( QX) −1, as was
claimed.
Lemma 22 implies the following.
Corollary 23. Let x ∈X , and 2k−3 ≤n. There is a slicing C1 = {C1,1,...,C 1,k}of Xby
k−1 parallel hyperplanes such that ∪k−1
l=1 C1,l = Bx(2k−3) is the Hamming ball of radius 2k−3
centered at xand the matrix AC1 = (AC1,1 |···| AC1,k−1 ) has full rank.
Recall that AX(d) denotes the maximal cardinality of a subset of X of minimum Hamming
distance at least d. When X= {0,1,...,q −1}n we write Aq(n,d). Let KX(d) denote the minimal
cardinality of a subset of Xwith covering radius d.
Proposition 24 (Binary visible units) . Let X = {0,1}n and |Yj|= sj for all j ∈[m]. If X
contains mdisjoint Hamming balls of radii 2sj −3, j ∈[m] whose complement has full rank, then
RBMtropical
X,Y has the expected dimension, min{∑
j∈[m](sj −1)(n+ 1) +n,2n −1}.
In particular, ifX= {0,1}nand Y= {0,1,...,s −1}mwith m< A2(n,d) and d= 4(s−1)−
1, then RBMX,Yhas the expected dimension. It is known that A2(n,d) ≥2n−⌈log2(∑d−2
j=0 (n−1
j ))⌉.
Proposition 25 (Binary hidden units). Let Y= {0,1}m and Xbe arbitrary.
•If m+ 1 ≤AX(3), then RBMtropical
X,{0,1}m has dimension (1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If m+ 1 ≥KX(1), then RBMtropical
X,{0,1}m has dimension |X|− 1.
Let Y= {0,1}m and X= {0,1,...,q −1}n, where qis a prime power.
•If m+ 1 ≤qn−⌈logq(1+(n−1)(q−1)+1)⌉, then RBMtropical
X,Y has dimension
(1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If n = ( qr −1)/(q−1) for some r ≥2, then AX(3) = KX(1), and RBMtropical
X,Y has the
expected dimension for any m.
In particular, when all units are binary andm< 2n−⌈log2(n+1)⌉, then RBMX,Yhas the expected
dimension; this was shown in [Cueto et al., 2010].
Proposition 26 (Arbitrary sized units). If Xcontains mdisjoint Hamming balls of radii 2|Y1|−
3,..., 2|Ym|−3, and the complement of their union has full rank, thenRBMtropical
X,Y has the expected
dimension.
14
DISCRETE RESTRICTED BOLTZMANN MACHINES
Proof. Propositions 24, 25, and 26 follow from Theorem 21 and Corollary 23 together with the
following explicit bounds on A by [Gilbert, 1952, Varshamov, 1957]:
Aq(n,d) ≥ qn
∑d−1
j=0
(n
j
)
(q−1)j.
If qis a prime power, thenAq(n,d) ≥qk, where kis the largest integer withqk < qn
∑d−2
j=0 (n−1
j )(q−1)j .
In particular, A2(n,3) ≥2k, where k is the largest integer with 2k < 2n
(n−1)+1 = 2n−log2(n), i.e.,
k= n−⌈log2(n+ 1)⌉.
Example 27. Many results in coding theory can now be translated directly to statements about
the dimension of discrete RBMs. Here is an example. Let X = {1,2,...,s }×{ 1,2,...,s }×
{1,2,...,t }, s ≤t. The minimum cardinality of a code C ⊆X with covering-radius one equals
KX(1) = s2 −
⌊
(3s−t)2
8
⌋
if t ≤3s, and KX(1) = s2 otherwise [see Cohen et al., 2005, Theo-
rem 3.7.4]. Hence RBMtropical
X,{0,1}m has dimension |X|−1 when m+ 1 ≥s2 −
⌊
(3s−t)2
8
⌋
and t≤3s,
and when m+ 1 ≥s2 and t> 3s.
8 Discussion
In this note we study the representational power of RBMs with discrete units. Our results generalize
a diversity of previously known results for standard binary RBMs and na ¨ıve Bayes models. They
help contrasting the geometric-combinatorial properties of distributed products of experts versus
non-distributed mixtures of experts.
We estimate the number of hidden units for which discrete RBM models can approximate any
distribution to any desired accuracy, depending on the cardinalities of their units’ state spaces. This
analysis shows that the maximal approximation error increases at most logarithmically with the
total number of visible states and decreases at least logarithmically with the sum of the number of
states of the hidden units. This observation could be helpful, for example, in designing a penalty
term to allow comparison of models with differing numbers of units. It is worth mentioning that the
submodels of discrete RBMs described in Theorem 15 can be used not only to estimate the maximal
model approximation errors, but also the expected model approximation errors given a prior of target
distributions on the probability simplex. See [Mont ´ufar and Rauh, 2012] for an exact analysis of
Dirichlet priors. In future work it would be interesting to study the statistical approximation errors
of discrete RBMs and to complement the theory by an empirical evaluation.
The combinatorics of tropical discrete RBMs allows us to relate the dimension of discrete RBM
models to the solutions of linear optimization problems and slicings of convex support polytopes by
normal fans of simplices. We use this to show that the modelRBMX,Yhas the expected dimension
for many choices of Xand Y, but not for all choices. We based our explicit computations of the
dimension of RBMs on slicings by collections of parallel hyperplanes, but more general classes of
slicings may be considered. The same tools presented in this paper can be used to estimate the
dimension of a general class of models involving interactions within layers, defined as Kronecker
products of hierarchical models [see Mont ´ufar and Morton, 2013]. We think that the geometric-
combinatorial picture of discrete RBMs developed in this paper may be helpful in solving various
long standing theoretical problems in the future, for example: What is the exact dimension of na¨ıve
15
MONT ´UFAR AND MORTON
Bayes models with general discrete variables? What is the smallest number of hidden variables that
make an RBM a universal approximator? Do binary RBMs always have the expected dimension?
Acknowledgments
We are grateful to the ICLR 2013 community for very valuable comments. This work was accom-
plished in part at the Max Planck Institute for Mathematics in the Sciences. This work is supported
in part by DARPA grant FA8650-11-1-7145.
References
M. Aoyagi. Stochastic complexity and generalization error of a Restricted Boltzmann Machine in
Bayesian estimation. J. Mach. Learn. Res., 99:1243–1272, August 2010.
N. Ay and A. Knauf. Maximizing multi-information. Kybernetika, 42(5):517–538, 2006.
Y . Bengio. Learning deep architectures for AI.Found. Trends Mach. Learn., 2(1):1–127, 2009.
Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks.
In B. Sch ¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing
Systems 19, pages 153–160. MIT Press, Cambridge, MA, 2007.
M. A. Carreira-Perpi ˜nan and G. E. Hinton. On contrastive divergence learning. In Proceedings of
the 10-th Interantional Workshop on Artificial Intelligence and Statistics, 2005.
M. V . Catalisano, A. V . Geramita, and A. Gimigliano. Secant varieties ofP1 ×···× P1 (n-times)
are not defective for n≥5. J. Algebraic Geometry, 20:295–327, 2011.
G. Cohen, I. Honkala, S. Litsyn, and A. Lobstein. Covering Codes. North-Holland Mathematical
Library. Elsevier Science, 2005.
M. A. Cueto, J. Morton, and B. Sturmfels. Geometry of the restricted Boltzmann machine. In
M. Viana and H. Wynn, editors, Algebraic methods in statistics and probability II, AMS Special
Session, volume 2. American Mathematical Society, 2010.
G. E. Dahl, R. P. Adams, and H. Larochelle. Training restricted Boltzmann machines on word
observations. arXiv:1202.5695, 2012.
A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological) , 39(1):1–38,
1977.
J. Draisma. A tropical approach to secant dimensions. J. Pure Appl. Algebra , 212(2):349–363,
2008.
Y . Freund and D. Haussler. Unsupervised learning of distributions of binary vectors using 2-layer
networks. In J. E. Moody, S. J. Hanson, and R. Lippmann, editors, Advances in Neural Informa-
tion Processing Systems 4, pages 912–919. Morgan Kaufmann, 1991.
16
DISCRETE RESTRICTED BOLTZMANN MACHINES
E. N. Gilbert. A comparison of signalling alphabets. Bell System Technical Journal, 31:504–522,
1952.
G. E. Hinton. Products of experts. In Proceedings 9-th ICANN, volume 1, pages 1–6, 1999.
G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Compu-
tation, 14:1771–1800, 2002.
G. E. Hinton. A practical guide to training restricted Boltzmann machines, version 1. Technical
report, UTML2010-003, University of Toronto, 2010.
G. E. Hinton, S. Osindero, and Y . Teh. A fast learning algorithm for deep belief nets. Neural
Computation, 18:1527–1554, 2006.
N. Le Roux and Y . Bengio. Representational power of restricted Boltzmann machines and deep
belief networks. Neural Computation, 20(6):1631–1649, 2008.
P. M. Long and R. A. Servedio. Restricted Boltzmann machines are hard to approximately evaluate
or simulate. In J. F ¨urnkranz and T. Joachims, editors, Proceedings of the 27th International
Conference on Machine Learning (ICML-10), pages 703–710. Omnipress, 2010.
D. Lowd and P. Domingos. Naive Bayes models for probability estimation. In Proceedings of the
22nd International Conference on Machine Learning, pages 529–536. ACM Press, 2005.
T. K. Marks and J. R. Movellan. Diffusion networks, products of experts, and factor analysis. In
Proc. 3rd Int. Conf. Independent Component Anal. Signal Separation, pages 481–485, 2001.
F. Mat´uˇs and N. Ay. On maximization of the information divergence from an exponential family. In
Proceedings of the WUPES’03, pages 199–204. University of Economics, Prague, 2003.
R. Memisevic and G. E. Hinton. Learning to represent spatial transformations with factored higher-
order Boltzmann machines. Neural Computation, 22(6):1473–1492, June 2010.
G. Mont´ufar. Mixture decompositions of exponential families using a decomposition of their sample
spaces. Kybernetika, 49(1), 2013.
G. Mont ´ufar and N. Ay. Refinements of universal approximation results for deep belief networks
and restricted Boltzmann machines. Neural Computation, 23(5):1306–1319, 2011.
G. Mont ´ufar and J. Morton. When does a mixture of products contain a product of mixtures?
http://arxiv.org/abs/1206.0387, 2012.
G. Mont´ufar and J. Morton. Geometry of hierarchical models on hidden-visible products of simpli-
cial complexes. 2013. In preparation.
G. Mont´ufar and J. Rauh. Scaling of model approximation errors and expected entropy distances.
In Proc. of the 9th Workshop on Uncertainty Processing (WUPES 2012), pages 137–148, 2012.
Preprint available at http://arxiv.org/abs/1207.3399.
G. Mont ´ufar, J. Rauh, and N. Ay. Expressive power and approximation errors of restricted Boltz-
mann machines. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. C. N. Pereira, and K. Q. Weinberger,
editors, Advances in Neural Information Processing Systems 24, pages 415–423, 2011.
17
MONT ´UFAR AND MORTON
S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of Markov random
fields. In J. C. Platt, D. Koller, Y . Singer, and S. Roweis, editors,Advances in Neural Information
Processing Systems 20, pages 1121–1128. MIT Press, Cambridge, MA, 2008.
L. Pachter and B. Sturmfels. Tropical geometry of statistical models. Proceedings of the National
Academy of Sciences of the United States of America, 101(46):16132–16137, Nov. 2004.
M. Ranzato, A. Krizhevsky, and G. E. Hinton. Factored 3-Way Restricted Boltzmann Machines For
Modeling Natural Images. In Proc. Thirteenth International Conference on Artificial Intelligence
and Statistics (AISTATS), pages 621–628, 2010.
W. E. Roth. On direct product matrices. Bulletin of the American Mathematical Society , 40:461–
468, 1934.
R. Salakhutdinov, A. Mnih, and G. E. Hinton. Restricted Boltzmann machines for collaborative
filtering. In Proceedings of the 24th International Conference on Machine Learning, pages 791–
798, 2007.
T. J. Sejnowski. Higher-order Boltzmann machines. In Neural Networks for Computing , pages
398–403. American Institute of Physics, 1986.
P. Smolensky. Information processing in dynamical systems: foundations of harmony theory. In
Symposium on Parallel and Distributed Processing, 1986.
T. Tran, D. Phung, and S. Venkatesh. Mixed-variate restricted Boltzmann machines. InProc. of 3rd
Asian Conference on Machine Learning (ACML), pages 213–229, 2011.
R. R. Varshamov. Estimate of the number of signals in error correcting codes.Doklady Akad. Nauk
SSSR, 117:739–741, 1957.
M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application
to information retrieval. In L. K. Saul, Y . Weiss, and L. Bottou, editors, Advances in Neural
Information Processing Systems 17, pages 1481–1488. MIT Press, Cambridge, MA, 2005.
18
|
Guido F. Montufar, Jason Morton
|
Unknown
| 2,013
|
{"id": "ttxM6DQKghdOi", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358411400000, "tmdate": 1358411400000, "ddate": null, "number": 59, "content": {"title": "Discrete Restricted Boltzmann Machines", "decision": "conferenceOral-iclr2013-conference", "abstract": "In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code", "pdf": "https://arxiv.org/abs/1301.3529", "paperhash": "montufar|discrete_restricted_boltzmann_machines", "keywords": [], "conflicts": [], "authors": ["Guido F. Montufar", "Jason Morton"], "authorids": ["guidomontufar@googlemail.com", "jason.morton@gmail.com"]}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["guidomontufar@googlemail.com"], "writers": []}
|
[Review]:
This paper reviews properties of the Naive Bayes models and Binary RBMs before moving on to introducing discrete RBMs for which they extend universal approximation and other properties.
I think such a review and extensions are extremely interesting for the more theoretical fields such as algebraical geometry. As it is, the paper does not cater to a machine learning crowd as it's mostly a sequence of mathematical definitions and theorems statements. I advise the authors to either:
- submit it to an algebraic geometry venue
- give as many intuitions as possible to help the reader get a full grasp on the results presented.
For the latter point, I advise against using sentences such as 'In algebraic geometrical terms this is a Hadamard product of a collection of secant varieties of the Segre embedding of the product of a collection of projective spaces'. Though it sounds incredibly intelligent, I didn't get anything from it, despite my fair knowledge of RBMs.
This work of explaining the results is done fairly well in the Results section, especially for the universal approximation property and the approximation error. This is a good target for the review part of the paper.
|
anonymous reviewer fce0
| null | null |
{"id": "AAvOd8oYsZAh8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362487980000, "tmdate": 1362487980000, "ddate": null, "number": 4, "content": {"title": "review of Discrete Restricted Boltzmann Machines", "review": "This paper reviews properties of the Naive Bayes models and Binary RBMs before moving on to introducing discrete RBMs for which they extend universal approximation and other properties.\r\n\r\nI think such a review and extensions are extremely interesting for the more theoretical fields such as algebraical geometry. As it is, the paper does not cater to a machine learning crowd as it's mostly a sequence of mathematical definitions and theorems statements. I advise the authors to either:\r\n- submit it to an algebraic geometry venue\r\n- give as many intuitions as possible to help the reader get a full grasp on the results presented.\r\n\r\nFor the latter point, I advise against using sentences such as 'In algebraic geometrical terms this is a Hadamard product of a collection of secant varieties of the Segre embedding of the product of a collection of projective spaces'. Though it sounds incredibly intelligent, I didn't get anything from it, despite my fair knowledge of RBMs.\r\n\r\nThis work of explaining the results is done fairly well in the Results section, especially for the universal approximation property and the approximation error. This is a good target for the review part of the paper."}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttxM6DQKghdOi", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer fce0"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 1,
"importance_and_relevance": 2,
"materials_and_methods": 1,
"praise": 3,
"presentation_and_reporting": 2,
"results_and_discussion": 2,
"suggestion_and_solution": 2,
"total": 8
}
| 1.875
| 1.480439
| 0.394561
| 1.884088
| 0.160046
| 0.009088
| 0.25
| 0.125
| 0.25
| 0.125
| 0.375
| 0.25
| 0.25
| 0.25
|
{
"criticism": 0.25,
"example": 0.125,
"importance_and_relevance": 0.25,
"materials_and_methods": 0.125,
"praise": 0.375,
"presentation_and_reporting": 0.25,
"results_and_discussion": 0.25,
"suggestion_and_solution": 0.25
}
| 1.875
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttxM6DQKghdOi
|
Discrete Restricted Boltzmann Machines
|
In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code
|
Discrete Restricted Boltzmann Machines
Guido Mont´ufar GFM 10@ PSU .EDU
Jason Morton MORTON @MATH .PSU .EDU
Department of Mathematics
Pennsylvania State University
University Park, PA 16802, USA
Abstract
We describe discrete restricted Boltzmann machines: probabilistic graphical models with bipar-
tite interactions between visible and hidden discrete variables. Examples are binary restricted
Boltzmann machines and discrete na ¨ıve Bayes models. We detail the inference functions and
distributed representations arising in these models in terms of configurations of projected prod-
ucts of simplices and normal fans of products of simplices. We bound the number of hidden
variables, depending on the cardinalities of their state spaces, for which these models can ap-
proximate any probability distribution on their visible states to any given accuracy. In addition,
we use algebraic methods and coding theory to compute their dimension.
Keywords: Restricted Boltzmann Machine, Na¨ıve Bayes Model, Representational Power, Dis-
tributed Representation, Expected Dimension
1 Introduction
A restricted Boltzmann machine (RBM) is a probabilistic graphical model with bipartite interactions
between an observed set and a hidden set of units [see Smolensky, 1986, Freund and Haussler,
1991, Hinton, 2002, 2010]. A characterizing property of these models is that the observed units
are independent given the states of the hidden units and vice versa. This is a consequence of the
bipartiteness of the interaction graph and does not depend on the units’ state spaces. Typically
RBMs are defined with binary units, but other types of units have also been considered, including
continuous, discrete, and mixed type units [see Welling et al., 2005, Marks and Movellan, 2001,
Salakhutdinov et al., 2007, Dahl et al., 2012, Tran et al., 2011]. We study discrete RBMs, also called
multinomial or softmax RBMs, which are special types of exponential family harmoniums [Welling
et al., 2005]. While each unit Xi of a binary RBM has the state space {0,1}, the state space of
each unit Xi of a discrete RBM is a finite set Xi = {0,1,...,r i −1}. Like binary RBMs, discrete
RBMs can be trained using contrastive divergence (CD) [Hinton, 1999, 2002, Carreira-Perpi˜nan and
Hinton, 2005] or expectation-maximization (EM) [Dempster et al., 1977] and can be used to train
the parameters of deep systems layer by layer [Hinton et al., 2006, Bengio et al., 2007].
Non-binary visible units are natural because they can directly encode non-binary features. The
situation with hidden units is more subtle. States that appear in different hidden units can be acti-
1
arXiv:1301.3529v4 [stat.ML] 22 Apr 2014
MONT ´UFAR AND MORTON
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
2 2 2 2
2 2 2 2
⊆
2 2 2 2
2 2 2 2
⊆
8 2
2 2 2 2
⊆
16
2 2 2 2
24 40 79
Figure 1: Examples of probability models treated in this paper, in the special case of binary visible
variables. The light (dark) nodes represent visible (hidden) variables with the indicated number of
states. The total parameter count of each model is indicated at the top. From left to right: a binary
RBM; a discrete RBM with one 8-valued and one binary hidden units; and a binary na ¨ıve Bayes
model with 16 hidden classes.
vated by the same visible vector, but states that appear in the same hidden unit are mutually exclu-
sive. Non-binary hidden units thus allow one to explicitly represent complex exclusive relationships.
For example, a discrete RBM topic model would allow some topics to be mutually exclusive and
other topics to be mixed together freely. This provides a better match to the semantics of several
learning problems, although the learnability of such representations is mostly open. The practical
need to represent mutually exclusive properties is evidenced by the common approach of adding
activation sparsity parameters to binary RBM hidden states, which artificially create mutually ex-
clusive non-binary states by penalizing models which have more than a certain percentage of hidden
units active.
A discrete RBM is a product of experts [Hinton, 1999]; each hidden unit represents an expert
which is a mixture model of product distributions, or na¨ıve Bayes model. Hence discrete RBMs cap-
ture both na¨ıve Bayes models and binary RBMs, and interpolate between non-distributed mixture
representations and distributed mixture representations [Bengio, 2009, Mont´ufar and Morton, 2012].
See Figure 1. Na¨ıve Bayes models have been studied across many disciplines. In machine learning
they are most commonly used for classification and clustering, but have also been considered for
probabilistic modelling [Lowd and Domingos, 2005, Mont ´ufar, 2013]. Theoretical work on binary
RBM models includes results on universal approximation [Freund and Haussler, 1991, Le Roux
and Bengio, 2008, Mont ´ufar and Ay, 2011], dimension and parameter identifiability [Cueto et al.,
2010], Bayesian learning coefficients [Aoyagi, 2010], complexity [Long and Servedio, 2010], and
approximation errors [Mont´ufar et al., 2011]. In this paper we generalize some of these theoretical
results to discrete RBMs.
Probability models with more general interactions than strictly bipartite have also been consid-
ered, including semi-restricted Boltzmann machines and higher-order interaction Boltzmann ma-
chines [see Sejnowski, 1986, Memisevic and Hinton, 2010, Osindero and Hinton, 2008, Ranzato
et al., 2010]. The techniques that we develop in this paper also serve to treat a general class of
RBM-like models allowing within-layer interactions, a generalization that will be carried out in a
forthcoming work [Mont´ufar and Morton, 2013].
Section 2 collects basic facts about independence models, na ¨ıve Bayes models, and binary
RBMs, including an overview on the aforementioned theoretical results. Section 3 defines discrete
RBMs formally and describes them as (i) products of mixtures of product distributions (Proposi-
tion 7) and (ii) as restricted mixtures of product distributions. Section 4 elaborates on distributed
representations and inference functions represented by discrete RBMs (Proposition 11, Lemma 12,
2
DISCRETE RESTRICTED BOLTZMANN MACHINES
ex1=1
ex2=1
ex3=1
ex1=1
ex1=2
ex2=1
Figure 2: The convex support of the independence model of three binary variables (left) and of a
binary-ternary pair of variables (right) discussed in Example 1.
and Proposition 14). Section 5 addresses the expressive power of discrete RBMs by describing
explicit submodels (Theorem 15) and provides results on their maximal approximation errors and
universal approximation properties (Theorem 16). Section 6 treats the dimension of discrete RBM
models (Proposition 17 and Theorem 19). Section 7 contains an algebraic-combinatorial discussion
of tropical discrete RBM models (Theorem 21) with consequences for their dimension collected in
Propositions 24, 25, and 26.
2 Preliminaries
2.1 Independence models
Consider a system of n <∞random variables X1,...,X n. Assume that Xi takes states xi in a
finite set Xi = {0,1,...,r i −1}for all i ∈{1,...,n }=: [n]. The state space of this system is
X:= X1 ×···×X n. We write xλ = (xi)i∈λ for a joint state of the variables with index i∈λfor
any λ⊆[n], and x= (x1,...,x n) for a joint state of all variables. We denote by ∆(X) the set of
all probability distributions on X. We write ⟨a,b⟩for the inner product a⊤b.
The independence model of the variables X1,...,X n is the set of product distributions p(x) =∏
i∈[n] pi(xi) for all x∈X, where pi is a probability distribution with state space Xi for all i∈[n].
This model is the closure EX (in the Euclidean topology) of the exponential family
EX :=
{ 1
Z(θ) exp(⟨θ,A(X)⟩): θ∈RdX
}
, (1)
where A(X) ∈RdX×X is a matrix of sufficient statistics; with rows equal to the indicator functions
1X and 1{x: xi=yi}for all yi ∈Xi \{0}for all i ∈[n]. The partition function Z(θ) normalizes
the distributions. The convex support of EX is the convex hull QX := conv({A(X)
x }x∈X) of the
columns of A(X), which is a Cartesian product of simplices with QX ∼= ∆(X1) ×···× ∆(Xn).
Example 1. The sufficient statistics of the independence models EX and EX′ with state spaces
3
MONT ´UFAR AND MORTON
X= {0,1}3 and X′= {0,1,2}×{0,1}are, with rows labeled by indicator functions,
A(X) =
[1
1
1
] [1
1
0
] [1
0
1
] [1
0
0
] [0
1
1
] [0
1
0
] [0
0
1
] [0
0
0
]
1 1 1 1 1 1 1 1
1 1 1 1 0 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
x3 = 1
x2 = 1
x1 = 1
A(X′) =
[1
2
] [1
1
] [1
0
] [0
2
] [0
1
] [0
0
]
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
x2 = 1
x1 = 2
x1 = 1
.
In the first case the convex support is a cube and in the second it is a prism. Both convex supports
are three-dimensional polytopes, but the prism has fewer vertices and is more similar to a simplex,
meaning that its vertex set is affinely more independent than that of the cube. See Figure 2.
2.2 Na ¨ıve Bayes models
Let k∈N. The k-mixture of the independence model, or na¨ıve Bayes modelwith khidden classes,
with visible variables X1,...,X n is the set of all probability distributions expressible as convex
combinations of kpoints in EX:
MX,k :=
{∑
i∈[k]
λip(i) : p(i) ∈EX, λi ≥0, for all i∈[k], and
∑
i∈[k]
λi = 1
}
. (2)
We write Mn,k for the k-mixture of the independence model of nbinary variables. The dimen-
sions of mixtures of binary independence models are known:
Theorem 2 (Catalisano et al. [2011]). The mixtures of binary independence models Mn,k have the
dimension expected from counting parameters,min{nk+ (k−1),2n−1}, except for M4,3, which
has dimension 13 instead of 14.
Let AX(d) denote the maximal cardinality of a subset X′⊆X of minimum Hamming distance
at least d, i.e., the maximal cardinality of a subset X′⊆X with dH(x,y) ≥dfor all distinct points
x,y ∈X′, where dH(x,y) := |{i∈[n]: xi ̸= yi}|denotes the Hamming distance betweenxand y.
The function AXis familiar in coding theory. Thek-mixtures of independence models are universal
approximators when kis large enough. This can be made precise in terms of AX(2):
Theorem 3 (Mont´ufar [2013]). The mixture model MX,k can approximate any probability distri-
bution on Xarbitrarily well if k≥|X|/maxi∈[n] |Xi|and only if k≥AX(2).
By results from [Gilbert, 1952, Varshamov, 1957], when q is a power of a prime number and
X= {0,1,...,q −1}n, then AX = qn−1. In these cases the previous theorem shows that MX,k
is a universal approximator of distributions on Xif and only if k ≥qn−1. In particular, the small-
est na¨ıve Bayes model universal approximator of distributions on {0,1}n has 2n−1(n+ 1) −1
parameters.
Some of the distributions not representable by a given na¨ıve Bayes model can be characterized
in terms of their modes. A state x∈X is a mode of a distribution p∈∆(X) if p(x) >p(y) for all
ywith dH(x,y) = 1 and it is a strong mode if p(x) >∑
y: dH(x,y)=1 p(y).
Lemma 4 (Mont´ufar and Morton [2012]). If a mixture of product distributions p = ∑
iλip(i) has
strong modes C⊆X , then there is a mixture component p(i) with mode xfor each x∈C.
4
DISCRETE RESTRICTED BOLTZMANN MACHINES
2.3 Binary restricted Boltzmann machines
The binary RBM model with nvisible and mhidden units, denoted RBMn,m, is the set of distribu-
tions on {0,1}n of the form
p(x) = 1
Z(W,B,C )
∑
h∈{0,1}m
exp(h⊤Wx + B⊤x+ C⊤h) for all x∈{0,1}n, (3)
where xdenotes states of the visible units, hdenotes states of the hidden units, W = (Wji)ji ∈
Rm×n is a matrix of interaction weights, B ∈Rn and C ∈Rm are vectors of bias weights, and
Z(W,B,C ) = ∑
x∈{0,1}n
∑
h∈{0,1}m exp(h⊤Wx + B⊤x+ C⊤h) is the normalizing partition
function.
It is known that these models have the expected dimension for many choices of nand m:
Theorem 5 (Cueto et al. [2010]). The dimension of the model RBMn,m is equal to nm+ n+ m
when m+ 1 ≤2n−⌈log2(n+1)⌉and it is equal to 2n −1 when m≥2n−⌊log2(n+1)⌋.
It is also known that with enough hidden units, binary RBMs are universal approximators:
Theorem 6 (Mont´ufar and Ay [2011]). The model RBMn,m can approximate any distribution on
{0,1}n arbitrarily well whenever m≥2n−1 −1.
A previous result by Le Roux and Bengio [2008, Theorem 2] shows thatRBMn,m is a universal
approximator wheneverm≥2n+1. It is not known whether the bounds from Theorem 6 are always
tight, but they show that for any given n, the smallest RBM universal approximator of distributions
on {0,1}n has at most 2n−1(n+ 1) −1 parameters and hence not more than the smallest na ¨ıve
Bayes model universal approximator (Theorem 3).
3 Discrete restricted Boltzmann machines
Let Xi = {0,1,...,r i−1}for all i∈[n] and Yj = {0,1,...,s j−1}for all j ∈[m]. The graphical
model with full bipartite interactions {{i,j}: i∈[n],j ∈[m]}on X×Y is the exponential family
EX,Y:=
{ 1
Z(θ) exp(⟨θ,A(X,Y)⟩): θ∈RdXdY
}
, (4)
with sufficient statistics matrix equal to the Kronecker product A(X,Y) = A(X) ⊗A(Y) of the
sufficient statistics matrices A(X) and A(Y) of the independence models EX and EY. The matrix
A(X,Y) has dXdY =
(∑
i∈[n](|Xi|−1) + 1
)(∑
j∈[m](|Yi|−1) + 1
)
linearly independent rows
and |X×Y| columns, each column corresponding to a joint state (x,y) of all variables. Disregard-
ing the entry of θ that is multiplied with the constant row of A(X,Y), which cancels out with the
normalization function Z(θ), this parametrization of EX,Y is one-to-one. In particular, this model
has dimension dim(EX,Y) = dXdY−1.
The discrete RBM model RBMX,Yis the following set of marginal distributions:
RBMX,Y:=
{
q(x) =
∑
y∈Y
p(x,y) for all x∈X : p∈EX,Y
}
. (5)
5
MONT ´UFAR AND MORTON
In the case of one single hidden unit, this model is the na¨ıve Bayes model onXwith |Y1|hidden
classes. When all units are binary, X = {0,1}n and Y= {0,1}m, this model is RBMn,m. Note
that the exponent in eq. (3) can be written as (h⊤Wx + B⊤x+ C⊤h) = ⟨θ,A(X,Y)
(x,h) ⟩, taking for θ
the column-by-column vectorization of the matrix
(0 B⊤
C W
)
.
Conditional distributions
The conditional distributions of discrete RBMs can be described in the following way. Consider a
vector θ ∈RdXdY parametrizing EX,Y, and the matrix Θ ∈RdY×dX with column-by-column vec-
torization equal toθ. A lemma by Roth [1934] shows thatθ⊤(A(X)⊗A(Y))(x,y) = (A(X)
x )⊤Θ⊤A(Y)
y
for all x∈X, y∈Y, and hence
⣨
θ,A(X,Y)
(x,y)
⟩
=
⣨
ΘA(X)
x ,A(Y)
y
⟩
=
⣨
Θ⊤A(Y)
y ,A(X)
x
⟩
∀x∈X,y ∈Y. (6)
The inner product in eq. (6) describes following probability distributions:
pθ(·,·) = 1
Z(θ) exp
(⟨
θ,A(X,Y)⟩)
, (7)
pθ(·|x) = 1
Z
(
ΘA(X)
x
)exp
(⟨
ΘA(X)
x ,A(Y)⟩)
, and (8)
pθ(·|y) = 1
Z
(
Θ⊤A(Y)
y
)exp
(⟨
Θ⊤A(Y)
y ,A(X)⟩)
. (9)
Geometrically, ΘA(X) is a linear projection of the columns of the sufficient statistics matrix A(X)
into the parameter space of EY, and similarly, Θ⊤A(Y) is a linear projection of the columns of A(Y)
into the parameter space of EX.
Polynomial parametrization
Discrete RBMs can be parametrized not only in the exponential way discussed above, but also by
simple polynomials. The exponential family EX,Ycan be parametrized by square free monomials:
p(v,h) = 1
Z
∏
{j,i}∈ [m] ×[n],
(y′
j,x′
i) ∈Yj ×Xi
(γ{j,i},(y′
j,x′
i))
δy′
j
(hj)δx′
i
(vi)
for all (v,h) ∈Y×X , (10)
where γ{j,i},(y′
j,x′
i) are positive reals. The probability distributions in RBMX,Ycan be written as
p(v) = 1
Z
∏
j∈[m]
( ∑
hj∈Yj
γ{j,1},(hj,v1) ···γ{j,n},(hj,vn)
)
for all v∈X. (11)
The parameters γ{j,i},(y′
j,x′
i) correspond to exp(θ{j,i},(y′
j,x′
i)) in the parametrization given in eq. (4).
6
DISCRETE RESTRICTED BOLTZMANN MACHINES
Products of mixtures and mixtures of products
In the following we describe discrete RBMs from two complementary perspectives: (i) as products
of experts, where each expert is a mixture of products, and (ii) as restricted mixtures of product
distributions. The renormalized entry-wise (Hadamard) product of two probability distributions p
and qon Xis defined as p◦q := (p(x)q(x))x∈X/∑
y∈Xp(y)q(y). Here we assume that pand q
have overlapping supports, such that the definition makes sense.
Proposition 7. The model RBMX,Yis a Hadamard product of mixtures of product distributions:
RBMX,Y= MX,|Y1|◦···◦M X,|Ym|.
Proof. The statement can be seen directly by considering the parametrization from eq. (11). To
make this explicit, one can use a homogeneous version of the matrix A(X,Y) which we denote by
Aand which defines the same model. Each row of Ais indexed by an edge {i,j}of the bipartite
graph and a joint state (xi,hj) of the visible and hidden units connected by this edge. Such a row
has a one in any column when these states agree with the global state, and zero otherwise. For any
j ∈[m] let Aj,: denote the matrix containing the rows of Awith indices ({i,j},(xi,hj)) for all
xi ∈Xi for all i∈[n] for all hj ∈Yj, and let A(x,h) denote the (x,h)-column of A. We have
p(x) = 1
Z
∑
h
exp(⟨θ,A(x,h)⟩)
= 1
Z
∑
h
exp(⟨θ1,:,A1,:(x,h)⟩) exp(⟨θ2,:,A2,:(x,h)⟩) ···exp(⟨θm,:,Am,:(x,h)⟩)
= 1
Z
(∑
h1
exp(⟨θ1,:,A1,:(x,h1)⟩)
)
···
(∑
hm
exp(⟨θm,:,Am,:(x,hm)⟩)
)
= 1
Z(Z1p(1)(x)) ···(Zmp(m)(x)) = 1
Z′p(1)(x) ···p(m)(x),
where p(j) ∈MX,|Yj|and Zj = ∑
x∈X
∑
hj∈Yj exp(⟨θj,:,Aj,:(x,hj)⟩) for all j ∈[m]. Since the
vectors θj,: can be chosen arbitrarily, the factors p(j) can be made arbitrary within MX,|Yj|.
Of course, every distribution in RBMX,Y is a mixture distribution p(x) = ∑
h∈Yp(x|h)q(h).
The mixture weights are given by the marginals q(h) on Yof distributions from EX,Y, and the
mixture components can be described as follows.
Proposition 8. The set of conditional distributions p(·|h), h∈Y of a distribution in EX,Yis the set
of product distributions in EX with parameters θh = Θ⊤A(Y)
h , h ∈Y equal to a linear projection
of the vertices {A(Y)
h : h∈Y} of the Cartesian product of simplices QY∼= ∆(Y1) ×···× ∆(Ym).
Proof. This is by eq. (6).
4 Products of simplices and their normal fans
Binary RBMs have been analyzed by considering each of the mhidden units as defining a hyper-
plane Hj slicing the n-cube into two regions. To generalize the results provided by this analysis, in
7
MONT ´UFAR AND MORTON
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet /Bullet
/Bullet
R0
R1
R2
0
1
2(0,0) (0,1)
(1,0) (1 ,1)
Θ−1(R2)
Θ−1(R1)
Θ−1(R0)
Figure 3: Three slicings of a square by the normal fan of a triangle with maximal conesR0, R1, and
R2, corresponding to three possible inference functions of RBM{0,1}2,{0,1,2}.
this section we replace the n-cube with a general product of simplices QX, and replace the two re-
gions defined by the hyperplane Hj by the |Yj|regions defined by the maximal cones of the normal
fan of the simplex ∆(Yj).
Subdivisions of independence models
The normal cone of a polytope Q ⊂Rd at a point x ∈Q is the set of all vectors v ∈Rd with
⟨v,(x−y)⟩≥ 0 for all y ∈Q. We denote by Rx the normal cone of the product of simplices
QX = conv{A(X)
x }x∈X at the vertex A(X)
x . The normal fan FX is the set of all normal cones of
QX. The product distributions pθ = 1
Z(θ) exp(⟨θ,A(X)⟩) ∈EX strictly maximized at x∈X, with
pθ(x) >pθ(y) for all y∈X\{ x}, are those with parameter vector θin the relative interior of Rx.
Hence the normal fan FX partitions the parameter space of the independence model into regions of
distributions with maxima at different inputs.
Inference functions and slicings
For any choice of parameters of the model RBMX,Y, there is an inference function π: X →Y,
(or more generally π: X→ 2Y), which computes the most likely hidden state given a visible state.
These functions are not necessarily injective nor surjective. For a visible state x, the conditional
distribution on the hidden states is a product distribution p(y|X = x) = 1
Z exp(⟨ΘA(X)
x ,A(Y)
y ⟩)
which is maximized at the state yfor which ΘA(X)
x ∈Ry. The preimages of the cones Ry by the
map Θ partition the input spaceRdX and are called inference regions. See Figure 3 and Example 10.
Definition 9. A Y-slicing of a finite set Z⊂ RdX is a partition of Zinto the preimages of the cones
Ry, y ∈Y by a linear map Θ: RdX →RdY. We assume that Θ is generic, such that it maps each
element of Zinto the interior of some Ry.
For example, when Y= {0,1}, the fan FY consists of a hyperplane and the two closed half-
spaces defined by that hyperplane. A Y-slicing is in this case a standard slicing by a hyperplane.
Example 10. Let X = {0,1,2}×{ 0,1}and Y = {0,1}4. The maximal cones Ry, y ∈Y of
the normal fan of the 4-cube with vertices {0,1}4 are the closed orthants of R4. The 6 vertices
{A(X)
x : x ∈ X}of the prism ∆({0,1,2}) ×∆({0,1}) can be mapped into 6 distinct orthants
8
DISCRETE RESTRICTED BOLTZMANN MACHINES
of R4, each orthant with an even number of positive coordinates:
3 −2 −2 −2
1 2 −2 −2
1 −2 −2 2
1 −2 2 −2
Θ
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
A(X)
=
−1 −1 1 1 1 3
1 1 3 −1 −1 1
−3 1 −1 −1 3 1
1 −3 −1 3 −1 1
. (12)
Even in the case of one single hidden unit the slicings can be complex, but the following simple
type of slicing is always available.
Proposition 11. Any slicing by k−1 parallel hyperplanes is a {1,2,...,k }-slicing.
Proof. We show that there is a line L= {λr−b: λ ∈R}, r,b ∈Rk intersecting all cells of FY,
Y= {1,...,k }. We need to show that there is a choice of rand bsuch that for every y∈Y the set
Iy ⊆R of all λwith ⟨λr−b,(ey −ez)⟩>0 for all z∈Y\{ y}has a non-empty interior. Now, Iy
is the set of λwith
λ(ry −rz) >by −bz for all z̸= y. (13)
Choosing b1 < ··· < bk and ry = f(by), where f is a strictly increasing and strictly concave
function, we get I1 = (−∞,b2−b1
r2−r1
), Iy = ( by−by−1
ry−ry−1
,by+1−by
ry+1−ry ) for y = 2,3,...,k −1, and Ik =
(bk−bk−1
rk−rk−1
,∞). The lengths ∞,l2,...,l k−1,∞of the intervals I1,...,I k can be adjusted arbitrarily
by choosing suitable differences rj+1 −rj for all j = 1,...,k −1.
Strong modes
Recall the definition of strong modes given in page 4.
Lemma 12. Let C⊆X be a set of arrays which are pairwise different in at least two entries (a
code of minimum distance two).
•If RBMX,Y contains a probability distribution with strong modes C, then there is a linear
map Θ of {A(Y)
y : y ∈Y} into the C-cells of FX (the cones Rx above the codewords x∈C)
sending at least one vertex into each cell.
•If there is a linear mapΘ of {A(Y)
y : y∈Y} into the C-cells of FX, with maxx{⟨Θ⊤A(Y)
y ,A(X)
x ⟩}=
cfor all y∈Y, then RBMX,Ycontains a probability distribution with strong modes C.
Proof. This is by Proposition 8 and Lemma 4.
A simple consequence of the previous lemma is that if the model RBMX,Y is a universal ap-
proximator of distributions on X, then necessarily the number of hidden states is at least as large as
the maximum code of visible states of minimum distance two,|Y|≥ AX(2). Hence discrete RBMs
may not be universal approximators even when their parameter count surpasses the dimension of
the ambient probability simplex.
Example 13. Let X= {0,1,2}nand Y= {0,1,..., 4}m. In this case AX(2) = 3n−1. If RBMX,Y
is a universal approximator with n= 3 and n= 4, then m≥2 and m≥3, respectively, although
the smallest mfor which RBMX,Yhas 3n −1 parameters is m= 1 and m= 2, respectively.
Using Lemma 12 and the analysis of [Mont´ufar and Morton, 2012] gives the following.
Proposition 14. If 4⌈m/3⌉≤ n, then RBMX,Ycontains distributions with 2m strong modes.
9
MONT ´UFAR AND MORTON
5 Representational power and approximation errors
In this section we describe submodels of discrete RBMs and use them to provide bounds on the
model approximation errors depending on the number of units and their state spaces. Universal
approximation results follow as special cases with vanishing approximation error.
Theorem 15. The model RBMX,Ycan approximate the following arbitrarily well:
•Any mixture of dY= 1 + ∑m
j=1(|Yj|−1) product distributions with disjoint supports.
•When dY ≥(∏
i∈[k] |Xi|)/maxj∈[k] |Xj|for some k ≤n, any distribution from the model P
of distributions with constant value on each block {x1}×···×{ xk}×Xk+1 ×···×X n for
all xi ∈Xi, for all i∈[k].
•Any probability distribution with support contained in the union ofdYsets of the form {x1}×
···×{ xk−1}×Xk ×{xk+1}×···×{ xn}.
Proof. By Proposition 7 the model RBMX,Y contains any Hadamard product p(1) ◦···◦ p(m)
with mixtures of products as factors, p(j) ∈ MX,|Yj| for all j ∈[m]. In particular, it contains
p= p(0) ◦(1 + ˜λ1 ˜p(1)) ◦···◦ (1 + ˜λm˜p(m)), where p(0) ∈EX, ˜p(j) ∈MX,|Yj|−1, and ˜λj ∈R+.
Choosing the factors ˜p(j) with pairwise disjoint supports shows thatp= ∑m
j=0 λjp(j), whereby p(0)
can be any product distribution and p(j) can be any distribution from MX,|Yj|−1 for all j ∈[m], as
long as supp(p(j)) ∩supp(p(j′)) for all j ̸= j′. This proves the first item.
For the second item: Any point in the set Pis a mixture of uniform distributions supported
on the disjoint blocks {x1}×···×{ xk}×X k+1 ×···×X n for all (x1,...,x k) ∈X1 ×···×
Xk. Each of these uniform distributions is a product distribution, since it factorizes as px1,...,xk =∏
i∈[k] δxi
∏
i∈[n]\[k] ui, where ui denotes the uniform distribution on Xi. For any j ∈ [k] any
mixture ∑
xj∈Xj λxj px1,...,xk is also a product distribution, since it factorizes as
( ∑
xj∈Xj
λxj δxj
) ∏
i∈[k]\{j}
δxi
∏
i∈[n]\[k]
ui. (14)
Hence any distribution from the set Pis a mixture of (∏
i∈[k] |Xi|)/maxj∈[k] |Xj|product distribu-
tions with disjoint supports. The claim now follows from the first item.
For the third item: The modelEXcontains any distribution with support of the form{x1}×···×
{xk−1}×Xk ×{xk+1}×···×{ xn}. Hence, by the first item, the RBM model can approximate
any distribution arbitrarily well whose support can be covered by dYsets of that form.
We now analyse the RBM model approximation errors. Let pand qbe two probability distribu-
tions on X. The Kullback-Leibler divergence frompto qis defined as D(p∥q) := ∑
x∈Xp(x) log p(x)
q(x)
when supp(p) ⊆ supp(q) and D(p∥q) := ∞otherwise. The divergence from p to a model
M ⊆∆(X) is defined as D(p∥M) := inf q∈MD(p∥q) and the maximal approximation error
of Mis supp∈∆(X) D(p∥M).
The maximal approximation error of the independence modelEXsatisfies supp∈∆(X) D(p∥EX) ≤
|X|/maxi∈[n] |Xi|, with equality when all units have the same number of states [see Ay and Knauf,
2006, Corollary 4.10].
10
DISCRETE RESTRICTED BOLTZMANN MACHINES
0 100 200 300 400 500
100
200
300
400
500
0 100 200 300 400 500
100
200
300
400
500
0.5
1
1.5
2
2.5
x 10
7
82
84
86
88
90
92
94
96
98
k
m
Maximal-error bound
k
m
Nr. parameters
Figure 4: Illustration of Theorem 16. The left panel shows a heat map of the upper bound on the
Kullback-Leibler approximation errors of discrete RBMs with 100 visible binary units and the right
panel shows a map of the total number of model parameters, both depending on the number of
hidden units mand their possible states k= |Yj|for all j ∈[m].
Theorem 16. If ∏
i∈[n]\Λ |Xi|≤ 1 +∑
j∈[m](|Yj|−1) = dYfor some Λ ⊆[n], then the Kullback-
Leibler divergence from any distribution pon Xto the model RBMX,Yis bounded by
D(p∥RBMX,Y) ≤log
∏
i∈Λ |Xi|
maxi∈Λ |Xi|.
In particular, the model RBMX,Yis a universal approximator whenever dY≥|X|/maxi∈[n] |Xi|.
Proof. The submodel Pof RBMX,Y described in the second item of Theorem 15 is a partition
model. The maximal divergence from such a model is equal to the logarithm of the cardinality of
the largest block with constant values [see Mat ´uˇs and Ay, 2003]. Thus maxpD(p∥RBMX,Y) ≤
maxpD(p∥P) = log
(
(∏
i∈Λ |Xi|)/maxi∈Λ |Xi|
)
, as was claimed.
Theorem 16 shows that, on a large scale, the maximal model approximation error ofRBMX,Yis
smaller than that of the independence model EXby at least log(1 +∑
j∈[m](|Yj|−1)), or vanishes.
The theorem is illustrated in Figure 4. The line k = 2 shows bounds on the approximation error of
binary RBMs with mhidden units, previously treated in [Mont ´ufar et al., 2011, Theorem 5.1], and
the line m= 1 shows bounds for na¨ıve Bayes models withkhidden classes.
6 Dimension
In this section we study the dimension of the model RBMX,Y. One reason RBMs are attractive is
that they have a large learning capacity, e.g. may be built with millions of parameters. Dimension
calculations show whether those parameters are wasted, or translate into higher-dimensional spaces
of representable distributions. Our analysis builds on previous work by Cueto, Morton, and Sturm-
fels [2010], where binary RBMs are treated. The idea is to bound the dimension from below by
the dimension of a related max-plus model, called the tropical RBM model [Pachter and Sturmfels,
2004], and from above by the dimension expected from counting parameters.
11
MONT ´UFAR AND MORTON
The dimension of a discrete RBM model can be bounded from above not only by its expected
dimension, but also by a function of the dimension of its Hadamard factors:
Proposition 17. The dimension of RBMX,Yis bounded as
dim(RBMX,Y) ≤dim(MX,|Yi|) +
∑
j∈[m]\{i}
dim(MX,|Yj|−1) + (m−1) for all i∈[m]. (15)
Proof. Let udenote the uniform distribution. Note thatEX◦EX = EXand also EX◦MX,k = MX,k.
This observation, together with Proposition 7, shows that the RBM model can be factorized as
RBMX,Y= (MX,|Y1|) ◦(λ1u+ (1 −λ1)MX,|Y1|) ◦···◦ (λmu+ (1 −λm)MX,|Ym|−1),
from which the claim follows.
By the previous proposition, the model RBMX,Y can have the expected dimension only if (i)
the right hand side of eq. (15) equals |X|− 1, or (ii) each mixture model MX,k has the expected
dimension for allk≤maxj∈[m] |Yj|. Sometimes none of both conditions is satisfied and the models
‘waste’ parameters:
Example 18. The k-mixture of the independence model on X1 ×X2 is a subset of the set of
|X1|×|X 2|matrices with non-negative entries and rank at most k. It is known that the set of
M ×N matrices of rank at most k has dimension k(M + N −k) for all 1 ≤k <min{M,N }.
Hence the model MX1×X2,k has dimension smaller than its parameter count whenever 1 < k <
min{|X1|,|X2|}. By Proposition 17 if (∑
j∈[m](|Yj|−1) + 1)(|X1|+ |X2|−1) ≤|X1 ×X2|and
1 < |Yj|≤ min{|X1|,|X2|}for some j ∈[m], then RBMX1×X2,Y does not have the expected
dimension.
The next theorem indicates choices of Xand Yfor which the model RBMX,Yhas the expected
dimension. Given a sufficient statistics matrix A(X), we say that a set Z⊆X has full rank when
the matrix with columns {A(X)
x : x∈Z} has full rank.
Theorem 19. When Xcontains mdisjoint Hamming balls of radii 2(|Yj|−1) −1, j ∈[m] and
the subset of Xnot intersected by these balls has full rank, then the model RBMX,Yhas dimension
equal to the number of model parameters,
dim(RBMX,Y) = (1 +
∑
i∈[n]
(|Xi|−1))(1 +
∑
j∈[m]
(|Yj|−1)) −1.
On the other hand, if mHamming balls of radius one cover X, then
dim(RBMX,Y) = |X|− 1.
In order to prove this theorem we will need two main tools: slicings by normal fans of simplices,
described in Section 4, and the tropical RBM model, described in Section 7. The theorem will follow
from the analysis contained in Section 7.
12
DISCRETE RESTRICTED BOLTZMANN MACHINES
7 Tropical model
Definition 20. The tropical model RBMtropical
X,Y is the image of the tropical morphism
RdXdY ∋θ ↦→ Φ(v; θ) = max{⟨θ,A(X,Y)
(v,h) ⟩: h∈Y} for all v∈X, (16)
which evaluates log( 1
Z(θ)
∑
h∈Yexp(⟨θ,A(X,Y)
(v,h) ⟩)) for all v ∈X for each θ within the max-plus
algebra (addition becomes a+ b = max {a,b}) up to additive constants independent of v (i.e.,
disregarding the normalization factor Z(θ)).
The idea behind this definition is thatlog(exp(a)+exp(b)) ≈max{a,b}when aand bhave dif-
ferent order of magnitude. The tropical model captures important properties of the original model.
Of particular interest is following consequence of the Bieri-Groves theorem [see Draisma, 2008],
which gives us a tool to estimate the dimension of RBMX,Y:
dim(RBMtropical
X,Y ) ≤dim(RBMX,Y) ≤min{dim(EX,Y),|X|− 1}. (17)
The following Theorem 21 describes the regions of linearity of the map Φ. Each of these
regions corresponds to a collection of Yj-slicings (see Definition 9) of the set {A(X)
x : x ∈X} for
all j ∈[m]. This result allows us to express the dimension of RBMtropical
X,Y as the maximum rank of
a class of matrices defined by collections of slicings.
For each j ∈[m] let Cj = {Cj,1,...,C j,|Yj|}be a Yj-slicing of {A(X)
x : x∈X} and let ACj,k
be the |X|× dX-matrix with x-th row equal to (A(X)
x )⊤when x∈Cj,k and equal to a row of zeros
otherwise. Let ACj = (ACj,1 |···| ACj,|Yj|) ∈R|X|×|Yj|dX and d= ∑
j∈[m] |Yj|dX.
Theorem 21. On each region of linearity, the tropical morphism Φ is the linear map Rd →
RBMtropical
X,Y represented by the |X|× d-matrix
A= (AC1 |···| ACm),
modulo constant functions. In particular, dim(RBMtropical
X,Y ) + 1 is the maximum rank of Aover all
possible collections of slicings C1,...,C m.
Proof. Again use the homogeneous version of the matrix A(X,Y) as in the proof of Proposition
7; this will not affect the rank of A. Let θhj = ( θ{j,i},(hj,xi))i∈[n],xi∈Xi and let Ahj denote the
submatrix of A(X,Y) containing the rows with indices {{j,i},(hj,xi): i∈[n],xi ∈Xi}. For any
given v∈X we have
max
{⟨
θ,A(X,Y)
(v,h)
⟩
: h∈Y
}
=
∑
j∈[m]
max
{⟨
θhj ,Ahj (v,hj)
⟩
: hj ∈Yj
}
,
from which the claim follows.
In the following we evaluate the maximum rank of the matrixAfor various choices of Xand Y
by examining good slicings. We focus on slicings by parallel hyperplanes.
Lemma 22. For any x∗∈X and 0 <k <n the affine hull of the set {A(X)
x : dH(x,x∗) = k}has
dimension ∑
i∈[n](|Xi|−1) −1.
13
MONT ´UFAR AND MORTON
Proof. Without loss of generality let x∗ = (0,..., 0). The set Zk := {A(X)
x : dH(x,x∗) = k}is
the intersection of {A(X)
x : x ∈X} with the hyperplane Hk := {z: ⟨1,z⟩= k+ 1}. Now note
that the two vertices of an edge of QX either lie in the same hyperplane Hl, or in two adjacent
parallel hyperplanes Hl and Hl+1, with l ∈N. Hence the hyperplane Hk does not slice any edges
of QX and conv(Zk) = QX ∩Hk. The set Zk is not contained in any proper face of QX and
hence conv(Zk) intersects the interior of QX. Thus dim(conv(Zk)) = dim( QX) −1, as was
claimed.
Lemma 22 implies the following.
Corollary 23. Let x ∈X , and 2k−3 ≤n. There is a slicing C1 = {C1,1,...,C 1,k}of Xby
k−1 parallel hyperplanes such that ∪k−1
l=1 C1,l = Bx(2k−3) is the Hamming ball of radius 2k−3
centered at xand the matrix AC1 = (AC1,1 |···| AC1,k−1 ) has full rank.
Recall that AX(d) denotes the maximal cardinality of a subset of X of minimum Hamming
distance at least d. When X= {0,1,...,q −1}n we write Aq(n,d). Let KX(d) denote the minimal
cardinality of a subset of Xwith covering radius d.
Proposition 24 (Binary visible units) . Let X = {0,1}n and |Yj|= sj for all j ∈[m]. If X
contains mdisjoint Hamming balls of radii 2sj −3, j ∈[m] whose complement has full rank, then
RBMtropical
X,Y has the expected dimension, min{∑
j∈[m](sj −1)(n+ 1) +n,2n −1}.
In particular, ifX= {0,1}nand Y= {0,1,...,s −1}mwith m< A2(n,d) and d= 4(s−1)−
1, then RBMX,Yhas the expected dimension. It is known that A2(n,d) ≥2n−⌈log2(∑d−2
j=0 (n−1
j ))⌉.
Proposition 25 (Binary hidden units). Let Y= {0,1}m and Xbe arbitrary.
•If m+ 1 ≤AX(3), then RBMtropical
X,{0,1}m has dimension (1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If m+ 1 ≥KX(1), then RBMtropical
X,{0,1}m has dimension |X|− 1.
Let Y= {0,1}m and X= {0,1,...,q −1}n, where qis a prime power.
•If m+ 1 ≤qn−⌈logq(1+(n−1)(q−1)+1)⌉, then RBMtropical
X,Y has dimension
(1 + m)(1 + ∑
i∈[n](|Xi|−1)) −1.
•If n = ( qr −1)/(q−1) for some r ≥2, then AX(3) = KX(1), and RBMtropical
X,Y has the
expected dimension for any m.
In particular, when all units are binary andm< 2n−⌈log2(n+1)⌉, then RBMX,Yhas the expected
dimension; this was shown in [Cueto et al., 2010].
Proposition 26 (Arbitrary sized units). If Xcontains mdisjoint Hamming balls of radii 2|Y1|−
3,..., 2|Ym|−3, and the complement of their union has full rank, thenRBMtropical
X,Y has the expected
dimension.
14
DISCRETE RESTRICTED BOLTZMANN MACHINES
Proof. Propositions 24, 25, and 26 follow from Theorem 21 and Corollary 23 together with the
following explicit bounds on A by [Gilbert, 1952, Varshamov, 1957]:
Aq(n,d) ≥ qn
∑d−1
j=0
(n
j
)
(q−1)j.
If qis a prime power, thenAq(n,d) ≥qk, where kis the largest integer withqk < qn
∑d−2
j=0 (n−1
j )(q−1)j .
In particular, A2(n,3) ≥2k, where k is the largest integer with 2k < 2n
(n−1)+1 = 2n−log2(n), i.e.,
k= n−⌈log2(n+ 1)⌉.
Example 27. Many results in coding theory can now be translated directly to statements about
the dimension of discrete RBMs. Here is an example. Let X = {1,2,...,s }×{ 1,2,...,s }×
{1,2,...,t }, s ≤t. The minimum cardinality of a code C ⊆X with covering-radius one equals
KX(1) = s2 −
⌊
(3s−t)2
8
⌋
if t ≤3s, and KX(1) = s2 otherwise [see Cohen et al., 2005, Theo-
rem 3.7.4]. Hence RBMtropical
X,{0,1}m has dimension |X|−1 when m+ 1 ≥s2 −
⌊
(3s−t)2
8
⌋
and t≤3s,
and when m+ 1 ≥s2 and t> 3s.
8 Discussion
In this note we study the representational power of RBMs with discrete units. Our results generalize
a diversity of previously known results for standard binary RBMs and na ¨ıve Bayes models. They
help contrasting the geometric-combinatorial properties of distributed products of experts versus
non-distributed mixtures of experts.
We estimate the number of hidden units for which discrete RBM models can approximate any
distribution to any desired accuracy, depending on the cardinalities of their units’ state spaces. This
analysis shows that the maximal approximation error increases at most logarithmically with the
total number of visible states and decreases at least logarithmically with the sum of the number of
states of the hidden units. This observation could be helpful, for example, in designing a penalty
term to allow comparison of models with differing numbers of units. It is worth mentioning that the
submodels of discrete RBMs described in Theorem 15 can be used not only to estimate the maximal
model approximation errors, but also the expected model approximation errors given a prior of target
distributions on the probability simplex. See [Mont ´ufar and Rauh, 2012] for an exact analysis of
Dirichlet priors. In future work it would be interesting to study the statistical approximation errors
of discrete RBMs and to complement the theory by an empirical evaluation.
The combinatorics of tropical discrete RBMs allows us to relate the dimension of discrete RBM
models to the solutions of linear optimization problems and slicings of convex support polytopes by
normal fans of simplices. We use this to show that the modelRBMX,Yhas the expected dimension
for many choices of Xand Y, but not for all choices. We based our explicit computations of the
dimension of RBMs on slicings by collections of parallel hyperplanes, but more general classes of
slicings may be considered. The same tools presented in this paper can be used to estimate the
dimension of a general class of models involving interactions within layers, defined as Kronecker
products of hierarchical models [see Mont ´ufar and Morton, 2013]. We think that the geometric-
combinatorial picture of discrete RBMs developed in this paper may be helpful in solving various
long standing theoretical problems in the future, for example: What is the exact dimension of na¨ıve
15
MONT ´UFAR AND MORTON
Bayes models with general discrete variables? What is the smallest number of hidden variables that
make an RBM a universal approximator? Do binary RBMs always have the expected dimension?
Acknowledgments
We are grateful to the ICLR 2013 community for very valuable comments. This work was accom-
plished in part at the Max Planck Institute for Mathematics in the Sciences. This work is supported
in part by DARPA grant FA8650-11-1-7145.
References
M. Aoyagi. Stochastic complexity and generalization error of a Restricted Boltzmann Machine in
Bayesian estimation. J. Mach. Learn. Res., 99:1243–1272, August 2010.
N. Ay and A. Knauf. Maximizing multi-information. Kybernetika, 42(5):517–538, 2006.
Y . Bengio. Learning deep architectures for AI.Found. Trends Mach. Learn., 2(1):1–127, 2009.
Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks.
In B. Sch ¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing
Systems 19, pages 153–160. MIT Press, Cambridge, MA, 2007.
M. A. Carreira-Perpi ˜nan and G. E. Hinton. On contrastive divergence learning. In Proceedings of
the 10-th Interantional Workshop on Artificial Intelligence and Statistics, 2005.
M. V . Catalisano, A. V . Geramita, and A. Gimigliano. Secant varieties ofP1 ×···× P1 (n-times)
are not defective for n≥5. J. Algebraic Geometry, 20:295–327, 2011.
G. Cohen, I. Honkala, S. Litsyn, and A. Lobstein. Covering Codes. North-Holland Mathematical
Library. Elsevier Science, 2005.
M. A. Cueto, J. Morton, and B. Sturmfels. Geometry of the restricted Boltzmann machine. In
M. Viana and H. Wynn, editors, Algebraic methods in statistics and probability II, AMS Special
Session, volume 2. American Mathematical Society, 2010.
G. E. Dahl, R. P. Adams, and H. Larochelle. Training restricted Boltzmann machines on word
observations. arXiv:1202.5695, 2012.
A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological) , 39(1):1–38,
1977.
J. Draisma. A tropical approach to secant dimensions. J. Pure Appl. Algebra , 212(2):349–363,
2008.
Y . Freund and D. Haussler. Unsupervised learning of distributions of binary vectors using 2-layer
networks. In J. E. Moody, S. J. Hanson, and R. Lippmann, editors, Advances in Neural Informa-
tion Processing Systems 4, pages 912–919. Morgan Kaufmann, 1991.
16
DISCRETE RESTRICTED BOLTZMANN MACHINES
E. N. Gilbert. A comparison of signalling alphabets. Bell System Technical Journal, 31:504–522,
1952.
G. E. Hinton. Products of experts. In Proceedings 9-th ICANN, volume 1, pages 1–6, 1999.
G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Compu-
tation, 14:1771–1800, 2002.
G. E. Hinton. A practical guide to training restricted Boltzmann machines, version 1. Technical
report, UTML2010-003, University of Toronto, 2010.
G. E. Hinton, S. Osindero, and Y . Teh. A fast learning algorithm for deep belief nets. Neural
Computation, 18:1527–1554, 2006.
N. Le Roux and Y . Bengio. Representational power of restricted Boltzmann machines and deep
belief networks. Neural Computation, 20(6):1631–1649, 2008.
P. M. Long and R. A. Servedio. Restricted Boltzmann machines are hard to approximately evaluate
or simulate. In J. F ¨urnkranz and T. Joachims, editors, Proceedings of the 27th International
Conference on Machine Learning (ICML-10), pages 703–710. Omnipress, 2010.
D. Lowd and P. Domingos. Naive Bayes models for probability estimation. In Proceedings of the
22nd International Conference on Machine Learning, pages 529–536. ACM Press, 2005.
T. K. Marks and J. R. Movellan. Diffusion networks, products of experts, and factor analysis. In
Proc. 3rd Int. Conf. Independent Component Anal. Signal Separation, pages 481–485, 2001.
F. Mat´uˇs and N. Ay. On maximization of the information divergence from an exponential family. In
Proceedings of the WUPES’03, pages 199–204. University of Economics, Prague, 2003.
R. Memisevic and G. E. Hinton. Learning to represent spatial transformations with factored higher-
order Boltzmann machines. Neural Computation, 22(6):1473–1492, June 2010.
G. Mont´ufar. Mixture decompositions of exponential families using a decomposition of their sample
spaces. Kybernetika, 49(1), 2013.
G. Mont ´ufar and N. Ay. Refinements of universal approximation results for deep belief networks
and restricted Boltzmann machines. Neural Computation, 23(5):1306–1319, 2011.
G. Mont ´ufar and J. Morton. When does a mixture of products contain a product of mixtures?
http://arxiv.org/abs/1206.0387, 2012.
G. Mont´ufar and J. Morton. Geometry of hierarchical models on hidden-visible products of simpli-
cial complexes. 2013. In preparation.
G. Mont´ufar and J. Rauh. Scaling of model approximation errors and expected entropy distances.
In Proc. of the 9th Workshop on Uncertainty Processing (WUPES 2012), pages 137–148, 2012.
Preprint available at http://arxiv.org/abs/1207.3399.
G. Mont ´ufar, J. Rauh, and N. Ay. Expressive power and approximation errors of restricted Boltz-
mann machines. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. C. N. Pereira, and K. Q. Weinberger,
editors, Advances in Neural Information Processing Systems 24, pages 415–423, 2011.
17
MONT ´UFAR AND MORTON
S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of Markov random
fields. In J. C. Platt, D. Koller, Y . Singer, and S. Roweis, editors,Advances in Neural Information
Processing Systems 20, pages 1121–1128. MIT Press, Cambridge, MA, 2008.
L. Pachter and B. Sturmfels. Tropical geometry of statistical models. Proceedings of the National
Academy of Sciences of the United States of America, 101(46):16132–16137, Nov. 2004.
M. Ranzato, A. Krizhevsky, and G. E. Hinton. Factored 3-Way Restricted Boltzmann Machines For
Modeling Natural Images. In Proc. Thirteenth International Conference on Artificial Intelligence
and Statistics (AISTATS), pages 621–628, 2010.
W. E. Roth. On direct product matrices. Bulletin of the American Mathematical Society , 40:461–
468, 1934.
R. Salakhutdinov, A. Mnih, and G. E. Hinton. Restricted Boltzmann machines for collaborative
filtering. In Proceedings of the 24th International Conference on Machine Learning, pages 791–
798, 2007.
T. J. Sejnowski. Higher-order Boltzmann machines. In Neural Networks for Computing , pages
398–403. American Institute of Physics, 1986.
P. Smolensky. Information processing in dynamical systems: foundations of harmony theory. In
Symposium on Parallel and Distributed Processing, 1986.
T. Tran, D. Phung, and S. Venkatesh. Mixed-variate restricted Boltzmann machines. InProc. of 3rd
Asian Conference on Machine Learning (ACML), pages 213–229, 2011.
R. R. Varshamov. Estimate of the number of signals in error correcting codes.Doklady Akad. Nauk
SSSR, 117:739–741, 1957.
M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application
to information retrieval. In L. K. Saul, Y . Weiss, and L. Bottou, editors, Advances in Neural
Information Processing Systems 17, pages 1481–1488. MIT Press, Cambridge, MA, 2005.
18
|
Guido F. Montufar, Jason Morton
|
Unknown
| 2,013
|
{"id": "ttxM6DQKghdOi", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358411400000, "tmdate": 1358411400000, "ddate": null, "number": 59, "content": {"title": "Discrete Restricted Boltzmann Machines", "decision": "conferenceOral-iclr2013-conference", "abstract": "In this paper we describe discrete restricted Boltzmann machines: graphical probability models with bipartite interactions between discrete visible and hidden variables. These models generalize standard binary restricted Boltzmann machines and discrete na'ive Bayes models. For a given number of visible variables and cardinalities of their state spaces, we bound the number of hidden variables, depending on the cardinalities of their state spaces, for which the model is a universal approximator of probability distributions. More generally, we describe tractable exponential subfamilies and use them to bound the maximal and expected Kullback-Leibler approximation errors of these models from above. We discuss inference functions, mixtures of product distributions with shared parameters, and patterns of strong modes of probability distributions represented by discrete restricted Boltzmann machines in terms of configurations of projected products of simplices in normal fans of products of simplices. Finally, we use tropicalization and coding theory to study the geometry of these models, and show that in many cases they have the expected dimension but in some cases they do not. Keywords: expected dimension, tropical statistical model, distributed representation, q-ary variable, Kullback-Leibler divergence, hierarchical model, mixture model, Hadamard product, universal approximation, covering code", "pdf": "https://arxiv.org/abs/1301.3529", "paperhash": "montufar|discrete_restricted_boltzmann_machines", "keywords": [], "conflicts": [], "authors": ["Guido F. Montufar", "Jason Morton"], "authorids": ["guidomontufar@googlemail.com", "jason.morton@gmail.com"]}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["guidomontufar@googlemail.com"], "writers": []}
|
[Review]:
This paper presents a comprehensive theoretical discussion on the approximation properties of discrete restricted Boltzmann machines. The paper is clearly written. It provides a contextual introduction to the theoretical results by reviewing approximation results for Naive Bayes models and binary restricted Boltzmann machines. Section 4 of the paper lists the theoretical contributions, while proofs are are delayed to the appendix.
Notably, the first result gives conditions, based on the number of hidden and visible units together with their cardinalities, for the joint RBM to be a universal approximator of distributions over the visible units. The theorem provides an extension to previous results for binary RBMs. The second result shows that discrete RBMs can represent distributions with a number of strong modes that is exponential in the number of hidden units, but not necessarily exponential in the number of parameters. The third result shows that discrete RBMs can approximate any mixture of product distributions, with disjoint supports, arbitrarily well.
Proposition 10 is a nice result showing that a discrete RBM is a Hadamard product of mixtures of product distributions. These decompositions often help with the design of inference algorithms. Lemma 25 provides useful connections between RBMs and mixtures. Subsequently theorem 27 discusses the relation to exponential families.
Theorem 29 provides a very nice approximation bound for the KL divergence between the RBM and a distribution in the set of all distributions over the discrete state space, and so on. The paper also presents a geometry analysis but I did not follow all the appendix details about these.
Finally the appendices discuss interactions within layers and training. With regard to the first issue, I think the authors should consult
H. J. Kappen. Deterministic learning rules for Boltzmann machines. Neural Networks, 8(4):537-548, 1995
which discusses these lateral connections and approximation properties. With regard to training, I recommend the following expositions to the authors. The last one considers a different aspect of the theory of RBMS, namely statistical efficiency of the estimators:
Marlin, Benjamin, Kevin Swersky, Bo Chen, and Nando de Freitas. 'Inductive principles for restricted boltzmann machine learning.' In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pp. 509-516. 2010.
Tieleman, Tijmen, and Geoffrey Hinton. 'Using fast weights to improve persistent contrastive divergence.' In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 1033-1040. ACM, 2009.
Marlin, Benjamin, and Nando de Freitas. 'Asymptotic Efficiency of Deterministic Estimators for Discrete Energy-Based Models'. UAI 2011.
The above provide a more clear picture of stochastic maximum likelihood as well as deterministic estimators.
Minor: Why does your paper end with a b?
In remark 5. It might be easier to simply use x throughout instead of v.
|
anonymous reviewer 1922
| null | null |
{"id": "86Fqwo3AqRw0s", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362471060000, "tmdate": 1362471060000, "ddate": null, "number": 5, "content": {"title": "review of Discrete Restricted Boltzmann Machines", "review": "This paper presents a comprehensive theoretical discussion on the approximation properties of discrete restricted Boltzmann machines. The paper is clearly written. It provides a contextual introduction to the theoretical results by reviewing approximation results for Naive Bayes models and binary restricted Boltzmann machines. Section 4 of the paper lists the theoretical contributions, while proofs are are delayed to the appendix.\r\n\r\nNotably, the first result gives conditions, based on the number of hidden and visible units together with their cardinalities, for the joint RBM to be a universal approximator of distributions over the visible units. The theorem provides an extension to previous results for binary RBMs. The second result shows that discrete RBMs can represent distributions with a number of strong modes that is exponential in the number of hidden units, but not necessarily exponential in the number of parameters. The third result shows that discrete RBMs can approximate any mixture of product distributions, with disjoint supports, arbitrarily well.\r\n\r\nProposition 10 is a nice result showing that a discrete RBM is a Hadamard product of mixtures of product distributions. These decompositions often help with the design of inference algorithms. Lemma 25 provides useful connections between RBMs and mixtures. Subsequently theorem 27 discusses the relation to exponential families.\r\nTheorem 29 provides a very nice approximation bound for the KL divergence between the RBM and a distribution in the set of all distributions over the discrete state space, and so on. The paper also presents a geometry analysis but I did not follow all the appendix details about these.\r\n\r\nFinally the appendices discuss interactions within layers and training. With regard to the first issue, I think the authors should consult\r\n\r\nH. J. Kappen. Deterministic learning rules for Boltzmann machines. Neural Networks, 8(4):537-548, 1995\r\n\r\nwhich discusses these lateral connections and approximation properties. With regard to training, I recommend the following expositions to the authors. The last one considers a different aspect of the theory of RBMS, namely statistical efficiency of the estimators:\r\n\r\nMarlin, Benjamin, Kevin Swersky, Bo Chen, and Nando de Freitas. 'Inductive principles for restricted boltzmann machine learning.' In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pp. 509-516. 2010.\r\n\r\nTieleman, Tijmen, and Geoffrey Hinton. 'Using fast weights to improve persistent contrastive divergence.' In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 1033-1040. ACM, 2009.\r\n\r\nMarlin, Benjamin, and Nando de Freitas. 'Asymptotic Efficiency of Deterministic Estimators for Discrete Energy-Based Models'. UAI 2011. \r\n\r\nThe above provide a more clear picture of stochastic maximum likelihood as well as deterministic estimators.\r\n\r\nMinor: Why does your paper end with a b?\r\n\r\nIn remark 5. It might be easier to simply use x throughout instead of v."}, "forum": "ttxM6DQKghdOi", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttxM6DQKghdOi", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 1922"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 1,
"importance_and_relevance": 2,
"materials_and_methods": 13,
"praise": 6,
"presentation_and_reporting": 3,
"results_and_discussion": 10,
"suggestion_and_solution": 3,
"total": 36
}
| 1.111111
| -7.237794
| 8.348905
| 1.135552
| 0.241071
| 0.024441
| 0.055556
| 0.027778
| 0.055556
| 0.361111
| 0.166667
| 0.083333
| 0.277778
| 0.083333
|
{
"criticism": 0.05555555555555555,
"example": 0.027777777777777776,
"importance_and_relevance": 0.05555555555555555,
"materials_and_methods": 0.3611111111111111,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0.08333333333333333,
"results_and_discussion": 0.2777777777777778,
"suggestion_and_solution": 0.08333333333333333
}
| 1.111111
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttnAE7vaATtaK
|
Indoor Semantic Segmentation using depth information
|
This work addresses multi-class segmentation of indoor scenes with RGB-D inputs. While this area of research has gained much attention recently, most works still rely on hand-crafted features. In contrast, we apply a multiscale convolutional network to learn features directly from the images and the depth information. We obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%. We illustrate the labeling of indoor scenes in videos sequences that could be processed in real-time using appropriate hardware such as an FPGA.
|
Indoor Semantic Segmentation
using depth information
Camille Couprie1∗ Cl´ement Farabet2,3 Laurent Najman3 Yann LeCun2
1 IFP Energies Nouvelles
Technology, Computer Science and Applied Mathematics Division
Rueil Malmaison, France
2 Courant Institute of Mathematical Sciences
New York University
New York, NY 10003, USA
3 Universit´e Paris-Est
Laboratoire d’Informatique Gaspard-Monge
´Equipe A3SI - ESIEE Paris, France
Abstract
This work addresses multi-class segmentation of indoor scenes with RGB-D in-
puts. While this area of research has gained much attention recently, most works
still rely on hand-crafted features. In contrast, we apply a multiscale convolutional
network to learn features directly from the images and the depth information. We
obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%.
We illustrate the labeling of indoor scenes in videos sequences that could be pro-
cessed in real-time using appropriate hardware such as an FPGA.
1 Introduction
The recent release of the Kinect allowed many progress in indoor computer vision. Most approaches
have focused on object recognition [1, 14] or point cloud semantic labeling [2], finding their appli-
cations in robotics or games [6]. The pioneering work of Silberman et al. [22] was the first to deal
with the task of semantic full image labeling using depth information. The NYU depth v1 dataset
[22] guathers 2347 triplets of images, depth maps, and ground truth labeled images covering twelve
object categories. Most datasets employed for semantic image segmentation [11, 17] present the
objects centered into the images, under nice lightening conditions. The NYU depth dataset aims to
develop joint segmentation and classification solutions to an environment that we are likely to en-
counter in the everyday life. This indoor dataset contains scenes of offices, stores, rooms of houses
containing many occluded objects unevenly lightened. The first results [22] on this dataset were
obtained using the extraction of sift features on the depth maps in addition to the RGB images. The
depth is then used in the gradient information to refine the predictions using graph cuts. Alternative
CRF-like approaches have also been explored to improve the computation time performances [4].
The results on NYU dataset v1 have been improved by [19] using elaborate kernel descriptors and a
post-processing step that employs gPb superpixels MRFs, involving large computation times.
A second version of the NYU depth dataset was released more recently [23], and improves the
labels categorization into 894 different object classes. Furthermore, the size of the dataset did also
increase, it now contains hundreds of video sequences (407024 frames) acquired with depth maps.
Feature learning, or deep learning approaches are particularly adapted to the addition of new image
modalities such as depth information. Its recent success for dealing with various types of data is
manifest in speech recognition [13], molecular activity prediction, object recognition [12] and many
1∗ Performed the work at New York University.
1
arXiv:1301.3572v2 [cs.CV] 14 Mar 2013
more applications. In computer vision, the approach of Farabet et al. [8, 9] has been specifically
designed for full scene labeling and has proven its efficiency for outdoor scenes. The key idea is to
learn hierarchical features by the mean of a multiscale convolutional network. Training networks
using multiscales representation appeared also the same year in [3, 21].
When the depth information was not yet available, there have been attempts to use stereo image
pairs to improve the feature learning of convolutional networks [16]. Now that depth maps are easy
to acquire, deep learning approachs started to be considered for improving object recognition [20].
In this work, we suggest to adapt Farabet et al.’s network to learn more effective features for indoor
scene labeling. Our work is, to the best of our knowledge, the first exploitation of depth information
in a feature learning approach for full scene labeling.
2 Full scene labeling
2.1 Multi-scale feature extraction
Good internal representations are hierarchical. In vision, pixels are assembled into edglets, edglets
into motifs, motifs into parts, parts into objects, and objects into scenes. This suggests that recog-
nition architectures for vision (and for other modalities such as audio and natural language) should
have multiple trainable stages stacked on top of each other, one for each level in the feature hierar-
chy. Convolutional Networks [15] (ConvNets) provide a simple framework to learn such hierarchies
of features.
Convolutional Networks are trainable architectures composed of multiple stages. The input and
output of each stage are sets of arrays called feature maps. In our case, the input is a color (RGB)
image plus a depth (D) image and each feature map is a 2D array containing a color or depth channel
of the input RGBD image. At the output, each feature map represents a particular feature extracted at
all locations on the input. Each stage is composed of three layers: a filter bank layer, a non-linearity
layer, and a feature pooling layer. A typical ConvNet is composed of one, two or three such 3-layer
stages, followed by a classification module. Because they are trainable, arbitrary input modalities
can be modeled, such as the depth modality that is added to the input channel in this work.
F 3
convnet
F 1
F 2
F
f 1 ( X 1 ; /u1D6C91 )
labeling
l ( F , h ( I ))
superpixels
RGBD
Laplacian
pyramid
g ( I )
table
wall
ceiling
chair
chair
pict. pict.
f 3 ( X 3 ; /u1D6C93 )
f 2 ( X 2 ; /u1D6C92 )
Input RGB image
Input depth image
segmentation
h ( I )
Figure 1: Scene parsing (frame by frame) using a multiscale network and superpixels. The RGB
channels of the image and the depth image are transformed through a Laplacian pyramid. Each
scale is fed to a 3-stage convolutional network, which produces a set of feature maps. The feature
maps of all scales are concatenated, the coarser-scale maps being upsampled to match the size of the
finest-scale map. Each feature vector thus represents a large contextual window around each pixel.
In parallel, a single segmentation of the image into superpixels is computed to exploit the natural
contours of the image. The final labeling is obtained by the aggregation of the classifier predictions
into the superpixels.
A great gain has been achieved with the introduction of the multiscale convolutional network de-
scribed in [9]. The multi-scale, dense feature extractor produces a series of feature vectors for
regions of multiple sizes centered around every pixel in the image, covering a large context. The
2
multi-scale convolutional net contains multiple copies of a single network that are applied to differ-
ent scales of a Laplacian pyramid version of the RGBD input image.
The RGBD image is first pre-processed, so that local neighborhoods have zero mean and unit stan-
dard deviation. The depth image, given in meters, is treated as an additional channel similarly to any
color channel. The overview scheme of our model appears in Figure 1.
Beside the input image which is now including a depth channel, the parameters of the multi-scale
network (number of scales, sizes of feature maps, pooling type, etc.) are identical to [9]. The feature
maps sizes are 16,64,256, multiplied by the three scales. The size of convolutions kernels are set
to 7 by 7 at each layer, and sizes of subsampling kernels (max pooling) are 2 by 2. In our tests we
rescaled the images to the size 240 × 320.
As in [9], the feature extractor followed by a classifier was trained to minimize the negative log-
likelihood loss function. The classifier that follows feature extraction is a 2-layer multi-perceptron,
with a hidden layer of size 1024. We use superpixels [10] to smooth the convnet predictions as a
post-processing step, by agregating the classifiers predictions in each superpixel.
2.2 Movie processing
While the training is performed on single images, we are able to perform scene labeling of video
sequences. In order to improve the performances of our frame-by-frame predictions, a temporal
smoothing may be applied. In this work, instead of using the frame by frame superpixels as in the
previous section, we employ the temporal consistent superpixels of [5]. This approach works in
quasi-linear time and reduces the flickering of objects that may appear in the video sequences.
3 Results
We used for our experiments the NYU depth dataset – version 2 – of Silberman and Fergus [23],
composed of 407024 couples of RGB images and depth images. Among these images, 1449 frames
have been labeled. The object labels cover 894 categories. The dataset is provided with the original
raw depth data that contain missing values, with code using [7] to inpaint the depth images.
3.1 Validation on images
The training has been performed using the 894 categories directly as output classes. The frequencies
of object appearences have not been changed in the training process. However, we established 14
clusters of classes categories to evaluate our results more easily. The distributions of number of
pixels per class categories are given in Table 1. We used the train/test splits as provided by the
NYU depth v2 dataset, that is to say 795 training images and 654 test images. Please note that
no jitter (rotation, translations or any other transformation) was added to the dataset to gain extra
performances. However, this strategy could be employed in future work. The code consists of Lua
scripts using the Torch machine learning software [18] available online athttp://www.torch.ch/ .
To evaluate the influence of the addition of depth information, we trained a multiscale convnet only
on the RGB channels, and another network using the additional depth information. Both networks
were trained until the achievement of their best performances, that is to say for 105 epochs and 98
epochs respectively, taking less than 2 days on a regular server.
We report in Table 1 two different performance measures:
• the “classwise accuracy”, counting the number of correctly classified pixels divided by the
number of false positive, averaged for each class. This number corresponds to the mean of
the confusion matrix diagonal.
• the “pixelwise accuracy”, counting the number of correctly classified pixels divided by the
total number of pixels of the test data.
We observe that considerable gains (15% or more) are achieved for the classes ’floor’, ’ceiling’,
and ’furniture’. This result makes a lot of sense since these classes are characterized by a somehow
constant appearance of their depth map. Objects such as TV , table, books can either be located in
3
Ground truths
Results using the Multiscale Convnet
Results using the Multiscale Convnet with depth information
wall
bed
books
ceiling
chair
floor
furniture
pict./deco
sofa
table
object
window
TV
uknw
Ground truths
Depth maps
Results using the Multiscale Convnet
Results using the Multiscale Convnet with depth information
Figure 2: Some scene labelings using our Multiscale Convolutional Network trained on RGB and
RGBD images. We observe in Table 1 that adding depth information helps to recognize objects that
have low intra-class variance of depth appearance.
the foreground as well as in the background of images. On the contrary, the floor and ceiling will
almost always lead to a depth gradient always oriented in the same direction: Since the dataset has
been collected by a person holding a kinect device at a his chest, floors and ceiling are located at
a distance that does not vary to much through the dataset. Figure 2 provides examples of depth
4
Class Multiscale MultiScl. Cnet
Occurrences Convnet Acc. [9] +depth Acc.
bed 4.4% 30.3 38.1
objects 7.1 % 10.9 8.7
chair 3.4% 44.4 34.1
furnit. 12.3% 28.5 42.4
ceiling 1.4% 33.2 62.6
floor 9.9% 68.0 87.3
deco. 3.4% 38.5 40.4
sofa 3.2% 25.8 24.6
table 3.7% 18.0 10.2
wall 24.5% 89.4 86.1
window 5.1% 37.8 15.9
books 2.9% 31.7 13.7
TV 1.0% 18.8 6.0
unkn. 17.8% - -
Avg. Class Acc. - 35.8 36.2
Pixel Accuracy (mean) - 51.0 52.4
Pixel Accuracy (median) - 51.7 52.9
Pixel Accuracy (std. dev.) - 15.2 15.2
Table 1: Class occurrences in the test set – Performances per class and per pixel.
maps that illustrate these observations. Overall, improvements induced by the depth information
exploitation are present. In the next section, these improvements are more apparent.
3.2 Comparison with Silberman et al.
In order to compare our results to the state-of-the-art on the NYU depth v2 dataset, we adopted a
different selection of outputs instead of the 14 classes employed in the previous section. The work
of Silberman et al. [23] defines the four semantic classes Ground, Furniture, Props and Structure.
This class selection is adopted in [23] to use semantic labelings of scenes to infer support relations
between objects. We recall that the recognition of the semantic categories is performed in [23] by
the definition of diverse features including SIFT features, histograms of surface normals, 2D and 3D
bounding box dimensions, color histograms, and relative depth.
Ground Furniture Props Structure Class Acc. Pixel Acc.
Silberman et al.[23] 68 70 42 59 59.6 58.6
Multiscale convnet [9] 68.1 51.1 29.9 87.8 59.2 63.0
Multiscale+depth convnet 87.3 45.3 35.5 86.1 63.5 64.5
Table 2: Accuracy of the multiscale convnet compared with the state-of-the-art approach of [23].
As reported in Table 2, the results achieved using the Multiscale convnet are improving the structure
class predictions, resulting in a 4% gain in pixelwise accuracy over Silberman et al. approach.
Adding the depth information results in a considerable improvement of the ground prediction, and
performs also better over the other classes, achieving a 4% gain in classwise accuracy over previous
works and improves by almost 6% the pixelwise accuracy compared to Silberman et al.’s results.
We note that the class ’furniture’ in the 4-classes evaluation is different than the ’furniture’ class
of the 14-classes evaluation. The furniture-4 class encompasses chairs and beds but not desks, and
cabinets for example, explaining a drop of performances here using the depth information.
5
3.3 Test on videos
The NYU v2 depth dataset contains several hundreds of video sequences encompassing 26 different
classes of indoor scenes, going from bedrooms to basements, and dining rooms to book stores.
Unfortunately, no ground truth is yet available to evaluate our performances on this video. Therefore,
we only present here some illustrations of the capacity of our model to label these scenes.
The predictions are computed frame by frame on the videos and are refined using temporally
smoothed superpixels using [5]. Two examples of results on sequences are shown at Figure 3.
A great advantage of our approach is its nearly real time capabilities. Processing a 320x240 frame
takes 0.7 seconds on a laptop [9]. The temporal smoothing only requires an additional 0.1s per
frame.
(a) Output of the Multiscale convnet trained using depth information - frame by frame
(b) Results smoothed temporally using [5]
Props
Floor
Structure
Wall
(c) Output of the Multiscale convnet trained using depth information - frame by frame
(d) Results smoothed temporally using [5]
Figure 3: Some results on video sequences of the NYU v2 depth dataset. Note that results (c,d)
could be improved by using more training examples. Indeed, only a very small number in the
labeled training examples exhibit a wall in the foreground.
4 Conclusion
Feature learning is a particularly satisfying strategy to adopt when approaching a dataset that con-
tains new image (or other kind of data) modalities. Our model, while being faster and more efficient
than previous approaches, is easier to implement without the need to design specific features adapted
to depth information. Different clusterings of object classes as the ones used in this work may be
chosen, reflecting this work’s flexibility of applications. For example, using the 4-classes clustering,
the accurate results achieved with the multi-scale convolutional network could be applied to perform
inference on support relations between objects. Improvements for specific object recognition could
further be achieved by filtering the frequency of the training objects. We observe that the recog-
nition of object classes having similar depth appearance and location is improved when using the
depth information. On the contrary, it is better to use only RGB information to recognize objects
with classes containing high variability of their depth maps. This observation could be used to com-
bine the best results in function of the application. Finally, a number of techniques (unsupervised
6
feature learning, MRF smoothing of the convnet predictions, extension of the training set) would
probably help to improve the present system.
5 Acknowledgments
We would like to thank Nathan Silberman for his useful input for handling the NYU depth v2 dataset,
and fruitful discussions.
References
[1] B3do: Berkeley 3-d object dataset. http://kinectdata.com/. 1
[2] Cornell-rgbd-dataset. http://pr.cs.cornell.edu/sceneunderstanding/data/data.php. 1
[3] Dan Claudiu Ciresan, Alessandro Giusti, Luca Maria Gambardella, and J ¨urgen Schmidhuber.
Deep neural networks segment neuronal membranes in electron microscopy images. In NIPS,
pages 2852–2860, 2012. 1
[4] Camille Couprie. Multi-label energy minimization for object class segmentation. In 20th
European Signal Processing Conference 2012 (EUSIPCO 2012), Bucharest, Romania, August
2012. 1
[5] Camille Couprie, Cl ´ement Farabet, and Yann LeCun. Causal graph-based video segmentation,
2013. arXiv:1301.1671. 2.2, 3.3
[6] L. Cruz, D. Lucio, and L. Velho. Kinect and rgbd images: Challenges and applications. SIB-
GRAPI Tutorial, 2012. 1
[7] Anat Levin Dani, Dani Lischinski, and Yair Weiss. Colorization using optimization. ACM
Transactions on Graphics, 23:689–694, 2004. 3
[8] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Scene Parsing with
Multiscale Feature Learning, Purity Trees, and Optimal Covers. In Proc. of the 2012 Interna-
tional Conference on Machine Learning, Edinburgh, Scotland, June 2012. 1
[9] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical
features for scene labeling. IEEE Transactions on Pattern Analysis and Machine Intelligence,
2013. In press. 1, 2.1, 3.1, 3.2, 3.3
[10] Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient graph-based image segmentation.
International Journal of Computer Vision, 59:2004, 2004. 2.1
[11] Stephen Gould, Richard Fulton, and Daphne Koller. Decomposing a Scene into Geometric
and Semantically Consistent Regions. In IEEE International Conference on Computer Vision,
2009. 1
[12] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhut-
dinov. Improving neural networks by preventing co-adaptation of feature detectors. CoRR,
abs/1207.0580, 2012. 1
[13] Navdeep Jaitly, Patrick Nguyen, Andrew Senior, and Vincent Vanhoucke. Application of pre-
trained deep neural networks to large vocabulary speech recognition. In Proceedings of Inter-
speech 2012, 2012. 1
[14] Allison Janoch, Sergey Karayev, Yangqing Jia, Jonathan T. Barron, Mario Fritz, Kate Saenko,
and Trevor Darrell. A category-level 3-d object dataset: Putting the kinect to work. In ICCV
Workshops, pages 1168–1174. IEEE, 2011. 1
[15] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278 –2324, nov 1998. 2.1
[16] Yann LeCun, Fu-Jie Huang, and Leon Bottou. Learning Methods for generic object recognition
with invariance to pose and lighting. In Proceedings of CVPR’04. IEEE, 2004. 1
[17] Ce Liu, Jenny Yuen, and Antonio Torralba. SIFT Flow: Dense Correspondence across Scenes
and its Applications. IEEE transactions on pattern analysis and machine intelligence , pages
1–17, August 2010. 1
7
[18] C. Farabet R. Collobert, K. Kavukcuoglu. Torch7: A matlab-like environment for machines
learning. In Big Learning Workshop (@ NIPS’11), Sierra Nevada, Spain, 2011. 3.1
[19] Xiaofeng Ren, Liefeng Bo, and D. Fox. Rgb-(d) scene labeling: Features and algorithms.
In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 2759
–2766, june 2012. 1
[20] Richard Socher and Brody Huval and Bharath Bhat and Christopher D. Manning and Andrew
Y . Ng. Convolutional-Recursive Deep Learning for 3D Object Classification. In Advances in
Neural Information Processing Systems 25. 2012. 1
[21] Hannes Schulz and Sven Behnke. Learning object-class segmentation with convolutional neu-
ral networks. In 11th European Symposium on Artificial Neural Networks (ESANN) , 2012.
1
[22] Nathan Silberman and Rob Fergus. Indoor scene segmentation using a structured light sensor.
In 3DRR Workshop, ICCV’11, 2011. 1
[23] Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and
support inference from rgbd images. In ECCV, 2012. 1, 3, 3.2, 2
8
|
Camille Couprie, Clement Farabet, Laurent Najman, Yann LeCun
|
Unknown
| 2,013
|
{"id": "ttnAE7vaATtaK", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358409600000, "tmdate": 1358409600000, "ddate": null, "number": 40, "content": {"title": "Indoor Semantic Segmentation using depth information", "decision": "conferenceOral-iclr2013-conference", "abstract": "This work addresses multi-class segmentation of indoor scenes with RGB-D inputs. While this area of research has gained much attention recently, most works still rely on hand-crafted features. In contrast, we apply a multiscale convolutional network to learn features directly from the images and the depth information. We obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%. We illustrate the labeling of indoor scenes in videos sequences that could be processed in real-time using appropriate hardware such as an FPGA.", "pdf": "https://arxiv.org/abs/1301.3572", "paperhash": "couprie|indoor_semantic_segmentation_using_depth_information", "keywords": [], "conflicts": [], "authors": ["Camille Couprie", "Clement Farabet", "Laurent Najman", "Yann LeCun"], "authorids": ["camille.couprie@gmail.com", "clement.farabet@gmail.com", "l.najman@esiee.fr", "ylecun@gmail.com"]}, "forum": "ttnAE7vaATtaK", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["camille.couprie@gmail.com"], "writers": []}
|
[Review]:
Segmentation with multi-scale max pooling CNN, applied to indoor vision, using depth information. Interesting paper! Fine results.
Question: how does that compare to multi-scale max pooling CNN for a previous award-winning application, namely, segmentation of neuronal membranes (Ciresan et al, NIPS 2012)?
|
anonymous reviewer 777f
| null | null |
{"id": "qO9gWZZ1gfqhl", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362163380000, "tmdate": 1362163380000, "ddate": null, "number": 1, "content": {"title": "review of Indoor Semantic Segmentation using depth information", "review": "Segmentation with multi-scale max pooling CNN, applied to indoor vision, using depth information. Interesting paper! Fine results.\r\n\r\nQuestion: how does that compare to multi-scale max pooling CNN for a previous award-winning application, namely, segmentation of neuronal membranes (Ciresan et al, NIPS 2012)?"}, "forum": "ttnAE7vaATtaK", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttnAE7vaATtaK", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 777f"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 2,
"praise": 2,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 0,
"total": 4
}
| 1.5
| 0.221623
| 1.278377
| 1.507743
| 0.107135
| 0.007743
| 0
| 0
| 0.25
| 0.5
| 0.5
| 0
| 0.25
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0.25,
"materials_and_methods": 0.5,
"praise": 0.5,
"presentation_and_reporting": 0,
"results_and_discussion": 0.25,
"suggestion_and_solution": 0
}
| 1.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttnAE7vaATtaK
|
Indoor Semantic Segmentation using depth information
|
This work addresses multi-class segmentation of indoor scenes with RGB-D inputs. While this area of research has gained much attention recently, most works still rely on hand-crafted features. In contrast, we apply a multiscale convolutional network to learn features directly from the images and the depth information. We obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%. We illustrate the labeling of indoor scenes in videos sequences that could be processed in real-time using appropriate hardware such as an FPGA.
|
Indoor Semantic Segmentation
using depth information
Camille Couprie1∗ Cl´ement Farabet2,3 Laurent Najman3 Yann LeCun2
1 IFP Energies Nouvelles
Technology, Computer Science and Applied Mathematics Division
Rueil Malmaison, France
2 Courant Institute of Mathematical Sciences
New York University
New York, NY 10003, USA
3 Universit´e Paris-Est
Laboratoire d’Informatique Gaspard-Monge
´Equipe A3SI - ESIEE Paris, France
Abstract
This work addresses multi-class segmentation of indoor scenes with RGB-D in-
puts. While this area of research has gained much attention recently, most works
still rely on hand-crafted features. In contrast, we apply a multiscale convolutional
network to learn features directly from the images and the depth information. We
obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%.
We illustrate the labeling of indoor scenes in videos sequences that could be pro-
cessed in real-time using appropriate hardware such as an FPGA.
1 Introduction
The recent release of the Kinect allowed many progress in indoor computer vision. Most approaches
have focused on object recognition [1, 14] or point cloud semantic labeling [2], finding their appli-
cations in robotics or games [6]. The pioneering work of Silberman et al. [22] was the first to deal
with the task of semantic full image labeling using depth information. The NYU depth v1 dataset
[22] guathers 2347 triplets of images, depth maps, and ground truth labeled images covering twelve
object categories. Most datasets employed for semantic image segmentation [11, 17] present the
objects centered into the images, under nice lightening conditions. The NYU depth dataset aims to
develop joint segmentation and classification solutions to an environment that we are likely to en-
counter in the everyday life. This indoor dataset contains scenes of offices, stores, rooms of houses
containing many occluded objects unevenly lightened. The first results [22] on this dataset were
obtained using the extraction of sift features on the depth maps in addition to the RGB images. The
depth is then used in the gradient information to refine the predictions using graph cuts. Alternative
CRF-like approaches have also been explored to improve the computation time performances [4].
The results on NYU dataset v1 have been improved by [19] using elaborate kernel descriptors and a
post-processing step that employs gPb superpixels MRFs, involving large computation times.
A second version of the NYU depth dataset was released more recently [23], and improves the
labels categorization into 894 different object classes. Furthermore, the size of the dataset did also
increase, it now contains hundreds of video sequences (407024 frames) acquired with depth maps.
Feature learning, or deep learning approaches are particularly adapted to the addition of new image
modalities such as depth information. Its recent success for dealing with various types of data is
manifest in speech recognition [13], molecular activity prediction, object recognition [12] and many
1∗ Performed the work at New York University.
1
arXiv:1301.3572v2 [cs.CV] 14 Mar 2013
more applications. In computer vision, the approach of Farabet et al. [8, 9] has been specifically
designed for full scene labeling and has proven its efficiency for outdoor scenes. The key idea is to
learn hierarchical features by the mean of a multiscale convolutional network. Training networks
using multiscales representation appeared also the same year in [3, 21].
When the depth information was not yet available, there have been attempts to use stereo image
pairs to improve the feature learning of convolutional networks [16]. Now that depth maps are easy
to acquire, deep learning approachs started to be considered for improving object recognition [20].
In this work, we suggest to adapt Farabet et al.’s network to learn more effective features for indoor
scene labeling. Our work is, to the best of our knowledge, the first exploitation of depth information
in a feature learning approach for full scene labeling.
2 Full scene labeling
2.1 Multi-scale feature extraction
Good internal representations are hierarchical. In vision, pixels are assembled into edglets, edglets
into motifs, motifs into parts, parts into objects, and objects into scenes. This suggests that recog-
nition architectures for vision (and for other modalities such as audio and natural language) should
have multiple trainable stages stacked on top of each other, one for each level in the feature hierar-
chy. Convolutional Networks [15] (ConvNets) provide a simple framework to learn such hierarchies
of features.
Convolutional Networks are trainable architectures composed of multiple stages. The input and
output of each stage are sets of arrays called feature maps. In our case, the input is a color (RGB)
image plus a depth (D) image and each feature map is a 2D array containing a color or depth channel
of the input RGBD image. At the output, each feature map represents a particular feature extracted at
all locations on the input. Each stage is composed of three layers: a filter bank layer, a non-linearity
layer, and a feature pooling layer. A typical ConvNet is composed of one, two or three such 3-layer
stages, followed by a classification module. Because they are trainable, arbitrary input modalities
can be modeled, such as the depth modality that is added to the input channel in this work.
F 3
convnet
F 1
F 2
F
f 1 ( X 1 ; /u1D6C91 )
labeling
l ( F , h ( I ))
superpixels
RGBD
Laplacian
pyramid
g ( I )
table
wall
ceiling
chair
chair
pict. pict.
f 3 ( X 3 ; /u1D6C93 )
f 2 ( X 2 ; /u1D6C92 )
Input RGB image
Input depth image
segmentation
h ( I )
Figure 1: Scene parsing (frame by frame) using a multiscale network and superpixels. The RGB
channels of the image and the depth image are transformed through a Laplacian pyramid. Each
scale is fed to a 3-stage convolutional network, which produces a set of feature maps. The feature
maps of all scales are concatenated, the coarser-scale maps being upsampled to match the size of the
finest-scale map. Each feature vector thus represents a large contextual window around each pixel.
In parallel, a single segmentation of the image into superpixels is computed to exploit the natural
contours of the image. The final labeling is obtained by the aggregation of the classifier predictions
into the superpixels.
A great gain has been achieved with the introduction of the multiscale convolutional network de-
scribed in [9]. The multi-scale, dense feature extractor produces a series of feature vectors for
regions of multiple sizes centered around every pixel in the image, covering a large context. The
2
multi-scale convolutional net contains multiple copies of a single network that are applied to differ-
ent scales of a Laplacian pyramid version of the RGBD input image.
The RGBD image is first pre-processed, so that local neighborhoods have zero mean and unit stan-
dard deviation. The depth image, given in meters, is treated as an additional channel similarly to any
color channel. The overview scheme of our model appears in Figure 1.
Beside the input image which is now including a depth channel, the parameters of the multi-scale
network (number of scales, sizes of feature maps, pooling type, etc.) are identical to [9]. The feature
maps sizes are 16,64,256, multiplied by the three scales. The size of convolutions kernels are set
to 7 by 7 at each layer, and sizes of subsampling kernels (max pooling) are 2 by 2. In our tests we
rescaled the images to the size 240 × 320.
As in [9], the feature extractor followed by a classifier was trained to minimize the negative log-
likelihood loss function. The classifier that follows feature extraction is a 2-layer multi-perceptron,
with a hidden layer of size 1024. We use superpixels [10] to smooth the convnet predictions as a
post-processing step, by agregating the classifiers predictions in each superpixel.
2.2 Movie processing
While the training is performed on single images, we are able to perform scene labeling of video
sequences. In order to improve the performances of our frame-by-frame predictions, a temporal
smoothing may be applied. In this work, instead of using the frame by frame superpixels as in the
previous section, we employ the temporal consistent superpixels of [5]. This approach works in
quasi-linear time and reduces the flickering of objects that may appear in the video sequences.
3 Results
We used for our experiments the NYU depth dataset – version 2 – of Silberman and Fergus [23],
composed of 407024 couples of RGB images and depth images. Among these images, 1449 frames
have been labeled. The object labels cover 894 categories. The dataset is provided with the original
raw depth data that contain missing values, with code using [7] to inpaint the depth images.
3.1 Validation on images
The training has been performed using the 894 categories directly as output classes. The frequencies
of object appearences have not been changed in the training process. However, we established 14
clusters of classes categories to evaluate our results more easily. The distributions of number of
pixels per class categories are given in Table 1. We used the train/test splits as provided by the
NYU depth v2 dataset, that is to say 795 training images and 654 test images. Please note that
no jitter (rotation, translations or any other transformation) was added to the dataset to gain extra
performances. However, this strategy could be employed in future work. The code consists of Lua
scripts using the Torch machine learning software [18] available online athttp://www.torch.ch/ .
To evaluate the influence of the addition of depth information, we trained a multiscale convnet only
on the RGB channels, and another network using the additional depth information. Both networks
were trained until the achievement of their best performances, that is to say for 105 epochs and 98
epochs respectively, taking less than 2 days on a regular server.
We report in Table 1 two different performance measures:
• the “classwise accuracy”, counting the number of correctly classified pixels divided by the
number of false positive, averaged for each class. This number corresponds to the mean of
the confusion matrix diagonal.
• the “pixelwise accuracy”, counting the number of correctly classified pixels divided by the
total number of pixels of the test data.
We observe that considerable gains (15% or more) are achieved for the classes ’floor’, ’ceiling’,
and ’furniture’. This result makes a lot of sense since these classes are characterized by a somehow
constant appearance of their depth map. Objects such as TV , table, books can either be located in
3
Ground truths
Results using the Multiscale Convnet
Results using the Multiscale Convnet with depth information
wall
bed
books
ceiling
chair
floor
furniture
pict./deco
sofa
table
object
window
TV
uknw
Ground truths
Depth maps
Results using the Multiscale Convnet
Results using the Multiscale Convnet with depth information
Figure 2: Some scene labelings using our Multiscale Convolutional Network trained on RGB and
RGBD images. We observe in Table 1 that adding depth information helps to recognize objects that
have low intra-class variance of depth appearance.
the foreground as well as in the background of images. On the contrary, the floor and ceiling will
almost always lead to a depth gradient always oriented in the same direction: Since the dataset has
been collected by a person holding a kinect device at a his chest, floors and ceiling are located at
a distance that does not vary to much through the dataset. Figure 2 provides examples of depth
4
Class Multiscale MultiScl. Cnet
Occurrences Convnet Acc. [9] +depth Acc.
bed 4.4% 30.3 38.1
objects 7.1 % 10.9 8.7
chair 3.4% 44.4 34.1
furnit. 12.3% 28.5 42.4
ceiling 1.4% 33.2 62.6
floor 9.9% 68.0 87.3
deco. 3.4% 38.5 40.4
sofa 3.2% 25.8 24.6
table 3.7% 18.0 10.2
wall 24.5% 89.4 86.1
window 5.1% 37.8 15.9
books 2.9% 31.7 13.7
TV 1.0% 18.8 6.0
unkn. 17.8% - -
Avg. Class Acc. - 35.8 36.2
Pixel Accuracy (mean) - 51.0 52.4
Pixel Accuracy (median) - 51.7 52.9
Pixel Accuracy (std. dev.) - 15.2 15.2
Table 1: Class occurrences in the test set – Performances per class and per pixel.
maps that illustrate these observations. Overall, improvements induced by the depth information
exploitation are present. In the next section, these improvements are more apparent.
3.2 Comparison with Silberman et al.
In order to compare our results to the state-of-the-art on the NYU depth v2 dataset, we adopted a
different selection of outputs instead of the 14 classes employed in the previous section. The work
of Silberman et al. [23] defines the four semantic classes Ground, Furniture, Props and Structure.
This class selection is adopted in [23] to use semantic labelings of scenes to infer support relations
between objects. We recall that the recognition of the semantic categories is performed in [23] by
the definition of diverse features including SIFT features, histograms of surface normals, 2D and 3D
bounding box dimensions, color histograms, and relative depth.
Ground Furniture Props Structure Class Acc. Pixel Acc.
Silberman et al.[23] 68 70 42 59 59.6 58.6
Multiscale convnet [9] 68.1 51.1 29.9 87.8 59.2 63.0
Multiscale+depth convnet 87.3 45.3 35.5 86.1 63.5 64.5
Table 2: Accuracy of the multiscale convnet compared with the state-of-the-art approach of [23].
As reported in Table 2, the results achieved using the Multiscale convnet are improving the structure
class predictions, resulting in a 4% gain in pixelwise accuracy over Silberman et al. approach.
Adding the depth information results in a considerable improvement of the ground prediction, and
performs also better over the other classes, achieving a 4% gain in classwise accuracy over previous
works and improves by almost 6% the pixelwise accuracy compared to Silberman et al.’s results.
We note that the class ’furniture’ in the 4-classes evaluation is different than the ’furniture’ class
of the 14-classes evaluation. The furniture-4 class encompasses chairs and beds but not desks, and
cabinets for example, explaining a drop of performances here using the depth information.
5
3.3 Test on videos
The NYU v2 depth dataset contains several hundreds of video sequences encompassing 26 different
classes of indoor scenes, going from bedrooms to basements, and dining rooms to book stores.
Unfortunately, no ground truth is yet available to evaluate our performances on this video. Therefore,
we only present here some illustrations of the capacity of our model to label these scenes.
The predictions are computed frame by frame on the videos and are refined using temporally
smoothed superpixels using [5]. Two examples of results on sequences are shown at Figure 3.
A great advantage of our approach is its nearly real time capabilities. Processing a 320x240 frame
takes 0.7 seconds on a laptop [9]. The temporal smoothing only requires an additional 0.1s per
frame.
(a) Output of the Multiscale convnet trained using depth information - frame by frame
(b) Results smoothed temporally using [5]
Props
Floor
Structure
Wall
(c) Output of the Multiscale convnet trained using depth information - frame by frame
(d) Results smoothed temporally using [5]
Figure 3: Some results on video sequences of the NYU v2 depth dataset. Note that results (c,d)
could be improved by using more training examples. Indeed, only a very small number in the
labeled training examples exhibit a wall in the foreground.
4 Conclusion
Feature learning is a particularly satisfying strategy to adopt when approaching a dataset that con-
tains new image (or other kind of data) modalities. Our model, while being faster and more efficient
than previous approaches, is easier to implement without the need to design specific features adapted
to depth information. Different clusterings of object classes as the ones used in this work may be
chosen, reflecting this work’s flexibility of applications. For example, using the 4-classes clustering,
the accurate results achieved with the multi-scale convolutional network could be applied to perform
inference on support relations between objects. Improvements for specific object recognition could
further be achieved by filtering the frequency of the training objects. We observe that the recog-
nition of object classes having similar depth appearance and location is improved when using the
depth information. On the contrary, it is better to use only RGB information to recognize objects
with classes containing high variability of their depth maps. This observation could be used to com-
bine the best results in function of the application. Finally, a number of techniques (unsupervised
6
feature learning, MRF smoothing of the convnet predictions, extension of the training set) would
probably help to improve the present system.
5 Acknowledgments
We would like to thank Nathan Silberman for his useful input for handling the NYU depth v2 dataset,
and fruitful discussions.
References
[1] B3do: Berkeley 3-d object dataset. http://kinectdata.com/. 1
[2] Cornell-rgbd-dataset. http://pr.cs.cornell.edu/sceneunderstanding/data/data.php. 1
[3] Dan Claudiu Ciresan, Alessandro Giusti, Luca Maria Gambardella, and J ¨urgen Schmidhuber.
Deep neural networks segment neuronal membranes in electron microscopy images. In NIPS,
pages 2852–2860, 2012. 1
[4] Camille Couprie. Multi-label energy minimization for object class segmentation. In 20th
European Signal Processing Conference 2012 (EUSIPCO 2012), Bucharest, Romania, August
2012. 1
[5] Camille Couprie, Cl ´ement Farabet, and Yann LeCun. Causal graph-based video segmentation,
2013. arXiv:1301.1671. 2.2, 3.3
[6] L. Cruz, D. Lucio, and L. Velho. Kinect and rgbd images: Challenges and applications. SIB-
GRAPI Tutorial, 2012. 1
[7] Anat Levin Dani, Dani Lischinski, and Yair Weiss. Colorization using optimization. ACM
Transactions on Graphics, 23:689–694, 2004. 3
[8] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Scene Parsing with
Multiscale Feature Learning, Purity Trees, and Optimal Covers. In Proc. of the 2012 Interna-
tional Conference on Machine Learning, Edinburgh, Scotland, June 2012. 1
[9] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical
features for scene labeling. IEEE Transactions on Pattern Analysis and Machine Intelligence,
2013. In press. 1, 2.1, 3.1, 3.2, 3.3
[10] Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient graph-based image segmentation.
International Journal of Computer Vision, 59:2004, 2004. 2.1
[11] Stephen Gould, Richard Fulton, and Daphne Koller. Decomposing a Scene into Geometric
and Semantically Consistent Regions. In IEEE International Conference on Computer Vision,
2009. 1
[12] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhut-
dinov. Improving neural networks by preventing co-adaptation of feature detectors. CoRR,
abs/1207.0580, 2012. 1
[13] Navdeep Jaitly, Patrick Nguyen, Andrew Senior, and Vincent Vanhoucke. Application of pre-
trained deep neural networks to large vocabulary speech recognition. In Proceedings of Inter-
speech 2012, 2012. 1
[14] Allison Janoch, Sergey Karayev, Yangqing Jia, Jonathan T. Barron, Mario Fritz, Kate Saenko,
and Trevor Darrell. A category-level 3-d object dataset: Putting the kinect to work. In ICCV
Workshops, pages 1168–1174. IEEE, 2011. 1
[15] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278 –2324, nov 1998. 2.1
[16] Yann LeCun, Fu-Jie Huang, and Leon Bottou. Learning Methods for generic object recognition
with invariance to pose and lighting. In Proceedings of CVPR’04. IEEE, 2004. 1
[17] Ce Liu, Jenny Yuen, and Antonio Torralba. SIFT Flow: Dense Correspondence across Scenes
and its Applications. IEEE transactions on pattern analysis and machine intelligence , pages
1–17, August 2010. 1
7
[18] C. Farabet R. Collobert, K. Kavukcuoglu. Torch7: A matlab-like environment for machines
learning. In Big Learning Workshop (@ NIPS’11), Sierra Nevada, Spain, 2011. 3.1
[19] Xiaofeng Ren, Liefeng Bo, and D. Fox. Rgb-(d) scene labeling: Features and algorithms.
In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 2759
–2766, june 2012. 1
[20] Richard Socher and Brody Huval and Bharath Bhat and Christopher D. Manning and Andrew
Y . Ng. Convolutional-Recursive Deep Learning for 3D Object Classification. In Advances in
Neural Information Processing Systems 25. 2012. 1
[21] Hannes Schulz and Sven Behnke. Learning object-class segmentation with convolutional neu-
ral networks. In 11th European Symposium on Artificial Neural Networks (ESANN) , 2012.
1
[22] Nathan Silberman and Rob Fergus. Indoor scene segmentation using a structured light sensor.
In 3DRR Workshop, ICCV’11, 2011. 1
[23] Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and
support inference from rgbd images. In ECCV, 2012. 1, 3, 3.2, 2
8
|
Camille Couprie, Clement Farabet, Laurent Najman, Yann LeCun
|
Unknown
| 2,013
|
{"id": "ttnAE7vaATtaK", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358409600000, "tmdate": 1358409600000, "ddate": null, "number": 40, "content": {"title": "Indoor Semantic Segmentation using depth information", "decision": "conferenceOral-iclr2013-conference", "abstract": "This work addresses multi-class segmentation of indoor scenes with RGB-D inputs. While this area of research has gained much attention recently, most works still rely on hand-crafted features. In contrast, we apply a multiscale convolutional network to learn features directly from the images and the depth information. We obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%. We illustrate the labeling of indoor scenes in videos sequences that could be processed in real-time using appropriate hardware such as an FPGA.", "pdf": "https://arxiv.org/abs/1301.3572", "paperhash": "couprie|indoor_semantic_segmentation_using_depth_information", "keywords": [], "conflicts": [], "authors": ["Camille Couprie", "Clement Farabet", "Laurent Najman", "Yann LeCun"], "authorids": ["camille.couprie@gmail.com", "clement.farabet@gmail.com", "l.najman@esiee.fr", "ylecun@gmail.com"]}, "forum": "ttnAE7vaATtaK", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["camille.couprie@gmail.com"], "writers": []}
|
[Review]:
This work builds on recent object-segmentation work by Farabet et al., by augmenting the pixel-processing pathways with ones that processes a depth map from a Kinect RGBD camera. This work seems to me a well-motivated and natural extension now that RGBD sensors are readily available.
The incremental value of the depth channel is not entirely clear from this paper. In principle, the depth information should be valuable. However, Table 1 shows that for the majority of object types, the network that ignores depth is actually more accurate. Although the averages at the bottom of Table 1 show that depth-enhanced segmentation is slightly better, I suspect that if those averages included error bars (and they should), the difference would be insignificant. In fact, all the accuracies in Table 1 should have error bars on them. The comparisons with the work of Silberman et al. are more favorable to the proposed model, but again, the comparison would be strengthened by discussion of statistical confidence.
Qualitatively, I would have liked to see the ouput from the convolutional network of Farabet et al. without the depth channel, as a point of comparison in Figures 2 and 3. Without that point of comparison, Figures 2 and 3 are difficult to interpret as supporting evidence for the model using depth.
Pro(s)
- establishes baseline RGBD results with convolutional networks
Con(s)
- quantitative results lack confidence intervals
- qualitative results missing important comparison to non-rgbd network
|
anonymous reviewer 5193
| null | null |
{"id": "Ub0AUfEOKkRO1", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362368040000, "tmdate": 1362368040000, "ddate": null, "number": 3, "content": {"title": "review of Indoor Semantic Segmentation using depth information", "review": "This work builds on recent object-segmentation work by Farabet et al., by augmenting the pixel-processing pathways with ones that processes a depth map from a Kinect RGBD camera. This work seems to me a well-motivated and natural extension now that RGBD sensors are readily available.\r\n\r\nThe incremental value of the depth channel is not entirely clear from this paper. In principle, the depth information should be valuable. However, Table 1 shows that for the majority of object types, the network that ignores depth is actually more accurate. Although the averages at the bottom of Table 1 show that depth-enhanced segmentation is slightly better, I suspect that if those averages included error bars (and they should), the difference would be insignificant. In fact, all the accuracies in Table 1 should have error bars on them. The comparisons with the work of Silberman et al. are more favorable to the proposed model, but again, the comparison would be strengthened by discussion of statistical confidence.\r\n\r\nQualitatively, I would have liked to see the ouput from the convolutional network of Farabet et al. without the depth channel, as a point of comparison in Figures 2 and 3. Without that point of comparison, Figures 2 and 3 are difficult to interpret as supporting evidence for the model using depth.\r\n\r\nPro(s)\r\n- establishes baseline RGBD results with convolutional networks\r\n \r\nCon(s)\r\n- quantitative results lack confidence intervals\r\n- qualitative results missing important comparison to non-rgbd network"}, "forum": "ttnAE7vaATtaK", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttnAE7vaATtaK", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 5193"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 3,
"importance_and_relevance": 1,
"materials_and_methods": 7,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 3,
"suggestion_and_solution": 5,
"total": 13
}
| 1.923077
| 1.923077
| 0
| 1.954307
| 0.355382
| 0.03123
| 0.230769
| 0.230769
| 0.076923
| 0.538462
| 0.153846
| 0.076923
| 0.230769
| 0.384615
|
{
"criticism": 0.23076923076923078,
"example": 0.23076923076923078,
"importance_and_relevance": 0.07692307692307693,
"materials_and_methods": 0.5384615384615384,
"praise": 0.15384615384615385,
"presentation_and_reporting": 0.07692307692307693,
"results_and_discussion": 0.23076923076923078,
"suggestion_and_solution": 0.38461538461538464
}
| 1.923077
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
ttnAE7vaATtaK
|
Indoor Semantic Segmentation using depth information
|
This work addresses multi-class segmentation of indoor scenes with RGB-D inputs. While this area of research has gained much attention recently, most works still rely on hand-crafted features. In contrast, we apply a multiscale convolutional network to learn features directly from the images and the depth information. We obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%. We illustrate the labeling of indoor scenes in videos sequences that could be processed in real-time using appropriate hardware such as an FPGA.
|
Indoor Semantic Segmentation
using depth information
Camille Couprie1∗ Cl´ement Farabet2,3 Laurent Najman3 Yann LeCun2
1 IFP Energies Nouvelles
Technology, Computer Science and Applied Mathematics Division
Rueil Malmaison, France
2 Courant Institute of Mathematical Sciences
New York University
New York, NY 10003, USA
3 Universit´e Paris-Est
Laboratoire d’Informatique Gaspard-Monge
´Equipe A3SI - ESIEE Paris, France
Abstract
This work addresses multi-class segmentation of indoor scenes with RGB-D in-
puts. While this area of research has gained much attention recently, most works
still rely on hand-crafted features. In contrast, we apply a multiscale convolutional
network to learn features directly from the images and the depth information. We
obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%.
We illustrate the labeling of indoor scenes in videos sequences that could be pro-
cessed in real-time using appropriate hardware such as an FPGA.
1 Introduction
The recent release of the Kinect allowed many progress in indoor computer vision. Most approaches
have focused on object recognition [1, 14] or point cloud semantic labeling [2], finding their appli-
cations in robotics or games [6]. The pioneering work of Silberman et al. [22] was the first to deal
with the task of semantic full image labeling using depth information. The NYU depth v1 dataset
[22] guathers 2347 triplets of images, depth maps, and ground truth labeled images covering twelve
object categories. Most datasets employed for semantic image segmentation [11, 17] present the
objects centered into the images, under nice lightening conditions. The NYU depth dataset aims to
develop joint segmentation and classification solutions to an environment that we are likely to en-
counter in the everyday life. This indoor dataset contains scenes of offices, stores, rooms of houses
containing many occluded objects unevenly lightened. The first results [22] on this dataset were
obtained using the extraction of sift features on the depth maps in addition to the RGB images. The
depth is then used in the gradient information to refine the predictions using graph cuts. Alternative
CRF-like approaches have also been explored to improve the computation time performances [4].
The results on NYU dataset v1 have been improved by [19] using elaborate kernel descriptors and a
post-processing step that employs gPb superpixels MRFs, involving large computation times.
A second version of the NYU depth dataset was released more recently [23], and improves the
labels categorization into 894 different object classes. Furthermore, the size of the dataset did also
increase, it now contains hundreds of video sequences (407024 frames) acquired with depth maps.
Feature learning, or deep learning approaches are particularly adapted to the addition of new image
modalities such as depth information. Its recent success for dealing with various types of data is
manifest in speech recognition [13], molecular activity prediction, object recognition [12] and many
1∗ Performed the work at New York University.
1
arXiv:1301.3572v2 [cs.CV] 14 Mar 2013
more applications. In computer vision, the approach of Farabet et al. [8, 9] has been specifically
designed for full scene labeling and has proven its efficiency for outdoor scenes. The key idea is to
learn hierarchical features by the mean of a multiscale convolutional network. Training networks
using multiscales representation appeared also the same year in [3, 21].
When the depth information was not yet available, there have been attempts to use stereo image
pairs to improve the feature learning of convolutional networks [16]. Now that depth maps are easy
to acquire, deep learning approachs started to be considered for improving object recognition [20].
In this work, we suggest to adapt Farabet et al.’s network to learn more effective features for indoor
scene labeling. Our work is, to the best of our knowledge, the first exploitation of depth information
in a feature learning approach for full scene labeling.
2 Full scene labeling
2.1 Multi-scale feature extraction
Good internal representations are hierarchical. In vision, pixels are assembled into edglets, edglets
into motifs, motifs into parts, parts into objects, and objects into scenes. This suggests that recog-
nition architectures for vision (and for other modalities such as audio and natural language) should
have multiple trainable stages stacked on top of each other, one for each level in the feature hierar-
chy. Convolutional Networks [15] (ConvNets) provide a simple framework to learn such hierarchies
of features.
Convolutional Networks are trainable architectures composed of multiple stages. The input and
output of each stage are sets of arrays called feature maps. In our case, the input is a color (RGB)
image plus a depth (D) image and each feature map is a 2D array containing a color or depth channel
of the input RGBD image. At the output, each feature map represents a particular feature extracted at
all locations on the input. Each stage is composed of three layers: a filter bank layer, a non-linearity
layer, and a feature pooling layer. A typical ConvNet is composed of one, two or three such 3-layer
stages, followed by a classification module. Because they are trainable, arbitrary input modalities
can be modeled, such as the depth modality that is added to the input channel in this work.
F 3
convnet
F 1
F 2
F
f 1 ( X 1 ; /u1D6C91 )
labeling
l ( F , h ( I ))
superpixels
RGBD
Laplacian
pyramid
g ( I )
table
wall
ceiling
chair
chair
pict. pict.
f 3 ( X 3 ; /u1D6C93 )
f 2 ( X 2 ; /u1D6C92 )
Input RGB image
Input depth image
segmentation
h ( I )
Figure 1: Scene parsing (frame by frame) using a multiscale network and superpixels. The RGB
channels of the image and the depth image are transformed through a Laplacian pyramid. Each
scale is fed to a 3-stage convolutional network, which produces a set of feature maps. The feature
maps of all scales are concatenated, the coarser-scale maps being upsampled to match the size of the
finest-scale map. Each feature vector thus represents a large contextual window around each pixel.
In parallel, a single segmentation of the image into superpixels is computed to exploit the natural
contours of the image. The final labeling is obtained by the aggregation of the classifier predictions
into the superpixels.
A great gain has been achieved with the introduction of the multiscale convolutional network de-
scribed in [9]. The multi-scale, dense feature extractor produces a series of feature vectors for
regions of multiple sizes centered around every pixel in the image, covering a large context. The
2
multi-scale convolutional net contains multiple copies of a single network that are applied to differ-
ent scales of a Laplacian pyramid version of the RGBD input image.
The RGBD image is first pre-processed, so that local neighborhoods have zero mean and unit stan-
dard deviation. The depth image, given in meters, is treated as an additional channel similarly to any
color channel. The overview scheme of our model appears in Figure 1.
Beside the input image which is now including a depth channel, the parameters of the multi-scale
network (number of scales, sizes of feature maps, pooling type, etc.) are identical to [9]. The feature
maps sizes are 16,64,256, multiplied by the three scales. The size of convolutions kernels are set
to 7 by 7 at each layer, and sizes of subsampling kernels (max pooling) are 2 by 2. In our tests we
rescaled the images to the size 240 × 320.
As in [9], the feature extractor followed by a classifier was trained to minimize the negative log-
likelihood loss function. The classifier that follows feature extraction is a 2-layer multi-perceptron,
with a hidden layer of size 1024. We use superpixels [10] to smooth the convnet predictions as a
post-processing step, by agregating the classifiers predictions in each superpixel.
2.2 Movie processing
While the training is performed on single images, we are able to perform scene labeling of video
sequences. In order to improve the performances of our frame-by-frame predictions, a temporal
smoothing may be applied. In this work, instead of using the frame by frame superpixels as in the
previous section, we employ the temporal consistent superpixels of [5]. This approach works in
quasi-linear time and reduces the flickering of objects that may appear in the video sequences.
3 Results
We used for our experiments the NYU depth dataset – version 2 – of Silberman and Fergus [23],
composed of 407024 couples of RGB images and depth images. Among these images, 1449 frames
have been labeled. The object labels cover 894 categories. The dataset is provided with the original
raw depth data that contain missing values, with code using [7] to inpaint the depth images.
3.1 Validation on images
The training has been performed using the 894 categories directly as output classes. The frequencies
of object appearences have not been changed in the training process. However, we established 14
clusters of classes categories to evaluate our results more easily. The distributions of number of
pixels per class categories are given in Table 1. We used the train/test splits as provided by the
NYU depth v2 dataset, that is to say 795 training images and 654 test images. Please note that
no jitter (rotation, translations or any other transformation) was added to the dataset to gain extra
performances. However, this strategy could be employed in future work. The code consists of Lua
scripts using the Torch machine learning software [18] available online athttp://www.torch.ch/ .
To evaluate the influence of the addition of depth information, we trained a multiscale convnet only
on the RGB channels, and another network using the additional depth information. Both networks
were trained until the achievement of their best performances, that is to say for 105 epochs and 98
epochs respectively, taking less than 2 days on a regular server.
We report in Table 1 two different performance measures:
• the “classwise accuracy”, counting the number of correctly classified pixels divided by the
number of false positive, averaged for each class. This number corresponds to the mean of
the confusion matrix diagonal.
• the “pixelwise accuracy”, counting the number of correctly classified pixels divided by the
total number of pixels of the test data.
We observe that considerable gains (15% or more) are achieved for the classes ’floor’, ’ceiling’,
and ’furniture’. This result makes a lot of sense since these classes are characterized by a somehow
constant appearance of their depth map. Objects such as TV , table, books can either be located in
3
Ground truths
Results using the Multiscale Convnet
Results using the Multiscale Convnet with depth information
wall
bed
books
ceiling
chair
floor
furniture
pict./deco
sofa
table
object
window
TV
uknw
Ground truths
Depth maps
Results using the Multiscale Convnet
Results using the Multiscale Convnet with depth information
Figure 2: Some scene labelings using our Multiscale Convolutional Network trained on RGB and
RGBD images. We observe in Table 1 that adding depth information helps to recognize objects that
have low intra-class variance of depth appearance.
the foreground as well as in the background of images. On the contrary, the floor and ceiling will
almost always lead to a depth gradient always oriented in the same direction: Since the dataset has
been collected by a person holding a kinect device at a his chest, floors and ceiling are located at
a distance that does not vary to much through the dataset. Figure 2 provides examples of depth
4
Class Multiscale MultiScl. Cnet
Occurrences Convnet Acc. [9] +depth Acc.
bed 4.4% 30.3 38.1
objects 7.1 % 10.9 8.7
chair 3.4% 44.4 34.1
furnit. 12.3% 28.5 42.4
ceiling 1.4% 33.2 62.6
floor 9.9% 68.0 87.3
deco. 3.4% 38.5 40.4
sofa 3.2% 25.8 24.6
table 3.7% 18.0 10.2
wall 24.5% 89.4 86.1
window 5.1% 37.8 15.9
books 2.9% 31.7 13.7
TV 1.0% 18.8 6.0
unkn. 17.8% - -
Avg. Class Acc. - 35.8 36.2
Pixel Accuracy (mean) - 51.0 52.4
Pixel Accuracy (median) - 51.7 52.9
Pixel Accuracy (std. dev.) - 15.2 15.2
Table 1: Class occurrences in the test set – Performances per class and per pixel.
maps that illustrate these observations. Overall, improvements induced by the depth information
exploitation are present. In the next section, these improvements are more apparent.
3.2 Comparison with Silberman et al.
In order to compare our results to the state-of-the-art on the NYU depth v2 dataset, we adopted a
different selection of outputs instead of the 14 classes employed in the previous section. The work
of Silberman et al. [23] defines the four semantic classes Ground, Furniture, Props and Structure.
This class selection is adopted in [23] to use semantic labelings of scenes to infer support relations
between objects. We recall that the recognition of the semantic categories is performed in [23] by
the definition of diverse features including SIFT features, histograms of surface normals, 2D and 3D
bounding box dimensions, color histograms, and relative depth.
Ground Furniture Props Structure Class Acc. Pixel Acc.
Silberman et al.[23] 68 70 42 59 59.6 58.6
Multiscale convnet [9] 68.1 51.1 29.9 87.8 59.2 63.0
Multiscale+depth convnet 87.3 45.3 35.5 86.1 63.5 64.5
Table 2: Accuracy of the multiscale convnet compared with the state-of-the-art approach of [23].
As reported in Table 2, the results achieved using the Multiscale convnet are improving the structure
class predictions, resulting in a 4% gain in pixelwise accuracy over Silberman et al. approach.
Adding the depth information results in a considerable improvement of the ground prediction, and
performs also better over the other classes, achieving a 4% gain in classwise accuracy over previous
works and improves by almost 6% the pixelwise accuracy compared to Silberman et al.’s results.
We note that the class ’furniture’ in the 4-classes evaluation is different than the ’furniture’ class
of the 14-classes evaluation. The furniture-4 class encompasses chairs and beds but not desks, and
cabinets for example, explaining a drop of performances here using the depth information.
5
3.3 Test on videos
The NYU v2 depth dataset contains several hundreds of video sequences encompassing 26 different
classes of indoor scenes, going from bedrooms to basements, and dining rooms to book stores.
Unfortunately, no ground truth is yet available to evaluate our performances on this video. Therefore,
we only present here some illustrations of the capacity of our model to label these scenes.
The predictions are computed frame by frame on the videos and are refined using temporally
smoothed superpixels using [5]. Two examples of results on sequences are shown at Figure 3.
A great advantage of our approach is its nearly real time capabilities. Processing a 320x240 frame
takes 0.7 seconds on a laptop [9]. The temporal smoothing only requires an additional 0.1s per
frame.
(a) Output of the Multiscale convnet trained using depth information - frame by frame
(b) Results smoothed temporally using [5]
Props
Floor
Structure
Wall
(c) Output of the Multiscale convnet trained using depth information - frame by frame
(d) Results smoothed temporally using [5]
Figure 3: Some results on video sequences of the NYU v2 depth dataset. Note that results (c,d)
could be improved by using more training examples. Indeed, only a very small number in the
labeled training examples exhibit a wall in the foreground.
4 Conclusion
Feature learning is a particularly satisfying strategy to adopt when approaching a dataset that con-
tains new image (or other kind of data) modalities. Our model, while being faster and more efficient
than previous approaches, is easier to implement without the need to design specific features adapted
to depth information. Different clusterings of object classes as the ones used in this work may be
chosen, reflecting this work’s flexibility of applications. For example, using the 4-classes clustering,
the accurate results achieved with the multi-scale convolutional network could be applied to perform
inference on support relations between objects. Improvements for specific object recognition could
further be achieved by filtering the frequency of the training objects. We observe that the recog-
nition of object classes having similar depth appearance and location is improved when using the
depth information. On the contrary, it is better to use only RGB information to recognize objects
with classes containing high variability of their depth maps. This observation could be used to com-
bine the best results in function of the application. Finally, a number of techniques (unsupervised
6
feature learning, MRF smoothing of the convnet predictions, extension of the training set) would
probably help to improve the present system.
5 Acknowledgments
We would like to thank Nathan Silberman for his useful input for handling the NYU depth v2 dataset,
and fruitful discussions.
References
[1] B3do: Berkeley 3-d object dataset. http://kinectdata.com/. 1
[2] Cornell-rgbd-dataset. http://pr.cs.cornell.edu/sceneunderstanding/data/data.php. 1
[3] Dan Claudiu Ciresan, Alessandro Giusti, Luca Maria Gambardella, and J ¨urgen Schmidhuber.
Deep neural networks segment neuronal membranes in electron microscopy images. In NIPS,
pages 2852–2860, 2012. 1
[4] Camille Couprie. Multi-label energy minimization for object class segmentation. In 20th
European Signal Processing Conference 2012 (EUSIPCO 2012), Bucharest, Romania, August
2012. 1
[5] Camille Couprie, Cl ´ement Farabet, and Yann LeCun. Causal graph-based video segmentation,
2013. arXiv:1301.1671. 2.2, 3.3
[6] L. Cruz, D. Lucio, and L. Velho. Kinect and rgbd images: Challenges and applications. SIB-
GRAPI Tutorial, 2012. 1
[7] Anat Levin Dani, Dani Lischinski, and Yair Weiss. Colorization using optimization. ACM
Transactions on Graphics, 23:689–694, 2004. 3
[8] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Scene Parsing with
Multiscale Feature Learning, Purity Trees, and Optimal Covers. In Proc. of the 2012 Interna-
tional Conference on Machine Learning, Edinburgh, Scotland, June 2012. 1
[9] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical
features for scene labeling. IEEE Transactions on Pattern Analysis and Machine Intelligence,
2013. In press. 1, 2.1, 3.1, 3.2, 3.3
[10] Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient graph-based image segmentation.
International Journal of Computer Vision, 59:2004, 2004. 2.1
[11] Stephen Gould, Richard Fulton, and Daphne Koller. Decomposing a Scene into Geometric
and Semantically Consistent Regions. In IEEE International Conference on Computer Vision,
2009. 1
[12] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhut-
dinov. Improving neural networks by preventing co-adaptation of feature detectors. CoRR,
abs/1207.0580, 2012. 1
[13] Navdeep Jaitly, Patrick Nguyen, Andrew Senior, and Vincent Vanhoucke. Application of pre-
trained deep neural networks to large vocabulary speech recognition. In Proceedings of Inter-
speech 2012, 2012. 1
[14] Allison Janoch, Sergey Karayev, Yangqing Jia, Jonathan T. Barron, Mario Fritz, Kate Saenko,
and Trevor Darrell. A category-level 3-d object dataset: Putting the kinect to work. In ICCV
Workshops, pages 1168–1174. IEEE, 2011. 1
[15] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278 –2324, nov 1998. 2.1
[16] Yann LeCun, Fu-Jie Huang, and Leon Bottou. Learning Methods for generic object recognition
with invariance to pose and lighting. In Proceedings of CVPR’04. IEEE, 2004. 1
[17] Ce Liu, Jenny Yuen, and Antonio Torralba. SIFT Flow: Dense Correspondence across Scenes
and its Applications. IEEE transactions on pattern analysis and machine intelligence , pages
1–17, August 2010. 1
7
[18] C. Farabet R. Collobert, K. Kavukcuoglu. Torch7: A matlab-like environment for machines
learning. In Big Learning Workshop (@ NIPS’11), Sierra Nevada, Spain, 2011. 3.1
[19] Xiaofeng Ren, Liefeng Bo, and D. Fox. Rgb-(d) scene labeling: Features and algorithms.
In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 2759
–2766, june 2012. 1
[20] Richard Socher and Brody Huval and Bharath Bhat and Christopher D. Manning and Andrew
Y . Ng. Convolutional-Recursive Deep Learning for 3D Object Classification. In Advances in
Neural Information Processing Systems 25. 2012. 1
[21] Hannes Schulz and Sven Behnke. Learning object-class segmentation with convolutional neu-
ral networks. In 11th European Symposium on Artificial Neural Networks (ESANN) , 2012.
1
[22] Nathan Silberman and Rob Fergus. Indoor scene segmentation using a structured light sensor.
In 3DRR Workshop, ICCV’11, 2011. 1
[23] Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and
support inference from rgbd images. In ECCV, 2012. 1, 3, 3.2, 2
8
|
Camille Couprie, Clement Farabet, Laurent Najman, Yann LeCun
|
Unknown
| 2,013
|
{"id": "ttnAE7vaATtaK", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358409600000, "tmdate": 1358409600000, "ddate": null, "number": 40, "content": {"title": "Indoor Semantic Segmentation using depth information", "decision": "conferenceOral-iclr2013-conference", "abstract": "This work addresses multi-class segmentation of indoor scenes with RGB-D inputs. While this area of research has gained much attention recently, most works still rely on hand-crafted features. In contrast, we apply a multiscale convolutional network to learn features directly from the images and the depth information. We obtain state-of-the-art on the NYU-v2 depth dataset with an accuracy of 64.5%. We illustrate the labeling of indoor scenes in videos sequences that could be processed in real-time using appropriate hardware such as an FPGA.", "pdf": "https://arxiv.org/abs/1301.3572", "paperhash": "couprie|indoor_semantic_segmentation_using_depth_information", "keywords": [], "conflicts": [], "authors": ["Camille Couprie", "Clement Farabet", "Laurent Najman", "Yann LeCun"], "authorids": ["camille.couprie@gmail.com", "clement.farabet@gmail.com", "l.najman@esiee.fr", "ylecun@gmail.com"]}, "forum": "ttnAE7vaATtaK", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["camille.couprie@gmail.com"], "writers": []}
|
[Review]:
This work applies convolutional neural networks to the task of RGB-D indoor scene segmentation. The authors previously evaulated the same multi-scale conv net architecture on the data using only RGB information, this work demonstrates that for most segmentation classes providing depth information to the conv net increases performance.
The model simply adds depth as a separate channel to the existing RGB channels in a conv net. Depth has some unique properties e.g. infinity / missing values depending on the sensor. It would be nice to see some consideration or experiments on how to properly integrate depth data into the existing model.
The experiments demonstrate that a conv net using depth information is competitive on the datasets evaluated. However, it is surprising that the model leveraging depth is not better in all cases. Discussion on where the RGB-D model fails to outperform the RGB only model would be a great contribution to add. This is especially apparent in table 1. Does this suggest that depth isn't always useful, or that there could be better ways to leverage depth data?
Minor notes:
'modalityies' misspelled on page 1
Overall:
- A straightforward application of conv nets to RGB-D data, yielding fairly good results
- More discussion on why depth fails to improve performance compared to an RGB only model would strengthen the experimental findings
|
anonymous reviewer 03ba
| null | null |
{"id": "2-VeRGGdvD-58", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362213660000, "tmdate": 1362213660000, "ddate": null, "number": 2, "content": {"title": "review of Indoor Semantic Segmentation using depth information", "review": "This work applies convolutional neural networks to the task of RGB-D indoor scene segmentation. The authors previously evaulated the same multi-scale conv net architecture on the data using only RGB information, this work demonstrates that for most segmentation classes providing depth information to the conv net increases performance. \r\n\r\nThe model simply adds depth as a separate channel to the existing RGB channels in a conv net. Depth has some unique properties e.g. infinity / missing values depending on the sensor. It would be nice to see some consideration or experiments on how to properly integrate depth data into the existing model. \r\n\r\nThe experiments demonstrate that a conv net using depth information is competitive on the datasets evaluated. However, it is surprising that the model leveraging depth is not better in all cases. Discussion on where the RGB-D model fails to outperform the RGB only model would be a great contribution to add. This is especially apparent in table 1. Does this suggest that depth isn't always useful, or that there could be better ways to leverage depth data?\r\n\r\n\r\nMinor notes:\r\n'modalityies' misspelled on page 1\r\n\r\nOverall:\r\n- A straightforward application of conv nets to RGB-D data, yielding fairly good results\r\n- More discussion on why depth fails to improve performance compared to an RGB only model would strengthen the experimental findings"}, "forum": "ttnAE7vaATtaK", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "ttnAE7vaATtaK", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 03ba"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 2,
"importance_and_relevance": 1,
"materials_and_methods": 9,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 2,
"suggestion_and_solution": 4,
"total": 12
}
| 1.833333
| 1.817551
| 0.015782
| 1.862878
| 0.332823
| 0.029545
| 0.083333
| 0.166667
| 0.083333
| 0.75
| 0.166667
| 0.083333
| 0.166667
| 0.333333
|
{
"criticism": 0.08333333333333333,
"example": 0.16666666666666666,
"importance_and_relevance": 0.08333333333333333,
"materials_and_methods": 0.75,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0.08333333333333333,
"results_and_discussion": 0.16666666666666666,
"suggestion_and_solution": 0.3333333333333333
}
| 1.833333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
I want to say thanks again to the conference organizers, reviewers and openreview.net developers for doing a great job.
I have updated the code on my webpage to include two additional features: max norm weight clipping and training deep autoencoders. Autoencoder training uses symmetric encoding / decoding and supports denoising and L2 penalties.
|
Ryan Kiros
| null | null |
{"id": "nYshYtAXG48ze", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1364786880000, "tmdate": 1364786880000, "ddate": null, "number": 1, "content": {"title": "", "review": "I want to say thanks again to the conference organizers, reviewers and openreview.net developers for doing a great job.\r\n\r\nI have updated the code on my webpage to include two additional features: max norm weight clipping and training deep autoencoders. Autoencoder training uses symmetric encoding / decoding and supports denoising and L2 penalties."}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ryan Kiros"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 2,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 1,
"total": 3
}
| 1.666667
| 0.088424
| 1.578243
| 1.671209
| 0.139383
| 0.004542
| 0
| 0
| 0.333333
| 0.666667
| 0.333333
| 0
| 0
| 0.333333
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0.3333333333333333,
"materials_and_methods": 0.6666666666666666,
"praise": 0.3333333333333333,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.3333333333333333
}
| 1.666667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
I have submitted an updated version to arxiv and should appear shortly. My apologies for the delay. From the suggestion of reviewer 0a71 I've renamed the paper to 'Training Neural Networks with Dropout Stochastic Hessian-Free Optimization'.
|
Ryan Kiros
| null | null |
{"id": "mm_3mNH6nD4hc", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363601400000, "tmdate": 1363601400000, "ddate": null, "number": 4, "content": {"title": "", "review": "I have submitted an updated version to arxiv and should appear shortly. My apologies for the delay. From the suggestion of reviewer 0a71 I've renamed the paper to 'Training Neural Networks with Dropout Stochastic Hessian-Free Optimization'."}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ryan Kiros"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 1,
"total": 3
}
| 0.333333
| -1.24491
| 1.578243
| 0.33576
| 0.074372
| 0.002427
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.3333333333333333
}
| 0.333333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
Dear reviewers,
To better account for the mentioned weaknesses of the paper, I've re-implemented SHF with GPU compatibility and evaluated the algorithm on the CURVES and MNIST deep autoencoder tasks. I'm using the same setup as in Chapter 7 of Ilya Sutskever's PhD thesis, which allows for comparison against SGD, HF, Nesterov's accelerated gradient and momentum methods. I'm going to make one final update to the paper before the conference to include these new results.
|
Ryan Kiros
| null | null |
{"id": "lcfIcbYPqX3P7", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1367022720000, "tmdate": 1367022720000, "ddate": null, "number": 5, "content": {"title": "", "review": "Dear reviewers,\r\n\r\nTo better account for the mentioned weaknesses of the paper, I've re-implemented SHF with GPU compatibility and evaluated the algorithm on the CURVES and MNIST deep autoencoder tasks. I'm using the same setup as in Chapter 7 of Ilya Sutskever's PhD thesis, which allows for comparison against SGD, HF, Nesterov's accelerated gradient and momentum methods. I'm going to make one final update to the paper before the conference to include these new results."}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ryan Kiros"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 2,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 1,
"total": 3
}
| 1.333333
| -0.24491
| 1.578243
| 1.339503
| 0.116827
| 0.00617
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0.333333
| 0.333333
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.6666666666666666,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0.3333333333333333,
"suggestion_and_solution": 0.3333333333333333
}
| 1.333333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
Summary and general overview:
----------------------------------------------
The paper tries to explore an online regime for Hessian Free as well as using drop outs. The new method is called Stochastic Hessian Free and is tested on a few datasets (MNIST, USPS and Reuters).
The approach is interesting and it is a direction one might need to consider in order to scale to very large datasets.
Questions:
---------------
(1) An aesthetic point. Stochastic Hessian Free does not seem as a suitable name for the algorithm, as it does not mention the use of drop outs. I think scaling to a stochastic regime is an orthogonal issue to using drop outs, so maybe Drop-out Stochastic Hessian Free would be more suitable, or something rather, that makes the reader aware of the use of drop-outs.
(2) Page 1, first paragraph. Is not clear to me that SGD scales well for large data. There are indications that SGD could suffer, for e.g., from under-fitting issues (see [1]) or early over-fitting (see [2]). I'm not saying you are wrong, you are probably right, just that the sentence you use seems a bit strong and we do not yet have evidence that SGD scales well to very large datasets, especially without the help of things like drop-outs (which might help with early-overfitting or other phenomena).
(3) Page 1, second paragraph. Is not clear to me that HF does not do well for classification. Is there some proof for this somewhere? For e.g. in [3] a Hessian Free like approach seem to do well on classification (note that the results are presented for Natural Gradient, but the paper shows that Hessian Free is Natural Gradient due to the use of Generalized Gauss-Newton matrix).
(4) Page 3, paragraph after the formula. R-operator is only needed to compute the product of the generalized Gauss-Newton approximation of the Hessian with some vector `v`. The product between the Hessian and some vector 'v' can easily be computed as d sum((dC/dW)*v)/dW (i.e. without using the R-op).
(5) Page 4, third paragraph. I do not understand what you mean when you talk about the warm initialization of CG (or delta-momentum as you call it). What does it mean that hat{M}_ heta is positive ? Why is that bad? I don't understand what this decay you use is suppose to do? Are you trying to have some middle ground between starting CG from 0 and starting CG from the previous found solution? I feel a more detailed discussion is needed in the paper.
(6) Page 4, last paragraph. Why does using the same batch size for the gradient and for computing the curvature results in lambda going to 0? Is not obvious to me. Is it some kind of over-fitting effect? If it is just an observation you made through empirical experimentation, just say so, but the wording makes it sound like you expect this behaviour due to some intuitions you have.
(7) Page 5, section 4.3. I feel that the affirmation that drop-outs do not require early stopping is too strong. I feel the evidence is too weak at the moment for this to be a statement. For one thing, eta_e goes exponentially fast to 0. eta_e scales the learning rate, and it might be the reason you do not easily over-fit (when you reach epoch 50 or so you are using a extremely small learning rate). I feel is better to make this as an observation. Also could you maybe say something about this decaying learning rate, is my understanding of eta_e correct?
(8) I feel a important comparison would be between your version of stochastic HF with drop-outs vs stochastic HF (without the drop outs) vs just HF. From the plots you give, I'm not sure what is the gain from going stochastic, nor is it clear to me that drop outs are important. You seem to have the set-up to run this additional experiments easily.
Small corrections:
--------------------------
Page 1, paragraph 1, 'salable` -> 'scalable'
Page 2, last paragraph. You wrote : 'B is a curvature matrix suc as the Hessian'. The curvature of a function `f` at theta is the Hessian (there is no choice) and there is only one curvature for a given function and theta. There are different approximations of the Hessian (and hence you have a choice on B) but not different curvatures. I would write only 'B is an approximation of the curvature matrix` or `B is the Hessian`.
References:
[1] Yann N. Dauphin, Yoshua Bengio, Big Neural Networks Waste Capacity, arXiv:1301.3583
[2] Dumitru Erhan, Yoshua Bengio, Aaron Courville, Pierre-Antoine Manzagol, Pascal Vincent and Samy Bengio, Why Does Unsupervised Pre-training Help Deep Learning? (2010), in: Journal of Machine Learning Research, 11(625--660)
[3] Razvan Pascanu, Yoshua Bengio, Natural Gradient Revisited, arXiv:1301.3584
|
anonymous reviewer 0a71
| null | null |
{"id": "gehZgYtw_1v8S", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362161760000, "tmdate": 1362161760000, "ddate": null, "number": 6, "content": {"title": "review of Training Neural Networks with Stochastic Hessian-Free Optimization", "review": "Summary and general overview:\r\n----------------------------------------------\r\nThe paper tries to explore an online regime for Hessian Free as well as using drop outs. The new method is called Stochastic Hessian Free and is tested on a few datasets (MNIST, USPS and Reuters). \r\nThe approach is interesting and it is a direction one might need to consider in order to scale to very large datasets. \r\n\r\nQuestions:\r\n---------------\r\n(1) An aesthetic point. Stochastic Hessian Free does not seem as a suitable name for the algorithm, as it does not mention the use of drop outs. I think scaling to a stochastic regime is an orthogonal issue to using drop outs, so maybe Drop-out Stochastic Hessian Free would be more suitable, or something rather, that makes the reader aware of the use of drop-outs.\r\n\r\n(2) Page 1, first paragraph. Is not clear to me that SGD scales well for large data. There are indications that SGD could suffer, for e.g., from under-fitting issues (see [1]) or early over-fitting (see [2]). I'm not saying you are wrong, you are probably right, just that the sentence you use seems a bit strong and we do not yet have evidence that SGD scales well to very large datasets, especially without the help of things like drop-outs (which might help with early-overfitting or other phenomena). \r\n\r\n(3) Page 1, second paragraph. Is not clear to me that HF does not do well for classification. Is there some proof for this somewhere? For e.g. in [3] a Hessian Free like approach seem to do well on classification (note that the results are presented for Natural Gradient, but the paper shows that Hessian Free is Natural Gradient due to the use of Generalized Gauss-Newton matrix).\r\n\r\n(4) Page 3, paragraph after the formula. R-operator is only needed to compute the product of the generalized Gauss-Newton approximation of the Hessian with some vector `v`. The product between the Hessian and some vector 'v' can easily be computed as d sum((dC/dW)*v)/dW (i.e. without using the R-op).\r\n \r\n(5) Page 4, third paragraph. I do not understand what you mean when you talk about the warm initialization of CG (or delta-momentum as you call it). What does it mean that hat{M}_\theta is positive ? Why is that bad? I don't understand what this decay you use is suppose to do? Are you trying to have some middle ground between starting CG from 0 and starting CG from the previous found solution? I feel a more detailed discussion is needed in the paper. \r\n\r\n(6) Page 4, last paragraph. Why does using the same batch size for the gradient and for computing the curvature results in lambda going to 0? Is not obvious to me. Is it some kind of over-fitting effect? If it is just an observation you made through empirical experimentation, just say so, but the wording makes it sound like you expect this behaviour due to some intuitions you have.\r\n \r\n(7) Page 5, section 4.3. I feel that the affirmation that drop-outs do not require early stopping is too strong. I feel the evidence is too weak at the moment for this to be a statement. For one thing, \beta_e goes exponentially fast to 0. \beta_e scales the learning rate, and it might be the reason you do not easily over-fit (when you reach epoch 50 or so you are using a extremely small learning rate). I feel is better to make this as an observation. Also could you maybe say something about this decaying learning rate, is my understanding of \beta_e correct? \r\n \r\n(8) I feel a important comparison would be between your version of stochastic HF with drop-outs vs stochastic HF (without the drop outs) vs just HF. From the plots you give, I'm not sure what is the gain from going stochastic, nor is it clear to me that drop outs are important. You seem to have the set-up to run this additional experiments easily. \r\n \r\nSmall corrections:\r\n--------------------------\r\nPage 1, paragraph 1, 'salable` -> 'scalable'\r\nPage 2, last paragraph. You wrote : 'B is a curvature matrix suc as the Hessian'. The curvature of a function `f` at theta is the Hessian (there is no choice) and there is only one curvature for a given function and theta. There are different approximations of the Hessian (and hence you have a choice on B) but not different curvatures. I would write only 'B is an approximation of the curvature matrix` or `B is the Hessian`.\r\n\r\nReferences: \r\n[1] Yann N. Dauphin, Yoshua Bengio, Big Neural Networks Waste Capacity, arXiv:1301.3583\r\n[2] Dumitru Erhan, Yoshua Bengio, Aaron Courville, Pierre-Antoine Manzagol, Pascal Vincent and Samy Bengio, Why Does Unsupervised Pre-training Help Deep Learning? (2010), in: Journal of Machine Learning Research, 11(625--660)\r\n[3] Razvan Pascanu, Yoshua Bengio, Natural Gradient Revisited, arXiv:1301.3584"}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 0a71"], "writers": ["anonymous"]}
|
{
"criticism": 10,
"example": 10,
"importance_and_relevance": 1,
"materials_and_methods": 16,
"praise": 2,
"presentation_and_reporting": 14,
"results_and_discussion": 9,
"suggestion_and_solution": 10,
"total": 48
}
| 1.5
| -17.833476
| 19.333476
| 1.557268
| 0.544843
| 0.057268
| 0.208333
| 0.208333
| 0.020833
| 0.333333
| 0.041667
| 0.291667
| 0.1875
| 0.208333
|
{
"criticism": 0.20833333333333334,
"example": 0.20833333333333334,
"importance_and_relevance": 0.020833333333333332,
"materials_and_methods": 0.3333333333333333,
"praise": 0.041666666666666664,
"presentation_and_reporting": 0.2916666666666667,
"results_and_discussion": 0.1875,
"suggestion_and_solution": 0.20833333333333334
}
| 1.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
Thank you for your comments!
To Anonymous 0a71:
---------------------------------
(1,8): I agree. Indeed, it is straightforward to add an additional experiment without the use of dropout. At the least, the experimental section can be modified to indicate whether the method is using dropout or not instead of simply referring to 'stochastic HF'.
(2): Fair point. It would be interesting trying this method out in a similar experimental setting as [R1]. Perhaps it may give some insight on the paper's hypothesis that the optimization is the culprit to underfitting.
(3): Correct me if I'm wrong but the only classification results of HF I'm aware of are from [R2] in comparison with Krylov subspace decent, not including methods that refer to themselves as natural gradient. Minibatch overfitting in batch HF is problematic and discussed in detail in [R5], pg 50. Given the development of [R3], the introduction could be modified to include additional discussion regarding the relationship with natural gradient and classification settings.
(5): Section 4.5 of [R4] discusses the benefits of non-zero CG initializations. In batch HF, it's completely reasonable to fix gamma throughout training (James uses 0.95). This is problematic in stochastic HF due to such a small number of CG iterations. Given a non-zero CG initialization and a near-one gamma, hat{M}_ heta may be more likely to remain positive after CG and assuming f_k - f_{k-1} < 0, means that the reduction ratio will be negative and thus lambda will be increased to compensate. This is not necessarily a bad thing, although if it happens too frequently the algorithm will began to behave more like SGD (and in some cases the linesearch will reject the step). Setting gamma to some smaller initial value and incrementing at each epoch, based on empirical performance, allows for near-one delta values late in training without negating the reduction ratio. I refer the reader to pg.28 and pg.39 in [R5], which give further motivation and discussion on these topics.
(6): Using the same batches for gradients and curvature have some theoretical advantages (see section 12.1, pg.48 of [R5] for derivations). While lambda -> 0 is indeed an empirical observation, James and Ilya also report similar behaviour for shorter CG runs (although longer than what I use) using the same batches for gradients and curvature (pg.54 of [R5]). Within the proposed stochastic setting, having lambda -> 0 doesn't make too much sense to me (at least for non-convex f). It could allow for much more aggressive steps which may or may not be problematic given how small the curvature minibatches are. One solution is to simply increase the batch sizes, although this was something I was intending to avoid.
(7): The motivation behind eta_e was to help achieve more stable training over the stochastic networks induced using dropout. You are probably right that 'not requiring early stopping' is way too strong of a statement.
To Anonymous 4709:
---------------------------------
Due to the additional complexity of HF compared to SGD, I attempted to make my available (Matlab) code as easy as possible to read and follow through in order to understand and reproduce the key features of the method.
While an immediate advantage of stochastic HF is not requiring tuning learning rate schedules, I think it is also a promising approach in further investigating the effects of overfitting and underfitting with optimization in neural nets, as [R1] motivates. The experimental evaluation does not attack this particular problem, as the goal was to make sure stochastic HF was at least competitive with SGD dropout on standard benchmarks. This to me was necessary to justify further experimentation.
There is no comparison with the results of [R4] since the goal of the paper was to focus on classification (and [R4] only trains on deep autoencoders). Future work includes extending to other architectures, as discussed in the conclusion.
I mention on pg. 7 that the per epoch update times were similar to SGD dropout (I realize this is not particularly rigorous).
In regards to evaluating each of the modifications, I had hoped that the discussion was enough to convey the importance of each design choice. I realize now that there might have been too much assumption of information discussed in [R5]. These details will be made clear in the updated version of the paper with appropriate references.
To Anonymous f834:
--------------------------------
- Thanks for the reference clarifications. In regards to classification tasks, see (3) in my response to Anonymous 0a71.
- Indeed, much of the motivation of the algorithm, particularly the momentum interpretation, came from studying [R5] which expands on HF concepts in significantly more detail then the first publications allowed for. I will be sure to make this more clear in the relevant sections of the paper.
- I agree that not comparing against other adaptive methods is a weakness and discussed this briefly in the conclusion. To accommodate for this, I tried to use an SGD implementation that would at least be as competitive (dropout, max-norm weight clipping with large initial rates, momentum and learning rate schedules). Weight clipping was also shown to improve SGD dropout, at least on MNIST [R6].
- Unfortunately, I don't have too much more insight on the behaviour of lambda though it appears to be quite consistent. The large initial decrease is likely to come from conservative initialization of lambda which works well as a default.
- I did not test on deeper nets largely due to time constraints (it made more sense to me to start on shallower networks then to 'jump the gun' and go straight for very deep nets) . Should I not have done this? As alluded to in the conclusion, I wouldn't be expecting any significant gain on these datasets (perhaps I'm wrong here). It would be cool to try on some speech data where deeper nets have made big improvements but I haven't worked with speech before. Reuters didn't use hidden layers due to the high dimensionality of the inputs (~19000 log word count features). Applying this to RNNs is a work in progress.
----------------------------------------------
To summarize (modifications for the paper update):
- include additional references
- add results for stochastic HF with no dropout
- some additional discussion on the relationship with natural gradient (and classification results)
- better detail section 4, including additional references to [R5]
These modifications will be made by the start of next week (March 11).
One additional comment: after looking over [R6], I realized the MNIST dropout SGD results (~110 errors) were due to a combination of dropout and the max-norm weight clipping and not just dropout alone. I have recently been exploring using weight clipping with stochastic HF and it is advantageous to include it. This is because it allows one to start training with smaller lambda values, likely in the same sense as it allows SGD to start with larger learning rates. I will be updating the code shortly to include this option.
[R1] Yann N. Dauphin, Yoshua Bengio, Big Neural Networks Waste Capacity, arXiv:1301.3583
[R2] O. Vinyals and D. Povey. Krylov subspace descent for deep learning. arXiv:1111.4259, 2011
[R3] Razvan Pascanu, Yoshua Bengio, Natural Gradient Revisited, arXiv:1301.3584
[R4] J. Martens. Deep learning via hessian-free optimization. In ICML 2010.
[R5] J. Martens and I. Sutskever. Training deep and recurrent networks with hessian-free optimization. Neural Networks: Tricks of the Trade, pages 479–535, 2012.
[R6] N. Srivastava. Improving Neural Networks with Dropout. Master's thesis, University of Toronto, 2013.
|
Ryan Kiros
| null | null |
{"id": "av7x0igQwD0M-", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362494640000, "tmdate": 1362494640000, "ddate": null, "number": 8, "content": {"title": "", "review": "Thank you for your comments! \r\n\r\nTo Anonymous 0a71:\r\n---------------------------------\r\n\r\n(1,8): I agree. Indeed, it is straightforward to add an additional experiment without the use of dropout. At the least, the experimental section can be modified to indicate whether the method is using dropout or not instead of simply referring to 'stochastic HF'.\r\n\r\n(2): Fair point. It would be interesting trying this method out in a similar experimental setting as [R1]. Perhaps it may give some insight on the paper's hypothesis that the optimization is the culprit to underfitting.\r\n\r\n(3): Correct me if I'm wrong but the only classification results of HF I'm aware of are from [R2] in comparison with Krylov subspace decent, not including methods that refer to themselves as natural gradient. Minibatch overfitting in batch HF is problematic and discussed in detail in [R5], pg 50. Given the development of [R3], the introduction could be modified to include additional discussion regarding the relationship with natural gradient and classification settings.\r\n\r\n(5): Section 4.5 of [R4] discusses the benefits of non-zero CG initializations. In batch HF, it's completely reasonable to fix gamma throughout training (James uses 0.95). This is problematic in stochastic HF due to such a small number of CG iterations. Given a non-zero CG initialization and a near-one gamma, hat{M}_\theta may be more likely to remain positive after CG and assuming f_k - f_{k-1} < 0, means that the reduction ratio will be negative and thus lambda will be increased to compensate. This is not necessarily a bad thing, although if it happens too frequently the algorithm will began to behave more like SGD (and in some cases the linesearch will reject the step). Setting gamma to some smaller initial value and incrementing at each epoch, based on empirical performance, allows for near-one delta values late in training without negating the reduction ratio. I refer the reader to pg.28 and pg.39 in [R5], which give further motivation and discussion on these topics.\r\n\r\n(6): Using the same batches for gradients and curvature have some theoretical advantages (see section 12.1, pg.48 of [R5] for derivations). While lambda -> 0 is indeed an empirical observation, James and Ilya also report similar behaviour for shorter CG runs (although longer than what I use) using the same batches for gradients and curvature (pg.54 of [R5]). Within the proposed stochastic setting, having lambda -> 0 doesn't make too much sense to me (at least for non-convex f). It could allow for much more aggressive steps which may or may not be problematic given how small the curvature minibatches are. One solution is to simply increase the batch sizes, although this was something I was intending to avoid.\r\n\r\n(7): The motivation behind \beta_e was to help achieve more stable training over the stochastic networks induced using dropout. You are probably right that 'not requiring early stopping' is way too strong of a statement.\r\n\r\n\r\nTo Anonymous 4709:\r\n---------------------------------\r\n\r\nDue to the additional complexity of HF compared to SGD, I attempted to make my available (Matlab) code as easy as possible to read and follow through in order to understand and reproduce the key features of the method.\r\n\r\nWhile an immediate advantage of stochastic HF is not requiring tuning learning rate schedules, I think it is also a promising approach in further investigating the effects of overfitting and underfitting with optimization in neural nets, as [R1] motivates. The experimental evaluation does not attack this particular problem, as the goal was to make sure stochastic HF was at least competitive with SGD dropout on standard benchmarks. This to me was necessary to justify further experimentation.\r\n\r\nThere is no comparison with the results of [R4] since the goal of the paper was to focus on classification (and [R4] only trains on deep autoencoders). Future work includes extending to other architectures, as discussed in the conclusion.\r\n\r\nI mention on pg. 7 that the per epoch update times were similar to SGD dropout (I realize this is not particularly rigorous). \r\n\r\nIn regards to evaluating each of the modifications, I had hoped that the discussion was enough to convey the importance of each design choice. I realize now that there might have been too much assumption of information discussed in [R5]. These details will be made clear in the updated version of the paper with appropriate references.\r\n\r\n\r\nTo Anonymous f834:\r\n--------------------------------\r\n\r\n- Thanks for the reference clarifications. In regards to classification tasks, see (3) in my response to Anonymous 0a71.\r\n\r\n- Indeed, much of the motivation of the algorithm, particularly the momentum interpretation, came from studying [R5] which expands on HF concepts in significantly more detail then the first publications allowed for. I will be sure to make this more clear in the relevant sections of the paper.\r\n\r\n- I agree that not comparing against other adaptive methods is a weakness and discussed this briefly in the conclusion. To accommodate for this, I tried to use an SGD implementation that would at least be as competitive (dropout, max-norm weight clipping with large initial rates, momentum and learning rate schedules). Weight clipping was also shown to improve SGD dropout, at least on MNIST [R6]. \r\n\r\n- Unfortunately, I don't have too much more insight on the behaviour of lambda though it appears to be quite consistent. The large initial decrease is likely to come from conservative initialization of lambda which works well as a default.\r\n\r\n- I did not test on deeper nets largely due to time constraints (it made more sense to me to start on shallower networks then to 'jump the gun' and go straight for very deep nets) . Should I not have done this? As alluded to in the conclusion, I wouldn't be expecting any significant gain on these datasets (perhaps I'm wrong here). It would be cool to try on some speech data where deeper nets have made big improvements but I haven't worked with speech before. Reuters didn't use hidden layers due to the high dimensionality of the inputs (~19000 log word count features). Applying this to RNNs is a work in progress.\r\n\r\n\r\n----------------------------------------------\r\n\r\nTo summarize (modifications for the paper update):\r\n- include additional references\r\n- add results for stochastic HF with no dropout\r\n- some additional discussion on the relationship with natural gradient (and classification results)\r\n- better detail section 4, including additional references to [R5]\r\n\r\nThese modifications will be made by the start of next week (March 11).\r\n\r\n\r\nOne additional comment: after looking over [R6], I realized the MNIST dropout SGD results (~110 errors) were due to a combination of dropout and the max-norm weight clipping and not just dropout alone. I have recently been exploring using weight clipping with stochastic HF and it is advantageous to include it. This is because it allows one to start training with smaller lambda values, likely in the same sense as it allows SGD to start with larger learning rates. I will be updating the code shortly to include this option.\r\n\r\n\r\n[R1] Yann N. Dauphin, Yoshua Bengio, Big Neural Networks Waste Capacity, arXiv:1301.3583\r\n[R2] O. Vinyals and D. Povey. Krylov subspace descent for deep learning. arXiv:1111.4259, 2011\r\n[R3] Razvan Pascanu, Yoshua Bengio, Natural Gradient Revisited, arXiv:1301.3584\r\n[R4] J. Martens. Deep learning via hessian-free optimization. In ICML 2010.\r\n[R5] J. Martens and I. Sutskever. Training deep and recurrent networks with hessian-free optimization. Neural Networks: Tricks of the Trade, pages 479\u2013535, 2012.\r\n[R6] N. Srivastava. Improving Neural Networks with Dropout. Master's thesis, University of Toronto, 2013."}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ryan Kiros"], "writers": ["anonymous"]}
|
{
"criticism": 8,
"example": 10,
"importance_and_relevance": 4,
"materials_and_methods": 35,
"praise": 3,
"presentation_and_reporting": 13,
"results_and_discussion": 15,
"suggestion_and_solution": 15,
"total": 66
}
| 1.560606
| -42.772239
| 44.332845
| 1.653209
| 0.858625
| 0.092603
| 0.121212
| 0.151515
| 0.060606
| 0.530303
| 0.045455
| 0.19697
| 0.227273
| 0.227273
|
{
"criticism": 0.12121212121212122,
"example": 0.15151515151515152,
"importance_and_relevance": 0.06060606060606061,
"materials_and_methods": 0.5303030303030303,
"praise": 0.045454545454545456,
"presentation_and_reporting": 0.19696969696969696,
"results_and_discussion": 0.22727272727272727,
"suggestion_and_solution": 0.22727272727272727
}
| 1.560606
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
This paper makes an attempt at extending the Hessian-free learning work to a stochastic setting. In a nutshell, the changes are:
- shorter CG runs
- cleverer information sharing across CG runs that has an annealing effect
- using differently-sized mini-batches for gradient and curvature estimation (former sizes being larger)
- Using a slightly modified damping schedule for lamdba than Martens' LM criteria, which encourages fewer oscillations.
Another contribution of the paper is the integration of dropouts into stochastic HF in a sensible way. The authors also include an exponentially-decaying momentum-style term into the parameter updates.
The authors present but do not discuss results on the Reuters dataset (which seem good). There is also no comparison with the results from [4], which to me would be a natural thing to compare to.
All in all, a series of interesting tricks for making HF work in a stochastic regime, but there are many questions which are unanswered. I would have liked to see more discussion *and* experiments that show which of the individual changes that the author makes are responsible for the good performance. There is also no discussion on the time it takes the stochastic HF method to make on step / go through one epoch / reach a certain error.
SGD dropout is a very competitive method because it's fantastically simple to implement (compared to HF, which is orders of magnitude more complicated), so I'm not yet convinced by the insights of this paper that stochastic HF is worth implementing (though it seems easy to do if one has an already-running HF system).
|
anonymous reviewer 4709
| null | null |
{"id": "UJZtu0oLtcJh1", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362391800000, "tmdate": 1362391800000, "ddate": null, "number": 2, "content": {"title": "review of Training Neural Networks with Stochastic Hessian-Free Optimization", "review": "This paper makes an attempt at extending the Hessian-free learning work to a stochastic setting. In a nutshell, the changes are:\r\n\r\n- shorter CG runs\r\n- cleverer information sharing across CG runs that has an annealing effect\r\n- using differently-sized mini-batches for gradient and curvature estimation (former sizes being larger)\r\n- Using a slightly modified damping schedule for lamdba than Martens' LM criteria, which encourages fewer oscillations.\r\n\r\nAnother contribution of the paper is the integration of dropouts into stochastic HF in a sensible way. The authors also include an exponentially-decaying momentum-style term into the parameter updates.\r\n\r\nThe authors present but do not discuss results on the Reuters dataset (which seem good). There is also no comparison with the results from [4], which to me would be a natural thing to compare to.\r\n\r\nAll in all, a series of interesting tricks for making HF work in a stochastic regime, but there are many questions which are unanswered. I would have liked to see more discussion *and* experiments that show which of the individual changes that the author makes are responsible for the good performance. There is also no discussion on the time it takes the stochastic HF method to make on step / go through one epoch / reach a certain error. \r\n\r\nSGD dropout is a very competitive method because it's fantastically simple to implement (compared to HF, which is orders of magnitude more complicated), so I'm not yet convinced by the insights of this paper that stochastic HF is worth implementing (though it seems easy to do if one has an already-running HF system)."}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 4709"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 0,
"importance_and_relevance": 3,
"materials_and_methods": 6,
"praise": 2,
"presentation_and_reporting": 0,
"results_and_discussion": 4,
"suggestion_and_solution": 1,
"total": 10
}
| 2
| 1.857958
| 0.142042
| 2.019264
| 0.232016
| 0.019264
| 0.4
| 0
| 0.3
| 0.6
| 0.2
| 0
| 0.4
| 0.1
|
{
"criticism": 0.4,
"example": 0,
"importance_and_relevance": 0.3,
"materials_and_methods": 0.6,
"praise": 0.2,
"presentation_and_reporting": 0,
"results_and_discussion": 0.4,
"suggestion_and_solution": 0.1
}
| 2
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
This paper looks at designing an SGD-like version of the 'Hessian-free' (HF) optimization approach which is applied to training shallow to moderately deep neural nets for classification tasks. The approach consists of the usual HF algorithm, but with smaller minibatches and with CG terminated after only 3-5 iterations. As advocated in [20], more careful attention is paid to the 'momentum-constant' gamma.
It is somewhat interesting to see a very data intensive method like HF made 'lighter' and more SGD-like, since this could perhaps provide benefits unique to both HF and SGD, but it's not clear to me from the experiments if there really is an advantage over variants of SGD that would perform some kind of automatic adaptation of learning rates (or even a fixed schedule!). The amount of novelty in the paper isn't particularly high since many of these ideas have been proposed before ([20]), although perhaps in less extreme or less developed forms.
Pros:
- takes the well-known approach HF in a different (if not entirely novel) direction
- seems to achieves performance competitive with versions of SGD used in [3] with dropout
Cons:
- experiments don't look at particularly deep models and aren't very thorough
- comparisons to other versions of SGD are absent (this is my primary issue with the paper)
----
The introduction and related work section should probably clarify that HF is an instance of the more general family of methods sometimes known as 'truncated-Newton methods'.
In the introduction, when you state: 'HF has not been as successful for classification tasks', is this based on your personal experience, particularly negative results in other papers, or lack of positive results in other papers?
Missing from your review are papers that look at the performance of pure stochastic gradient descent applied to learning deep networks, such as [15] did, and the paper by Glorot and Bengio from AISTATS 2010. Also, [18] only used L-BFGS to perform 'fine-tuning' after an initial layer-wise pre-training pass.
When discussing the generalized Gauss-Newton matrix you should probably cite [7].
In section 4.1, it seems like a big oversimplification to say that the stopping criterion and overall convergence rate of CG depend on mostly on the damping parameter lambda. Surely other things matter too, like the current setting of the parameters (which determine the local geometry of the error surface). A high value of lambda may be a sufficient condition, but surely not a necessary one for CG to quickly converge. Moreover, missing from the story presenting in this section is the fact that lambda *must* decrease if the method is to ever behave like a reasonable approximation of a Newton-type method.
The momentum interpretation discussed in the middle of section 4, and overall the algorithm discussed in this paper, sounds similar to ideas discussed in [20] (which were perhaps not fully explored there). Also, a maximum iteration for CG is was used in the original HF paper (although it only appeared in the implementation, and was later discussed in [20]). This should be mentioned.
Could you provide a more thorough explanation of why lambda seems to shrink, then grow, as optimization proceeds? The explanation in 4.2 seems vague/incomplete.
The networks trained seem pretty shallow (especially Reuters, which didn't use any hidden layers). Is there a particular reason why you didn't make them deeper? e.g. were deeper networks overfitting more, or perhaps underfitting due to optimization problems, or simply not providing any significant advantage for some other reasons? SGD is already known to be hard to beat for these kinds of not-very-deep classification nets, and while it seems plausible that the much more SGD-like HF which you are proposing would have some advantage in terms of automatic selection of learning rates, it invites comparison to other methods which do this kind of learning rate tuning more directly (some of which you even discuss in the paper). The lack of these kinds of comparisons seems like a serious weakness of the paper.
And how important to your results was the use of this 'delta-momentum' with the particular schedule of values for gamma that you used? Since this behaves somewhat like a regular momentum term, did you also try using momentum in your SGD implementation to make the comparison more fair?
The experiments use drop-out, but comparisons to implementations that don't use drop-out, or use some other kind of regularization instead (like L2) are noticeably absent. In order understand what the effect of drop-out is versus the optimization method in these models it is important to see this.
I would have been interested to see how well the proposed method would work when applied to very deep nets or RNNs, where HF is thought to have an advantage that is perhaps more significant/interesting than what could be achieved with well tuned learning rates.
|
anonymous reviewer f834
| null | null |
{"id": "TF3miswPCQiau", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362400260000, "tmdate": 1362400260000, "ddate": null, "number": 3, "content": {"title": "review of Training Neural Networks with Stochastic Hessian-Free Optimization", "review": "This paper looks at designing an SGD-like version of the 'Hessian-free' (HF) optimization approach which is applied to training shallow to moderately deep neural nets for classification tasks. The approach consists of the usual HF algorithm, but with smaller minibatches and with CG terminated after only 3-5 iterations. As advocated in [20], more careful attention is paid to the 'momentum-constant' gamma.\r\n\r\nIt is somewhat interesting to see a very data intensive method like HF made 'lighter' and more SGD-like, since this could perhaps provide benefits unique to both HF and SGD, but it's not clear to me from the experiments if there really is an advantage over variants of SGD that would perform some kind of automatic adaptation of learning rates (or even a fixed schedule!). The amount of novelty in the paper isn't particularly high since many of these ideas have been proposed before ([20]), although perhaps in less extreme or less developed forms. \r\n\r\n\r\nPros:\r\n- takes the well-known approach HF in a different (if not entirely novel) direction\r\n- seems to achieves performance competitive with versions of SGD used in [3] with dropout\r\nCons:\r\n- experiments don't look at particularly deep models and aren't very thorough\r\n- comparisons to other versions of SGD are absent (this is my primary issue with the paper)\r\n\r\n----\r\n\r\n\r\nThe introduction and related work section should probably clarify that HF is an instance of the more general family of methods sometimes known as 'truncated-Newton methods'.\r\n\r\nIn the introduction, when you state: 'HF has not been as successful for classification tasks', is this based on your personal experience, particularly negative results in other papers, or lack of positive results in other papers?\r\n\r\nMissing from your review are papers that look at the performance of pure stochastic gradient descent applied to learning deep networks, such as [15] did, and the paper by Glorot and Bengio from AISTATS 2010. Also, [18] only used L-BFGS to perform 'fine-tuning' after an initial layer-wise pre-training pass. \r\n\r\nWhen discussing the generalized Gauss-Newton matrix you should probably cite [7].\r\n\r\nIn section 4.1, it seems like a big oversimplification to say that the stopping criterion and overall convergence rate of CG depend on mostly on the damping parameter lambda. Surely other things matter too, like the current setting of the parameters (which determine the local geometry of the error surface). A high value of lambda may be a sufficient condition, but surely not a necessary one for CG to quickly converge. Moreover, missing from the story presenting in this section is the fact that lambda *must* decrease if the method is to ever behave like a reasonable approximation of a Newton-type method.\r\n\r\nThe momentum interpretation discussed in the middle of section 4, and overall the algorithm discussed in this paper, sounds similar to ideas discussed in [20] (which were perhaps not fully explored there). Also, a maximum iteration for CG is was used in the original HF paper (although it only appeared in the implementation, and was later discussed in [20]). This should be mentioned.\r\n\r\nCould you provide a more thorough explanation of why lambda seems to shrink, then grow, as optimization proceeds? The explanation in 4.2 seems vague/incomplete.\r\n\r\nThe networks trained seem pretty shallow (especially Reuters, which didn't use any hidden layers). Is there a particular reason why you didn't make them deeper? e.g. were deeper networks overfitting more, or perhaps underfitting due to optimization problems, or simply not providing any significant advantage for some other reasons? SGD is already known to be hard to beat for these kinds of not-very-deep classification nets, and while it seems plausible that the much more SGD-like HF which you are proposing would have some advantage in terms of automatic selection of learning rates, it invites comparison to other methods which do this kind of learning rate tuning more directly (some of which you even discuss in the paper). The lack of these kinds of comparisons seems like a serious weakness of the paper.\r\n\r\nAnd how important to your results was the use of this 'delta-momentum' with the particular schedule of values for gamma that you used? Since this behaves somewhat like a regular momentum term, did you also try using momentum in your SGD implementation to make the comparison more fair?\r\n\r\nThe experiments use drop-out, but comparisons to implementations that don't use drop-out, or use some other kind of regularization instead (like L2) are noticeably absent. In order understand what the effect of drop-out is versus the optimization method in these models it is important to see this.\r\n\r\nI would have been interested to see how well the proposed method would work when applied to very deep nets or RNNs, where HF is thought to have an advantage that is perhaps more significant/interesting than what could be achieved with well tuned learning rates."}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f834"], "writers": ["anonymous"]}
|
{
"criticism": 11,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 22,
"praise": 0,
"presentation_and_reporting": 6,
"results_and_discussion": 13,
"suggestion_and_solution": 6,
"total": 30
}
| 1.966667
| -2.594456
| 4.561122
| 2.020166
| 0.51684
| 0.053499
| 0.366667
| 0
| 0.033333
| 0.733333
| 0
| 0.2
| 0.433333
| 0.2
|
{
"criticism": 0.36666666666666664,
"example": 0,
"importance_and_relevance": 0.03333333333333333,
"materials_and_methods": 0.7333333333333333,
"praise": 0,
"presentation_and_reporting": 0.2,
"results_and_discussion": 0.43333333333333335,
"suggestion_and_solution": 0.2
}
| 1.966667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
tFbuFKWX3MFC8
|
Training Neural Networks with Stochastic Hessian-Free Optimization
|
Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.
|
arXiv:1301.3641v3 [cs.LG] 1 May 2013
T raining Neural Networks with Stochastic
Hessian-Free Optimization
Ryan Kiros
Department of Computing Science
University of Alberta
Edmonton, AB, Canada
rkiros@ualberta.ca
Abstract
Hessian-free (HF) optimization has been successfully used for training deep au-
toencoders and recurrent networks. HF uses the conjugate gr adient algorithm to
construct update directions through curvature-vector pro ducts that can be com-
puted on the same order of time as gradients. In this paper we exploit this property
and study stochastic HF with gradient and curvature mini-batches independent of
the dataset size. We modify Martens’ HF for these settings and integrate dropout,
a method for preventing co-adaptation of feature detectors, to guard against over-
fitting. Stochastic Hessian-free optimization gives an int ermediary between SGD
and HF that achieves competitive performance on both classi fication and deep
autoencoder experiments.
1 Introduction
Stochastic gradient descent (SGD) has become the most popul ar algorithm for training neural net-
works. Not only is SGD simple to implement but its noisy updat es often leads to solutions that are
well-adapt to generalization on held-out data [1]. Furthermore, SGD operates on small mini-batches
potentially allowing for scalable training on large datase ts. For training deep networks, SGD can
be used for fine-tuning after layerwise pre-training [2] whi ch overcomes many of the difficulties
of training deep networks. Additionally, SGD can be augment ed with dropout [3] as a means of
preventing overfitting.
There has been recent interest in second-order methods for t raining deep networks, partially due
to the successful adaptation of Hessian-free (HF) by [4], an instance of the more general family
of truncated Newton methods. Second-order methods operate in batch settings with less but more
substantial weight updates. Furthermore, computing gradi ents and curvature information on large
batches can easily be distributed across several machines.Martens’ HF was able to successfully train
deep autoencoders without the use of pre-training and was later used for solving several pathological
tasks in recurrent networks [5].
HF iteratively proposes update directions using the conjug ate gradient algorithm, requiring only
curvature-vector products and not an explicit computationof the curvature matrix. Curvature-vector
products can be computed on the same order of time as it takes t o compute gradients with an addi-
tional forward and backward pass through the function’s com putational graph [6, 7]. In this paper
we exploit this property and introduce stochastic Hessian-free optimization (SHF), a variation of HF
that operates on gradient and curvature mini-batches indep endent of the dataset size. Our goal in
developing SHF is to combine the generalization advantagesof SGD with second-order information
from HF. SHF can adapt its behaviour through the choice of bat ch size and number of conjugate
gradient iterations, for which its behaviour either become s more characteristic of SGD or HF. Ad-
ditionally we integrate dropout, as a means of preventing co -adaptation of feature detectors. We
1
perform experimental evaluation on both classification and deep autoencoder tasks. For classifica-
tion, dropout SHF is competitive with dropout SGD on all task s considered while for autoencoders
SHF performs comparably to HF and momentum-based methods. M oreover, no tuning of learning
rates needs to be done.
2 Related work
Much research has been investigated into developing adaptive learning rates or incorporating second-
order information into SGD. [8] proposed augmenting SGD wit h a diagonal approximation of the
Hessian while Adagrad [9] uses a global learning rate while d ividing by the norm of previous gra-
dients in its update. SGD with Adagrad was shown to be benefici al in training deep distributed
networks for speech and object recognition [10]. To complet ely avoid tuning learning rates, [11]
considered computing rates as to minimize estimates of the e xpectation of the loss at any one time.
[12] proposed SGD-QN for incorporating a quasi-Newton appr oximation to the Hessian into SGD
and used this to win one of the 2008 PASCAL large scale learning challenge tracks. Recently, [13]
provided a relationship between HF, Krylov subspace descent and natural gradient due to their use
of the Gauss-Newton curvature matrix. Furthermore, [13] ar gue that natural gradient is robust to
overfitting as well as the order of the training samples. Othe r methods incorporating the natural
gradient such as TONGA [14] have also showed promise on speeding up neural network training.
Analyzing the difficulty of training deep networks was done b y [15], proposing a weight initial-
ization that demonstrates faster convergence. More recent ly, [16] argue that large neural networks
waste capacity in the sense that adding additional units fail to reduce underfitting on large datasets.
The authors hypothesize the SGD is the culprit and suggest exploration with stochastic natural gra-
dient or stochastic second-order methods. Such results fur ther motivate our development of SHF.
[17] show that with careful attention to the parameter initi alization and momentum schedule, first-
order methods can be competitive with HF for training deep au toencoders and recurrent networks.
We compare against these methods in our autoencoder evaluation.
Related to our work is that of [18], who proposes a dynamic adj ustment of gradient and curvature
mini-batches for HF with convex losses based on variance est imations. Unlike our work, the batch
sizes used are dynamic with a fixed ratio and are initialized a s a function of the dataset size. Other
work on using second-order methods for neural networks include [19] who proposed using the Jacobi
pre-conditioner for HF, [20] using HF to generate text in recurrent networks and [21] who explored
training with Krylov subspace descent (KSD). Unlike HF, KSD could be used with Hessian-vector
products but requires additional memory to store a basis for the Krylov subspace. L-BFGS has
also been successfully used in fine-tuning pre-trained deep autoencoders, convolutional networks
[22] and training deep distributed networks [10]. Other dev elopments and detailed discussion of
gradient-based methods for neural networks is described in [23].
3 Hessian-free optimization
In this section we review Hessian-free optimization, large ly following the implementation of
Martens [4]. We refer the reader to [24] for detailed development and tips for using HF.
We consider unconstrained minimization of a function f : Rn →R with respect to parameters θ.
More specifically, we assume f can be written as a composition f(θ) = L(F (θ)) where L is a
convex loss function and F (θ) is the output of a neural network with ℓ non-input layers. We will
mostly focus on the case when f is non-convex. Typically L is chosen to be a matching loss to
a corresponding transfer function p(z) = p(F (θ)). For a single input, the (i + 1) -th layer of the
network is expressed as
yi+1 = si(Wi yi + bi) (1)
where si is a transfer function, Wi is the weights connecting layersi and i + 1 and bi is a bias vector.
Common transfer functions include the sigmoid si(x) = (1 + exp(−x))−1, the hyperbolic tangent
si(x) = tanh(x) and rectified linear units si(x) = max(x, 0). In the case of classification tasks, the
2
loss function used is the generalized cross entropy and softmax transfer
L(p(z), t) = −
k∑
j=1
tj log(p(zj)), p (zj) = exp(zj )/
k∑
l=1
exp(zl) (2)
where k is the number of classes, t is a target vector and zj the j-th component of output vector z.
Consider a local quadratic approximation Mθ(δ) of f around θ:
f(θ + δ) ≈Mθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT Bδ (3)
where ∇f(θ) is the gradient of f and B is the Hessian or an approximation to the Hessian. If f
was convex, then B ⪰ 0 and equation 3 exhibits a minimum δ∗. In Newton’s method, θk+1, the
parameters at iteration k + 1, are updated as θk+1 = θk + αkδ∗
k where αk ∈[0, 1] is the rate and δ∗
k
is computed as
δ∗
k = −B−1∇f(θk−1) (4)
for which calculation requires O(n3) time and thus often prohibitive. Hessian-free optimizatio n
alleviates this by using the conjugate gradient (CG) algorithm to compute an approximate minimizer
δk. Specifically, CG minimizes the quadratic objective q(δ) given by
q(δ) = 1
2 δT Bδ + ∇f(θk−1)T δ (5)
for which the corresponding minimizer of q(δ) is −B−1∇f(θk−1). The motivation for using CG
is as follows: while computing B is expensive, compute the product Bv for some vector v can be
computed on the same order of time as it takes to compute ∇f(θk−1) using the R-operator [6].
Thus CG can efficiently compute an iterative solution to the l inear system Bδk = −∇(f(θk−1))
corresponding to a new update direction δk.
When f is non-convex, the Hessian may not be positive semi-definiteand thus equation 3 no longer
has a well defined minimum. Following Martens, we instead use the generalized Gauss-newton
matrix defined as B = JT L
′′
J where J is the Jacobian of f and L
′′
is the Hessian of L 1. So long
as f(θ) = L(F (θ)) for convex L then B ⪰ 0. Given a vector v, the product Bv = JT L
′′
Jv is
computed successively by first computing Jv , then L
′′
(Jv ) and finally JT (L
′′
Jv ) [7]. To compute
Jv , we utilize the R-operator. The R-operator of F (θ) with respect to v is defined as
Rv{F (θ)}= lim
ǫ→0
F (θ + ǫv) −F (θ)
ǫ = Jv (6)
Computing Rv{F (θ)}in a neural network is easily done using a forward pass by computing Rv{yi}
for each layer output yi. More specifically,
Rv{yi+1}= Rv{Wi yi + bi}s′
i = ( v(Wi)yi + v(bi) + WiR{yi})s′
i (7)
where v(Wi) is the components of v corresponding to parameters between layers i and i + 1 and
R{y1}= 0 (where y1 is the input data). In order to compute JT (L
′′
Jv ), we simply apply back-
propagation but using the vector L
′′
Jv instead of ∇L as is usually done to compute ∇f. Thus, Bv
may be computed through a forward and backward pass in the same sense that L and ∇f = JT ∇L
are.
As opposed to minimizing equation3, Martens instead uses an additional damping parameterλ with
damped quadratic approximation
ˆMθ(δ) = f(θ) + ∇f(θ)T δ + 1
2δT ˆBδ = f(θ) + ∇f(θ)T δ + 1
2δT (B + λI)δ (8)
Damping the quadratic through λ gives a measure of how conservative the quadratic approximation
is. A large value of λ is more conservative and as λ →∞ updates become similar to stochastic
gradient descent. Alternatively, a small λ allows for more substantial parameter updates especially
1While an abuse of definition, we still refer to “curvature-ve ctor products” and “curvature batches” even
when B is used.
3
along low curvature directions. Martens dynamically adjusts λ at each iteration using a Levenberg-
Marquardt style update based on computing the reduction ratio
ρ = ( f(θ + δ) −f(θ))/(Mθ(δ) −Mθ(0)) (9)
If ρ is sufficiently small or negative, λ is increased while if ρ is large then λ is decreased. The
number of CG iterations used to compute δ has a dramatic effect on ρ which is further discussed in
section 4.1.
To accelerate CG, Martens makes use of the diagonal pre-conditioner
P =
[
diag
( m∑
j=1
∇f(j)(θ) ⊙∇f(j)(θ)
)
+ λI
]ξ
(10)
where f(j)(θ) is the value off for datapoint j and ⊙denotes component-wise multiplication. P can
be easily computed on the same backward pass as computing ∇f.
Finally, two backtracking methods are used: one after optim izing CG to select δ and the other a
backtracking linesearch to compute the rate α. Both these methods operate in the standard way,
backtracking through proposals until the objective no longer decreases.
4 Stochastic Hessian-free optimization
Martens’ implementation utilizes the full dataset for computing objective values and gradients, and
mini-batches for computing curvature-vector products. Na ively setting both batch sizes to be small
causes several problems. In this section we describe these p roblems and our contributions in modi-
fying Martens’ original algorithm to this setting.
4.1 Short CG runs, δ-momentum and use of mini-batches
The CG termination criteria used by Martens is based on a measure of relative progress in optimizing
ˆMθ. Specifically, if xj is the solution at CG iteration j, then training is terminated when
ˆMθ(xj ) − ˆMθ(xj−k )
ˆMθ(xj )
< ǫ (11)
where k =max(10, j/10) and ǫ is a small positive constant. The effect of this stopping cri teria
has a dependency on the strength of the damping parameter λ, among other attributes such as the
current parameter settings. For sufficiently large λ, CG only requires 10-20 iterations when a pre-
conditioner is used. As λ decreases, more iterations are required to account for path ological curva-
ture that can occur in optimizing f and thus leads to more expensive CG iterations. Such behavio r
would be undesirable in a stochastic setting where preferen ce would be put towards having equal
length CG iterations throughout training. To account for this, we fix the number of CG iterations to
be only 3-5 across training for classification and 25-50 for training deep autoencoders. Let ζ denote
this cut-off. Setting a limit on the number of CG iterations i s used by [4] and [20] and also has a
damping effect, since the objective function and quadraticapproximation will tend to diverge as CG
iterations increase [24]. We note that due to the shorter num ber of CG runs, the iterates from each
solution are used during the CG backtracking step.
A contributor to the success of Martens’ HF is the use of infor mation sharing across iterations.
At iteration k, CG is initialized to be the previous solution of CG from iter ation k −1, with a
small decay. For the rest of this work, we denote this as δ-momentum. δ-momentum helps correct
proposed update directions when the quadratic approximati on varies across iterations, in the same
sense that momentum is used to share gradients. This momentu m interpretation was first suggested
by [24] in the context of adapting HF to a setting with short CG runs. Unfortunately, the use of δ-
momentum becomes challenging when short CG runs are used. Given a non-zero CG initialization,
ˆMθ may be more likely to remain positive after terminating CG and assuming f(θ + δ) −f(θ) < 0,
means that the reduction ratio will be negative and thus λ will be increased to compensate. While
this is not necessarily unwanted behavior, having this occu r too frequently will push SHF to be
too conservative and possibly result in the backtracking li nesearch to reject proposed updates. Our
4
solution is to utilize a schedule on the amount of decay used o n the CG starting solution. This is
motivated by [24] suggesting more attention on the CG decay in the setting of using short CG runs.
Specifically, if δ0
k is the initial solution to CG at iteration k, then
δ0
k = γeδζ
k−1, γ e = min(1.01γe−1, .99) (12)
where γe is the decay at epoch e, δ0
1 = 0 and γ1 = 0 .5. While in batch training a fixed γ is suitable,
in a stochastic setting it is unlikely that a global decay par ameter is sufficient. Our schedule has an
annealing effect in the sense that γ values near 1 are feasible late in training even with only 3-5 CG
iterations, a property that is otherwise hard to achieve. Th is allows us to benefit from sharing more
information across iterations late in training, similar to that of a typical momentum method.
A remaining question to consider is how to set the sizes of the gradient and curvature mini-batches.
[24] discuss theoretical advantages to utilizing the same m ini-batches for computing the gradient
and curvature vector products. In our setting, this may lead to some difficulties. Using same-sized
batches allows λ →0 during training [24]. Unfortunately, this can become incom patible with our
short hard-limit on the number of CG iterations, since CG req uires more work to optimize ˆMθ
when λ approaches zero. To account for this, on classification task s where 3-5 CG iterations are
used, we opt to use gradient mini-batches that are 5-10 times larger than curvature mini-batches.
For deep autoencoder tasks where more CG iterations are used , we instead set both gradient and
curvature batches to be the same size. The behavior of λ is dependent on whether or not dropout
is used during training. Figure 1 demonstrates the behavior of λ during classification training with
and without the use of dropout. With dropout, λ no longer converges to 0 but instead plummets,
rises and flattens out. In both settings, λ does not decrease substantially as to negatively effect the
proposed CG solution and consequently the reduction ratio. Thus, the amount of work required by
CG remains consistent late in training. The other benefit to using larger gradient batches is to account
for the additional computation in computing curvature-vec tor products which would make training
longer if both mini-batches were small and of the same size. In [4], the gradients and objectives are
computed using the full training set throughout the algorit hm, including during CG backtracking
and the backtracking linesearch. We utilize the gradient mini-batch for the current iteration in order
to compute all necessary gradient and objectives throughout the algorithm.
4.2 Levenberg-Marquardt damping
Martens makes use of the following Levenberg-Marquardt style damping criteria for updating λ:
ifρ > 3
4, λ ←2
3λ elseifρ < 1
4, λ ←3
2 λ (13)
which given a suitable initial value will converge to zero as training progresses. We observed that
the above damping criteria is too harsh in the stochastic set ting in the sense that λ will frequently
oscillate, which is sensible given the size of the curvature mini-batches. We instead opt for a much
softer criterion, for which lambda is updated as
ifρ > 3
4, λ ← 99
100λ elseifρ < 1
4, λ ←100
99 λ (14)
This choice, although somewhat arbitrary, is consistently effective. Thus reduction ratio values
computed from curvature mini-batches will have less overall influence on the damping strength.
4.3 Integrating dropout
Dropout is a recently proposed method for improving the training of neural networks. During train-
ing, each hidden unit is omitted with a probability of 0.5 alo ng with optionally omitting input fea-
tures similar to that of a denoising autoencoder [25]. Dropo ut can be viewed in two ways. By
randomly omitting feature detectors, dropout prevents co-adaptation among detectors which can im-
prove generalization accuracy on held-out data. Secondly, dropout can be seen as a type of model
averaging. At test time, outgoing weights are halved. If we consider a network with a single hidden
layer and k feature detectors, using the mean network at test time corresponds to taking the geomet-
ric average of 2k networks with shared weights. Dropout is integrated in stochastic HF by randomly
omitting feature detectors on both gradient and curvature m ini-batches from the last hidden layer
5
0 100 200 300 400 5000
0.2
0.4
0.6
0.8
1
Epoch
lambda
0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Epoch
lambda
Figure 1: Values of the damping strength λ during training of MNIST (left) and USPS (right) with
and without dropout using λ = 1 for classification. When dropout is included, the damping strength
initially decreases followed by a steady increase over time.
during each iteration. Since we assume that the curvature mi ni-batches are a subset of the gradient
mini-batches, the same feature detectors are omitted in both cases.
Since the curvature estimates are noisy, it is important to c onsider the stability of updates when
different stochastic networks are used in each computation . The weight updates in dropout SGD
are augmented with momentum not only for stability but also t o speed up learning. Specifically, at
iteration k the parameter update is given by
∆ θk = pk∆ θk−1 −(1 −pk)αk⟨∇f⟩, θ k = θk−1 + ∆ θk (15)
where pk and ak are the momentum and learning rate, respectively. We incorp orate an additional
exponential decay term βe when performing parameter updates. Specifically, each parameter update
is computed as
θk = θk−1 + βeαkδk, β e = cβe−1 (16)
where c ∈(0, 1] is a fixed parameter chosen by the user. Incorporating βe into the updates, along
with the use of δ-momentum, leads to more stable updates and fine convergence particularly when
dropout is integrated during training.
4.4 Algorithm
Pseudo-code for one iteration of our implementation of stochastic Hessian-free is presented. Given
a gradient minibatch Xg
k and curvature minibatch Xc
k, we first sample dropout units (if applicable)
for the inputs and last hidden layer of the network. These take the form of a binary vector, which are
multiplied component-wise by the activations yi. In our pseudo-code, CG (δ0
k, ∇f, P, ζ ) is used to
denote applying CG with initial solution δ0
k, gradient ∇f, pre-conditioner P and ζ iterations. Note
that, when computing δ-momentum, the ζ-th solution in iteration k −1 is used as opposed to the
solution chosen via backtracking. Given the objectivesfk−1 computed with θ and fk computed with
θ + δk, the reduction ratio ρ is calculated utilizing the un-damped quadratic approximation Mθ(δk).
This allows updating λ using the Levenberg-Marquardt style damping. Finally, a backtracking line-
search with at most ω steps is performed to compute the rate and serves as a last def ense against
potentially poor update directions.
Since curvature mini-batches are sampled from a subset of the gradient mini-batch, it is then sensible
to utilize different curvature mini-batches on different epochs. Along with cycling through gradient
mini-batches during each epoch, we also cycle through curvature subsets everyh epochs, where h is
the size of the gradient mini-batches divided by the size of the curvature mini-batches. For example,
if the gradient batch size is 1000 and the curvature batch siz e is 100, then curvature mini-batch
sampling completes a full cycle every 1000/100 = 10 epochs.
Finally, one simple way to speed up training as indicated in [ 24], is to cache the activations when
initially computing the objective fk. While each iteration of CG requires computing a curvature-
vector product, the network parameters are fixed during CG an d is thus wasteful to re-compute the
network activations on each iteration.
6
Algorithm 1 Stochastic Hessian-Free Optimization
Xg
k ←gradient minibatch, Xc
k ←curvature minibatch, |Xg
k |= h|Xc
k|, h ∈Z+
Sample dropout units for inputs and last hidden layer
if start of new epoch then
γe ←min(1.01γe−1, .99) {δ-momentum}
end if
δ0
k ←γeδζ
k−1
fk−1 ←f(Xg
k ; θ), ∇f ←∇f(Xg
k ; θ), P ←Precon(Xg
k ; θ)
Solve (B + λI)δk = −∇f using CG(δ0
k, ∇f, P, ζ ) {Using Xc
k to compute Bδk}
fk ←f(Xg
k ; θ + δk) {CG backtracking}
for j = ζ - 1 to 1 do
f(θ + δj
k) ←f(Xg
k ; θ + δj
k)
if f(θ + δj
k) < f k then
fk ←f(θ + δj
k), δk ←δj
k
end if
end for
ρ ←(fk −fk−1)/(1
2 δT
k Bδk + ∇fT δk) {Using Xc
k to compute Bδk}
if ρ < . 25, λ ←1.01λ elseif ρ > . 75, λ ←.99λ end if
αk ←1, j ←0 {Backtracking linesearch}
while j < ω do
if fk > f k−1 + .01αk∇fT δk then αk ←.8αk, j ←j + 1 else break end if
end while
θ ←θ + βeαkδk, k ←k + 1 {Parameter update}
5 Experiments
We perform experimental evaluation on both classification a nd deep autoencoder tasks. The goal
of classification experiments is to determine the effective ness of SHF on test error generalization.
For autoencoder tasks, we instead focus just on measuring the effectiveness of the optimizer on the
training data. The datasets and experiments are summarized as follows:
•MNIST: Handwritten digits of size 28 ×28 with 60K training samples and 10K testing samples.
For classification, we train networks of size 784-1200-1200-10 with rectifier activations. For deep
autoencoders, the encoder architecture of 784-1000-500-250-30 with a symmetric decoding archi-
tecture is used. Logistic activations are used with a binary cross entropy error. For classification
experiments, the data is scaled to have zero mean and unit variance.
•CURVES: Artificial dataset of curves of size 28 ×28 with 20K training samples and 10K testing
samples. We train a deep autoencoder using an encoding architecture of 784-400-200-100-50-25-
6 with symmetric decoding. Similar to MNIST, logistic activations and binary cross entropy error
are used.
•USPS: Handwritten digits of size 16 ×16 with 11K examples. We perform classification using
5 randomly sampled batches of 8K training examples and 3K tes ting examples as in [26] Each
batch has an equal number of each digit. Classification netwo rks of size 256-500-500-10 are
trained with rectifier activations. The data is scaled to have zero mean and unit variance.
•Reuters: A collection of 8293 text documents from 65 categor ies. Each document is represented
as a 18900-dimensional bag-of-words vector. Word counts C are transformed to log( 1 + C)
as is done by [3]. The publically available train/test split of is used. We train networks of size
18900-65 for classification due to the high dimensionality of the inputs, which reduces to softmax-
regression.
For classification experiments, we perform comparison of SH F with and without dropout against
dropout SGD [3]. All classification experiments utilize the sparse initialization of Martens [4] with
initial biases set to 0.1. The sparse initialization in comb ination with ReLUs make our networks
similar to the deep sparse rectifier networks of [28]. All alg orithms are trained for 500 epochs on
MNIST and 1000 epochs on USPS and Reuters. We use weight decay of 5 ×10−4 for SHF and
2 ×10−5 for dropout SHF. A held-out validation set was used for determining the amount of input
7
0 100 200 300 400 5000
0.005
0.01
0.015
0.02
0.025
Epoch
classification error
MNIST
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.005
0.01
0.015
0.02
0.025
0.03
0.035
Epoch
classification error
USPS
SHF
dSHF
dSGD−a
dSGD−l
0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Epoch
classification error
Reuters
SHF
dSHF
dSGD
Figure 2: Training and testing curves for classification. dS HF: dropout SHF, dSGD: dropout SGD,
dSGD-a: dropout on all layers, dSGD-l: dropout on last hidde n layer only (as well as the inputs).
dropout for all algorithms. Both SHF and dropout SHF use initial damping of λ = 1 , gradient batch
size of 1000, curvature batch size of 100 and 3 CG iterations per batch.
Dropout SGD training uses an exponential decreasing learni ng rate schedule initialized at 10, in
combination with max-norm weight clipping [3]. This allows SGD to use larger learning rates for
greater exploration early in training. A linearly increasi ng momentum schedule is used with initial
momentum of 0.5 and final momentum of 0.99. No weight decay is used. For additional comparison
we also train dropout SGD when dropout is only used in the last hidden layer, as is the case with
dropout SHF.
For deep autoencoder experiments, we use the same experimen tal setup as in Chapter 7 of [17].
In particular, we focus solely on training error without any L2 penalty in order to determine the
effectiveness of the optimizer on modeling the training dat a. Comparison is made against SGD,
SGD with momentum, HF and Nesterov’s accelerated gradient ( NAG). On CURVES, SHF uses an
initial damping of λ = 10 , gradient and curvature batch sizes of 2000 and 25 CG iterati ons per
batch. On MNIST, we use initial λ = 1 , gradient and curvature batch sizes of 3000 and 50 CG
iterations per batch. Autoencoder training is ran until no s ufficient progress is made, which occurs
at around 250 epochs on CURVES and 100 epochs on MNIST.
5.1 Classification results
Figure 2 summarizes our classification results. At epoch 500, dropou t SHF achieves 107 errors on
MNIST. This result is similar to [3] which achieve 100-115 errors with various network sizes when
training for a few thousand epochs. Without dropout or input corruption, SHF achieves 159 errors
on MNIST, on par with existing methods that do not incorporat e prior knowledge, pre-training,
image distortions or dropout. As with [4], we hypothesize th at further improvements can be made
by fine-tuning with SHF after unsupervised layerwise pre-training.
After 1000 epochs of training on five random splits of USPS, we obtain final classification errors of
1%, 1.1%, 0.8%, 0.9% and 0.97% with a mean test error of 0.95%. Both algorithms use 50% input
corruption. For additional comparison, [29] obtains a mean classification error of 1.14% using a
pre-trained deep network for large-margin nearest neighbo r classification with the same size splits.
Without dropout, SHF overfits the training data.
On the Reuters dataset, SHF with and without dropout both dem onstrate accelerated training. We
hypothesize that further speedup may also be obtained by sta rting training with a much smaller λ
initialization, which we suspect is conservative given that the problem is convex.
8
Table 1: Training errors on the deep autoencoder tasks. All results are obtained from [17]. M(0.99)
refers to momentum capped at 0.99 and similarily for M(0.9). SGD-VI refers to SGD using the
variance normalized initialization of [15].
problem NAG M(0.99) M(0.9) SGD SGD-VI [19] HF SHF
CURVES 0.078 0.110 0.220 0.250 0.160 0.110 0.089
MNIST 0.730 0.770 0.990 1.100 0.900 0.780 0.877
0 50 100 150 200 2500
0.05
0.1
0.15
0.2
0.25
Epoch
train_L2
CURVES
SHF
NAG
HF
SGD−VI
SGD
0 20 40 60 80 1000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Epoch
train_L2
MNIST
SHF
NAG
HF
SGD−VI
SGD
Figure 3: Learning curves for the deep autoencoder tasks. Th e CG decay parameter γ is shut off at
epoch 160 on CURVES and epoch 60 on MNIST.
5.2 Deep autoencoder results
Figure 3 and table 1 summarize our results. Inspired by [17] we make one addition al modification
to our algorithms. As soon as training begins to diverge, we t urn off the CG decay parameter γ
in a similar fashion as the the momentum parameter µ is decreased in [17]. When γ = 0 , CG
is no longer initialized from the previous solution and is in stead initialized to zero. As with [17],
this has a dramatic effect on the training error but to a lesse r extent as momentum and Nesterov’s
accelerated gradient. [17] describes the behaviour of this effect as follows: with a large momentum,
the optimizer is able to make steady progress along slow chan ging directions of low curvature.
By decreasing the momentum late in training, the optimizer i s then able to quickly reach a local
minimum from finer optimization along high curvature direct ions, which would otherwise be too
difficult to obtain with an aggressive momentum schedule. Th is observation further motivates the
relationship between momentum and information sharing through CG.
Our experimental results demonstrate that SHF does not perf orm significantly better or worse on
these datasets compared to existing approaches. It is able t o outperform HF on CURVES but not
on MNIST. An attractive property that is shared with both HF a nd SHF is not requiring the careful
schedule tuning that is necessary for momentum and NAG. We also attempted experiments with SHF
using the same setup for classification with smaller batches and 5 CG iterations. The results were
worse: on CURVES the lowest training error obtained was 0.19. This shows that while such a setup
is useful from the viewpoint of noisy updates and test generalization, they hamper the effectiveness
of making progress on hard to optimize regions.
6 Conclusion
In this paper we proposed a stochastic variation of Martens’Hessian-free optimization incorporating
dropout for training neural networks on classification and d eep autoencoder tasks. By adapting the
batch sizes and number of CG iterations, SHF can be construct ed to perform well for classification
9
against dropout SGD or optimizing deep autoencoders compar ing HF, NAG and momentum meth-
ods. While our initial results are promising, of interest wo uld be adapting stochastic Hessian-free
optimization to other network architectures:
•Convolutional networks. The most common approach to training convolutional network s has
been SGD incorporating a diagonal Hessian approximation [8]. Dropout SGD was recently used
for training a deep convolutional network on ImageNet [30].
•Recurrent Networks. It was largely believed that RNNs were too difficult to train with SGD due
to the exploding/vanishing gradient problem. In recent yea rs, recurrent networks have become
popular again due to several advancements made in their training [31].
•Recursive Networks. Recursive networks have been successfully used for tasks such as sentiment
classification and compositional modeling of natural language from word embeddings [32]. These
architectures are usually trained using L-BFGS.
It is not clear yet whether this setup is easily generalizabl e to the above architectures or whether
improvements need to be considered. Furthermore, addition al experimental comparison would in-
volve dropout SGD with the adaptive methods of Adagrad [9] or [11], as well as the importance of
pre-conditioning CG. None the less, we hope that this work in itiates future research in developing
stochastic Hessian-free algorithms.
Acknowledgments
The author would like to thank Csaba Szepesvári for helpful discussion as well as David Sussillo for
his guidance when first learning about and implementing HF. T he author would also like to thank
the anonymous ICLR reviewers for their comments and suggestions.
References
[1] L. Bottou and O. Bousquet. The tradeoffs of large-scale l earning. Optimization for Machine
Learning, page 351, 2011.
[2] Y . Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Gr eedy layer-wise training of deep
networks. NIPS, 19:153, 2007.
[3] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever , and R.R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[4] J. Martens. Deep learning via hessian-free optimizatio n. In ICML, volume 951, 2010.
[5] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization.
In ICML, 2011.
[6] B.A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160,
1994.
[7] N.N. Schraudolph. Fast curvature matrix-vector produc ts for second-order gradient descent.
Neural computation, 14(7):1723–1738, 2002.
[8] Y . LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backp rop. Neural networks: T ricks of
the trade, pages 546–546, 1998.
[9] J. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient m ethods for online learning and
stochastic optimization. JMLR, 12:2121–2159, 2010.
[10] J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, A. Senior, P. Tucker,
K. Yang, et al. Large scale distributed deep networks. In NIPS, pages 1232–1240, 2012.
[11] T. Schaul, S. Zhang, and Y . LeCun. No more pesky learning rates. arXiv:1206.1106, 2012.
[12] A. Bordes, L. Bottou, and P. Gallinari. Sgd-qn: Careful quasi-newton stochastic gradient
descent. JMLR, 10:1737–1754.
[13] Razvan Pascanu and Yoshua Bengio. Natural gradient rev isited. arXiv preprint
arXiv:1301.3584, 2013.
[14] N. Le Roux, P.A. Manzagol, and Y . Bengio. Topmoumoute online natural gradient algorithm.
In NIPS, 2007.
10
[15] Xavier Glorot and Yoshua Bengio. Understanding the dif ficulty of training deep feedforward
neural networks. In AISTATS, 2010.
[16] Yann N Dauphin and Yoshua Bengio. Big neural networks wa ste capacity. arXiv preprint
arXiv:1301.3583, 2013.
[17] I. Sutskever. T raining Recurrent Neural Networks. PhD thesis, University of Toronto, 2013.
[18] R.H. Byrd, G.M. Chin, J. Nocedal, and Y . Wu. Sample size selection in optimization methods
for machine learning. Mathematical Programming, pages 1–29, 2012.
[19] O. Chapelle and D. Erhan. Improved preconditioner for h essian free optimization. In NIPS
W orkshop on Deep Learning and Unsupervised F eature Learning, 2011.
[20] I. Sutskever, J. Martens, and G. Hinton. Generating tex t with recurrent neural networks. In
ICML, 2011.
[21] O. Vinyals and D. Povey. Krylov subspace descent for dee p learning. arXiv:1111.4259, 2011.
[22] Q.V . Le, J. Ngiam, A. Coates, A. Lahiri, B. Prochnow, andA.Y . Ng. On optimization methods
for deep learning. In ICML, 2011.
[23] Y . Bengio. Practical recommendations for gradient-ba sed training of deep architectures.
arXiv:1206.5533, 2012.
[24] J. Martens and I. Sutskever. Training deep and recurren t networks with hessian-free optimiza-
tion. Neural Networks: T ricks of the T rade, pages 479–535, 2012.
[25] P. Vincent, H. Larochelle, Y . Bengio, and P.A. Manzagol . Extracting and composing robust
features with denoising autoencoders. In ICML, pages 1096–1103, 2008.
[26] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In Ninth IEEE International Conference on Data Mining ,
pages 357–366. IEEE, 2009.
[27] Deng Cai, Xuanhui Wang, and Xiaofei He. Probabilistic d yadic data analysis with local and
global consistency. In ICML, pages 105–112, 2009.
[28] X. Glorot, A. Bordes, and Y . Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011.
[29] R. Min, D.A. Stanley, Z. Yuan, A. Bonner, and Z. Zhang. A d eep non-linear feature mapping
for large-margin knn classification. In ICDM, pages 357–366, 2009.
[30] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet cl assification with deep convolutional
neural networks. NIPS, 25, 2012.
[31] Y . Bengio, N. Boulanger-Lewandowski, and R. Pascanu. A dvances in optimizing recurrent
networks. arXiv:1212.0901, 2012.
[32] R. Socher, B. Huval, C.D. Manning, and A.Y . Ng. Semanticcompositionality through recursive
matrix-vector spaces. In EMNLP, pages 1201–1211, 2012.
11
|
Ryan Kiros
|
Unknown
| 2,013
|
{"id": "tFbuFKWX3MFC8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358410500000, "tmdate": 1358410500000, "ddate": null, "number": 48, "content": {"title": "Training Neural Networks with Stochastic Hessian-Free Optimization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Hessian-free (HF) optimization has been successfully used for training deep autoencoders and recurrent networks. HF uses the conjugate gradient algorithm to construct update directions through curvature-vector products that can be computed on the same order of time as gradients. In this paper we exploit this property and study stochastic HF with small gradient and curvature mini-batches independent of the dataset size for classification. We modify Martens' HF for this setting and integrate dropout, a method for preventing co-adaptation of feature detectors, to guard against overfitting. On classification tasks, stochastic HF achieves accelerated training and competitive results in comparison with dropout SGD without the need to tune learning rates.", "pdf": "https://arxiv.org/abs/1301.3641", "paperhash": "kiros|training_neural_networks_with_stochastic_hessianfree_optimization", "authors": ["Ryan Kiros"], "authorids": ["rkiros@ualberta.ca"], "keywords": [], "conflicts": []}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["rkiros@ualberta.ca"], "writers": []}
|
[Review]:
Code is now available: http://www.ualberta.ca/~rkiros/
Included are scripts to reproduce the results in the paper.
|
Ryan Kiros
| null | null |
{"id": "CUXbqkRcJWqcy", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1360514640000, "tmdate": 1360514640000, "ddate": null, "number": 7, "content": {"title": "", "review": "Code is now available: http://www.ualberta.ca/~rkiros/\r\n\r\nIncluded are scripts to reproduce the results in the paper."}, "forum": "tFbuFKWX3MFC8", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "tFbuFKWX3MFC8", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ryan Kiros"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 0,
"total": 1
}
| 1
| -1.27267
| 2.27267
| 1.00125
| 0.020842
| 0.00125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 0
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rtGYtZ-ZKSMzk
|
Tree structured sparse coding on cubes
|
A brief description of tree structured sparse coding on the binary cube.
|
arXiv:1301.3590v1 [cs.IT] 16 Jan 2013
Tree structured sparse coding on cubes
Arthur Szlam
City College of New York
aszlam@ccny.cuny.edu
Several recent works have discussed tree structured sparsecoding [8, 10, 7, 3], where N data points
in Rd written as the d × N matrix X are approximately decomposed into the product of matrices
W Z. Here W is a d× K dictionary matrix, andZ is a K× N matrix of coefficients. In tree structured
sparse coding, the rows of Z correspond to nodes on a tree, and the columns of Z are encouraged to
be nonzero on only a few branches of the tree; or alternatively, the columns are constrained to lie on
at most a specified number of branches of the tree.
When viewed from a geometric perspective, this kind of decom position is a “wavelet analysis” of
the data points in X [9, 6, 11, 1]. As each row in Z is associated to a column of W , the columns
of W also take a tree structure. The decomposition corresponds t o a multiscale clustering of the
data, where the scale of the clustering is given by the depth i n the tree, and cluster membership
corresponds to activation of a row in Z. The root node rows of Z corresponds to the whole data
set, and the root node columns of W are a best fit linear representation of X. The set of rows of Z
corresponding to each node specify a cluster- a data pointx is in that cluster if it has active responses
in those rows. The set of columns of W corresponding to a node specify a linear correction to the
best fit subspace defined by the nodes ancestors; the correction is valid on the corresponding cluster.
Here we discuss the analagous construction on the binary cube {− 1,1}d. Linear best fit is replaced
by best fit subcubes.
1 The construction on the cube
1.1 Setup
We are given N data points in Bd = {− 1,1}d written as the d × N binary matrix X. Our goal is to
decompose X as a tree of subcubes and “subcube corrections”. Aq dimensional subcube C = Cc,Ir
of Bd is determined by a point c ∈ Bd, along with a set of d − q restricted indices Ir = r1, ..., rd−q.
The cube Cc,Ir consists of the points b ∈ Bd such that bri = cri for all ri ∈ Ir, that is
Cc,Ir = {b ∈ Bd s.t. bri = cri ∀ri ∈ Ir}.
The unrestricted indices Iu = {1, ..., d} \ Ir can take on either value.
1.2 The construction
Here I will describe a simple version of the construction where each node in the tree corresponds to
a subcube of the same dimension q, and a hard binary clustering is used at each stage. Suppose o ur
tree has depth l. Then the construction consists of
1. A tree structured clustering of X into sets Xij at depth (scale) i ∈ { 1, ..., l} such that
⋃
j
Xij = X,
2. and cluster representatives (that is d − iq-dimensional subcubes)
Ccij ,Ir
ij
1
such that the restricted sets have the property that if ij is an ancestor of i′j′,
Ir
ij ∩ Ir
i′j′ = Ir
ij ,
and
cij(s) =ci′j′ (s)
for all s ∈ Ir
ij
Here each cij is a vector in Bd; the complete set of cij roughly corresponds to W from before.
However, note that each cij has precisely d − iq entries that actually matter; and moreover because
of the nested equalities, the leaf nodes carry all the inform ation on the branch. This is not to say
that the tree structure is not important or not used- it is, as the leaf nodes have to share coordinates.
However once the full construction is specified, the leaf rep resentatives are all that is necessary to
code a data point.
1.3 Algorithms
We can build the partitions and representatives starting from the root and descending down the tree
as follows: first, find the best fit d − q dimensional subcube for the whole data set. This is given
by a coordinate-wise mode; the free coordinates are the ones with the largest average discrepancy
from their modes. Remove the q fixed coordinates from consideration. Cluster the reduced ( d − q
dimensional) data using K means with K = 2; on each cluster find the best fit (d − q) − q cube.
Continue to the leaves.
1.3.1 Refinement
The terms Ccij ,Ir
ij and Xij can be updated with a Lloyd type alternation. With all of the Xij fixed,
loop through each C from the root of the tree finding the best subcubes at each scale for the current
partition. Now update the partition so that each x is sent to its best fit leaf cube.
1.3.2 Adaptive q, l, etc.
In [1], one of the important points is that many of the model pa rameters, including the q, l, and
the number of clusters could be determined in a principled wa y. While it is possible that some of
their analysis may carry over to this setting, it is not yet done. However, instead of fixing q, we can
fix a percentage of the energy to be kept at each level, and choo se the number of free coordinates
accordingly.
2 Experiments
We use a binarized the MNIST training data by thresholding to obtain X. Here d = 282 and
N = 60000. Replace 70% of the entries in X with noise sampled uniformly from {− 1,1}, and
train a tree structured cube dictionary with q = 80and depth l = 9. The subdivision scheme used to
generate the multiscale clustering is 2-means initialized via randomized farthest insertion [2]; this
means we can cycle spin over the dictionaries [5], to get many different reconstructions to average
over. In this experiment the reconstruction was preformed 5 0 times for the noise realization. The
results are visualized below.
References
[1] W. Allard, G. Chen, and M. Maggioni. Multiscale geometric methods for data sets II: Geomet-
ric multi-resolution analysis. to appear in Applied and Computational Harmonic Analysis.
[2] David Arthur and Sergei Vassilvitskii. k-means++: the a dvantages of careful seeding. In Pro-
ceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, SODA ’07,
pages 1027–1035, Philadelphia, PA, USA, 2007. Society for I ndustrial and Applied Mathe-
matics.
[3] Richard G. Baraniuk, V olkan Cevher, Marco F. Duarte, and Chinmay Hegde. Model-Based
Compressive Sensing. Dec 2009.
2
Figure 1: Results of denoising using the tree structured cod ing. The top left image is the first 64
binarized MNIST digits after replacing 70% of the data matrix with uniform noise. The top right
image is recovered, using a binary tree of depthl = 9and q = 90, and 100 cycle spins, thus the non-
binary output, as the final result is the average of the randomclustering initialization (of course with
the same noise realization). The bottom left image is recovered using robust pca [4], for comparison.
The bottom right is the true binary data.
3
[4] Emmanuel J. Cand` es, Xiaodong Li, Yi Ma, and John Wright. Robust principal component
analysis? J. ACM, 58(3):11, 2011.
[5] R. R. Coifman and D. L. Donoho. Translation-invariant de -noising. Technical report, Depart-
ment of Statistics, 1995.
[6] G. David and S. Semmes. Singular integrals and rectifiabl e sets in Rn: au-del` a des graphes
Lipschitziens. Ast´erisque, 193:1–145, 1991.
[7] Laurent Jacob, Guillaume Obozinski, and Jean-Philippe Vert. Group lasso with overlap and
graph lasso. InProceedings of the 26th Annual International Conference onMachine Learning,
ICML ’09, pages 433–440, New York, NY , USA, 2009. ACM.
[8] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proxim al methods for sparse hierarchical
dictionary learning. In International Conference on Machine Learning (ICML), 2010.
[9] P. W. Jones. Rectifiable sets and the traveling salesman p roblem. Invent Math, 102(1):1–15,
1990.
[10] Seyoung Kim and Eric P. Xing. Tree-guided group lasso fo r multi-task regression with struc-
tured sparsity. In ICML, pages 543–550, 2010.
[11] Gilad Lerman. Quantifying curvelike structures of mea sures by using L2 Jones quantities.
Comm. Pure Appl. Math., 56(9):1294–1365, 2003.
4
|
Arthur Szlam
|
Unknown
| 2,013
|
{"id": "rtGYtZ-ZKSMzk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358405100000, "tmdate": 1358405100000, "ddate": null, "number": 7, "content": {"title": "Tree structured sparse coding on cubes", "decision": "conferencePoster-iclr2013-workshop", "abstract": "A brief description of tree structured sparse coding on the binary cube.", "pdf": "https://arxiv.org/abs/1301.3590", "paperhash": "szlam|tree_structured_sparse_coding_on_cubes", "authors": ["Arthur Szlam"], "authorids": ["aszlam@ccny.cuny.edu"], "keywords": [], "conflicts": []}, "forum": "rtGYtZ-ZKSMzk", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["aszlam@ccny.cuny.edu"], "writers": []}
|
[Review]:
The paper extends the widely known idea of tree-structured sparse coding to the Hamming space. Instead for each node being represented by the best linear fit of the corresponding sub-space, it is represented by the best sub-cube. The idea is valid if not extremely original.
I’m not sure it has too many applications, though. I think it is more frequent to encounter raw data residing some Euclidean space, while using the Hamming space for representation (e.g., as in various similarity-preserving hashing techniques). Hence, I believe a more interesting setting would be to have W in R^d, while keeping Z in H^K, i.e., the dictionary atoms are real vectors producing best linear fit of corresponding clusters with binary activation coefficients. This will lead to the construction of a hash function. The out-of-sample extension would happen naturally through representation pursuit (which will now be performed over the cube).
Pros:
1. A very simple and easy to implement idea extending tree dictionaries to binary data
2. For binary data, it seems to outperform other algorithms in the presented recovery experiment.
Cons:
1. The paper reads more like a preliminary writeup rather than a real paper. The length might be proportional to its contribution, but fixing typos and putting a conclusion section wouldn’t harm.
2. The experimental result is convincing, but it’s rather andecdotal. I might miss something, but the author should argue convincingly that representing binary data with sparse tree-structured dictionary is interesting at all, showing a few real applications. The presented experiment on binarized MNIST digit is very artificial.
|
anonymous reviewer fd41
| null | null |
{"id": "axSGN5lBGINJm", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362831180000, "tmdate": 1362831180000, "ddate": null, "number": 1, "content": {"title": "review of Tree structured sparse coding on cubes", "review": "The paper extends the widely known idea of tree-structured sparse coding to the Hamming space. Instead for each node being represented by the best linear fit of the corresponding sub-space, it is represented by the best sub-cube. The idea is valid if not extremely original. \r\n\r\nI\u2019m not sure it has too many applications, though. I think it is more frequent to encounter raw data residing some Euclidean space, while using the Hamming space for representation (e.g., as in various similarity-preserving hashing techniques). Hence, I believe a more interesting setting would be to have W in R^d, while keeping Z in H^K, i.e., the dictionary atoms are real vectors producing best linear fit of corresponding clusters with binary activation coefficients. This will lead to the construction of a hash function. The out-of-sample extension would happen naturally through representation pursuit (which will now be performed over the cube).\r\n\r\nPros:\r\n\r\n1.\tA very simple and easy to implement idea extending tree dictionaries to binary data\r\n2.\tFor binary data, it seems to outperform other algorithms in the presented recovery experiment. \r\n\r\nCons:\r\n\r\n1.\tThe paper reads more like a preliminary writeup rather than a real paper. The length might be proportional to its contribution, but fixing typos and putting a conclusion section wouldn\u2019t harm.\r\n2.\tThe experimental result is convincing, but it\u2019s rather andecdotal. I might miss something, but the author should argue convincingly that representing binary data with sparse tree-structured dictionary is interesting at all, showing a few real applications. The presented experiment on binarized MNIST digit is very artificial."}, "forum": "rtGYtZ-ZKSMzk", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rtGYtZ-ZKSMzk", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer fd41"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 7,
"praise": 2,
"presentation_and_reporting": 5,
"results_and_discussion": 3,
"suggestion_and_solution": 2,
"total": 18
}
| 1.333333
| 0.938773
| 0.394561
| 1.405845
| 0.669785
| 0.072511
| 0.166667
| 0
| 0.111111
| 0.388889
| 0.111111
| 0.277778
| 0.166667
| 0.111111
|
{
"criticism": 0.16666666666666666,
"example": 0,
"importance_and_relevance": 0.1111111111111111,
"materials_and_methods": 0.3888888888888889,
"praise": 0.1111111111111111,
"presentation_and_reporting": 0.2777777777777778,
"results_and_discussion": 0.16666666666666666,
"suggestion_and_solution": 0.1111111111111111
}
| 1.333333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rtGYtZ-ZKSMzk
|
Tree structured sparse coding on cubes
|
A brief description of tree structured sparse coding on the binary cube.
|
arXiv:1301.3590v1 [cs.IT] 16 Jan 2013
Tree structured sparse coding on cubes
Arthur Szlam
City College of New York
aszlam@ccny.cuny.edu
Several recent works have discussed tree structured sparsecoding [8, 10, 7, 3], where N data points
in Rd written as the d × N matrix X are approximately decomposed into the product of matrices
W Z. Here W is a d× K dictionary matrix, andZ is a K× N matrix of coefficients. In tree structured
sparse coding, the rows of Z correspond to nodes on a tree, and the columns of Z are encouraged to
be nonzero on only a few branches of the tree; or alternatively, the columns are constrained to lie on
at most a specified number of branches of the tree.
When viewed from a geometric perspective, this kind of decom position is a “wavelet analysis” of
the data points in X [9, 6, 11, 1]. As each row in Z is associated to a column of W , the columns
of W also take a tree structure. The decomposition corresponds t o a multiscale clustering of the
data, where the scale of the clustering is given by the depth i n the tree, and cluster membership
corresponds to activation of a row in Z. The root node rows of Z corresponds to the whole data
set, and the root node columns of W are a best fit linear representation of X. The set of rows of Z
corresponding to each node specify a cluster- a data pointx is in that cluster if it has active responses
in those rows. The set of columns of W corresponding to a node specify a linear correction to the
best fit subspace defined by the nodes ancestors; the correction is valid on the corresponding cluster.
Here we discuss the analagous construction on the binary cube {− 1,1}d. Linear best fit is replaced
by best fit subcubes.
1 The construction on the cube
1.1 Setup
We are given N data points in Bd = {− 1,1}d written as the d × N binary matrix X. Our goal is to
decompose X as a tree of subcubes and “subcube corrections”. Aq dimensional subcube C = Cc,Ir
of Bd is determined by a point c ∈ Bd, along with a set of d − q restricted indices Ir = r1, ..., rd−q.
The cube Cc,Ir consists of the points b ∈ Bd such that bri = cri for all ri ∈ Ir, that is
Cc,Ir = {b ∈ Bd s.t. bri = cri ∀ri ∈ Ir}.
The unrestricted indices Iu = {1, ..., d} \ Ir can take on either value.
1.2 The construction
Here I will describe a simple version of the construction where each node in the tree corresponds to
a subcube of the same dimension q, and a hard binary clustering is used at each stage. Suppose o ur
tree has depth l. Then the construction consists of
1. A tree structured clustering of X into sets Xij at depth (scale) i ∈ { 1, ..., l} such that
⋃
j
Xij = X,
2. and cluster representatives (that is d − iq-dimensional subcubes)
Ccij ,Ir
ij
1
such that the restricted sets have the property that if ij is an ancestor of i′j′,
Ir
ij ∩ Ir
i′j′ = Ir
ij ,
and
cij(s) =ci′j′ (s)
for all s ∈ Ir
ij
Here each cij is a vector in Bd; the complete set of cij roughly corresponds to W from before.
However, note that each cij has precisely d − iq entries that actually matter; and moreover because
of the nested equalities, the leaf nodes carry all the inform ation on the branch. This is not to say
that the tree structure is not important or not used- it is, as the leaf nodes have to share coordinates.
However once the full construction is specified, the leaf rep resentatives are all that is necessary to
code a data point.
1.3 Algorithms
We can build the partitions and representatives starting from the root and descending down the tree
as follows: first, find the best fit d − q dimensional subcube for the whole data set. This is given
by a coordinate-wise mode; the free coordinates are the ones with the largest average discrepancy
from their modes. Remove the q fixed coordinates from consideration. Cluster the reduced ( d − q
dimensional) data using K means with K = 2; on each cluster find the best fit (d − q) − q cube.
Continue to the leaves.
1.3.1 Refinement
The terms Ccij ,Ir
ij and Xij can be updated with a Lloyd type alternation. With all of the Xij fixed,
loop through each C from the root of the tree finding the best subcubes at each scale for the current
partition. Now update the partition so that each x is sent to its best fit leaf cube.
1.3.2 Adaptive q, l, etc.
In [1], one of the important points is that many of the model pa rameters, including the q, l, and
the number of clusters could be determined in a principled wa y. While it is possible that some of
their analysis may carry over to this setting, it is not yet done. However, instead of fixing q, we can
fix a percentage of the energy to be kept at each level, and choo se the number of free coordinates
accordingly.
2 Experiments
We use a binarized the MNIST training data by thresholding to obtain X. Here d = 282 and
N = 60000. Replace 70% of the entries in X with noise sampled uniformly from {− 1,1}, and
train a tree structured cube dictionary with q = 80and depth l = 9. The subdivision scheme used to
generate the multiscale clustering is 2-means initialized via randomized farthest insertion [2]; this
means we can cycle spin over the dictionaries [5], to get many different reconstructions to average
over. In this experiment the reconstruction was preformed 5 0 times for the noise realization. The
results are visualized below.
References
[1] W. Allard, G. Chen, and M. Maggioni. Multiscale geometric methods for data sets II: Geomet-
ric multi-resolution analysis. to appear in Applied and Computational Harmonic Analysis.
[2] David Arthur and Sergei Vassilvitskii. k-means++: the a dvantages of careful seeding. In Pro-
ceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, SODA ’07,
pages 1027–1035, Philadelphia, PA, USA, 2007. Society for I ndustrial and Applied Mathe-
matics.
[3] Richard G. Baraniuk, V olkan Cevher, Marco F. Duarte, and Chinmay Hegde. Model-Based
Compressive Sensing. Dec 2009.
2
Figure 1: Results of denoising using the tree structured cod ing. The top left image is the first 64
binarized MNIST digits after replacing 70% of the data matrix with uniform noise. The top right
image is recovered, using a binary tree of depthl = 9and q = 90, and 100 cycle spins, thus the non-
binary output, as the final result is the average of the randomclustering initialization (of course with
the same noise realization). The bottom left image is recovered using robust pca [4], for comparison.
The bottom right is the true binary data.
3
[4] Emmanuel J. Cand` es, Xiaodong Li, Yi Ma, and John Wright. Robust principal component
analysis? J. ACM, 58(3):11, 2011.
[5] R. R. Coifman and D. L. Donoho. Translation-invariant de -noising. Technical report, Depart-
ment of Statistics, 1995.
[6] G. David and S. Semmes. Singular integrals and rectifiabl e sets in Rn: au-del` a des graphes
Lipschitziens. Ast´erisque, 193:1–145, 1991.
[7] Laurent Jacob, Guillaume Obozinski, and Jean-Philippe Vert. Group lasso with overlap and
graph lasso. InProceedings of the 26th Annual International Conference onMachine Learning,
ICML ’09, pages 433–440, New York, NY , USA, 2009. ACM.
[8] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proxim al methods for sparse hierarchical
dictionary learning. In International Conference on Machine Learning (ICML), 2010.
[9] P. W. Jones. Rectifiable sets and the traveling salesman p roblem. Invent Math, 102(1):1–15,
1990.
[10] Seyoung Kim and Eric P. Xing. Tree-guided group lasso fo r multi-task regression with struc-
tured sparsity. In ICML, pages 543–550, 2010.
[11] Gilad Lerman. Quantifying curvelike structures of mea sures by using L2 Jones quantities.
Comm. Pure Appl. Math., 56(9):1294–1365, 2003.
4
|
Arthur Szlam
|
Unknown
| 2,013
|
{"id": "rtGYtZ-ZKSMzk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358405100000, "tmdate": 1358405100000, "ddate": null, "number": 7, "content": {"title": "Tree structured sparse coding on cubes", "decision": "conferencePoster-iclr2013-workshop", "abstract": "A brief description of tree structured sparse coding on the binary cube.", "pdf": "https://arxiv.org/abs/1301.3590", "paperhash": "szlam|tree_structured_sparse_coding_on_cubes", "authors": ["Arthur Szlam"], "authorids": ["aszlam@ccny.cuny.edu"], "keywords": [], "conflicts": []}, "forum": "rtGYtZ-ZKSMzk", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["aszlam@ccny.cuny.edu"], "writers": []}
|
[Review]:
summary:
This is a 3-page abstract only. It proposes a low-dimensional representation of data in order
to impose a tree structure. It relates to other mixed-norm approaches previously proposed in
the literature. Experiments on a binarized MNIST show how it becomes robust to added noise.
review:
I must say I found the abstract very hard to read and would have preferred a longer version
to better understand how the model is different from prior work. It's not clear for instance
how the proposed approach compares to other denoising methods. It's not clear neither what is
the relation between tree-based decomposition and noise in MNIST. Finally, I didn't understand
why the model was restricted to binary representations. All this simply says I failed to
capture the essence of the proposed approach.
|
anonymous reviewer 2f02
| null | null |
{"id": "7ESq7YWfqMhHk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362001920000, "tmdate": 1362001920000, "ddate": null, "number": 2, "content": {"title": "review of Tree structured sparse coding on cubes", "review": "summary:\r\nThis is a 3-page abstract only. It proposes a low-dimensional representation of data in order\r\nto impose a tree structure. It relates to other mixed-norm approaches previously proposed in\r\nthe literature. Experiments on a binarized MNIST show how it becomes robust to added noise.\r\n\r\nreview:\r\nI must say I found the abstract very hard to read and would have preferred a longer version\r\nto better understand how the model is different from prior work. It's not clear for instance\r\nhow the proposed approach compares to other denoising methods. It's not clear neither what is\r\nthe relation between tree-based decomposition and noise in MNIST. Finally, I didn't understand\r\nwhy the model was restricted to binary representations. All this simply says I failed to\r\ncapture the essence of the proposed approach."}, "forum": "rtGYtZ-ZKSMzk", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rtGYtZ-ZKSMzk", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 2f02"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 7,
"praise": 0,
"presentation_and_reporting": 3,
"results_and_discussion": 0,
"suggestion_and_solution": 1,
"total": 9
}
| 1.666667
| 1.414148
| 0.252519
| 1.699022
| 0.31385
| 0.032355
| 0.444444
| 0
| 0
| 0.777778
| 0
| 0.333333
| 0
| 0.111111
|
{
"criticism": 0.4444444444444444,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.7777777777777778,
"praise": 0,
"presentation_and_reporting": 0.3333333333333333,
"results_and_discussion": 0,
"suggestion_and_solution": 0.1111111111111111
}
| 1.666667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
Summary:
The paper proposes to replace the final stages of Coates and Ng's CIFAR-10 classification pipeline. In place of the hand-designed 3x3 mean pooling layer, the paper proposes to learn a pooling layer. In place of the SVM, the paper proposes to use softmax regression jointly trained with the pooling layer.
The most similar prior work is Jia and Huang's learned pooling system. Jia and Huang use a different means of learning the pooling layer, and train a separate logistic regression classifier for each class instead of using one softmax model.
The specific method proposed here for learning the pooling layer is to make the pooling layer a densely connected linear layer in an MLP and train it jointly with the softmax layer.
The proposed method doesn't work quite as well as Jia and Huang's on the CIFAR-10 dataset, but does beat them on the less-competitive CIFAR-100 benchmark.
Pros:
-The method is fairly simple and straightforward
-The method improves on the state of the art of CIFAR-100 (at the time of submission, there are now two better methods known to this reviewer)
Cons:
-I think it's somewhat misleading to call this operation pooling, for the following reasons:
1) It doesn't allow learning how to max-pool, as Jia and Huang's method does. It's sort of like mean pooling, but since the weights can be negative it's not even really a weighted average.
2) Since the weights aren't necessarily sparse, this loses most of the computational benefit of pooling, where each output is computed as a function of just a few inputs. The only real computational benefit is that you can set the hyperparameters to make the output smaller than the input, but that's true of convolutional layers too.
-A densely connected linear layer followed by a softmax layer is representationally equivalent to a softmax layer with a factorized weight matrix. Any improvements in performance from using this method are therefore due to regularizing a softmax model better. The paper doesn't explore this connection at all.
-The paper doesn't do proper controls. For example, their smoothness prior might explain their entire success. Just applying the smoothness prior to the softmax model directly might work just as well as factoring the softmax weights and applying the smoothness prior to one factor.
-While the paper says repeatedly that their method makes few assumptions about the geometry of the pools, their 'pre-pooling' step seems to make most of the same assumptions as Jia and Huang, and as far as I can tell includes Coates and Ng's method as a special case.
|
anonymous reviewer 45d8
| null | null |
{"id": "xEdmrekMJsvCj", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361914920000, "tmdate": 1361914920000, "ddate": null, "number": 8, "content": {"title": "review of Learnable Pooling Regions for Image Classification", "review": "Summary:\r\nThe paper proposes to replace the final stages of Coates and Ng's CIFAR-10 classification pipeline. In place of the hand-designed 3x3 mean pooling layer, the paper proposes to learn a pooling layer. In place of the SVM, the paper proposes to use softmax regression jointly trained with the pooling layer.\r\n\r\nThe most similar prior work is Jia and Huang's learned pooling system. Jia and Huang use a different means of learning the pooling layer, and train a separate logistic regression classifier for each class instead of using one softmax model.\r\n\r\nThe specific method proposed here for learning the pooling layer is to make the pooling layer a densely connected linear layer in an MLP and train it jointly with the softmax layer.\r\n\r\nThe proposed method doesn't work quite as well as Jia and Huang's on the CIFAR-10 dataset, but does beat them on the less-competitive CIFAR-100 benchmark.\r\n\r\nPros:\r\n-The method is fairly simple and straightforward\r\n-The method improves on the state of the art of CIFAR-100 (at the time of submission, there are now two better methods known to this reviewer)\r\n\r\nCons:\r\n-I think it's somewhat misleading to call this operation pooling, for the following reasons:\r\n1) It doesn't allow learning how to max-pool, as Jia and Huang's method does. It's sort of like mean pooling, but since the weights can be negative it's not even really a weighted average.\r\n2) Since the weights aren't necessarily sparse, this loses most of the computational benefit of pooling, where each output is computed as a function of just a few inputs. The only real computational benefit is that you can set the hyperparameters to make the output smaller than the input, but that's true of convolutional layers too.\r\n-A densely connected linear layer followed by a softmax layer is representationally equivalent to a softmax layer with a factorized weight matrix. Any improvements in performance from using this method are therefore due to regularizing a softmax model better. The paper doesn't explore this connection at all.\r\n-The paper doesn't do proper controls. For example, their smoothness prior might explain their entire success. Just applying the smoothness prior to the softmax model directly might work just as well as factoring the softmax weights and applying the smoothness prior to one factor.\r\n-While the paper says repeatedly that their method makes few assumptions about the geometry of the pools, their 'pre-pooling' step seems to make most of the same assumptions as Jia and Huang, and as far as I can tell includes Coates and Ng's method as a special case."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 45d8"], "writers": ["anonymous"]}
|
{
"criticism": 5,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 17,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 2,
"suggestion_and_solution": 1,
"total": 18
}
| 1.444444
| 1.049884
| 0.394561
| 1.479376
| 0.325636
| 0.034932
| 0.277778
| 0
| 0
| 0.944444
| 0.055556
| 0
| 0.111111
| 0.055556
|
{
"criticism": 0.2777777777777778,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.9444444444444444,
"praise": 0.05555555555555555,
"presentation_and_reporting": 0,
"results_and_discussion": 0.1111111111111111,
"suggestion_and_solution": 0.05555555555555555
}
| 1.444444
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
PS. After reading some of the other comments, I see that I was wrong about the weights in the linear layer being possibly negative. I actually wasn't able to find the part of the paper that specifies this. I think in general the paper could be improved by being a little bit more straightforward. The method is very simple but it's difficult to tell exactly what the method is from reading the paper.
I definitely agree with Yann LeCun that the smoothness prior is interesting and should be explored in more detail.
|
anonymous reviewer 45d8
| null | null |
{"id": "uEhruhQZrGeZw", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361927280000, "tmdate": 1361927280000, "ddate": null, "number": 9, "content": {"title": "", "review": "PS. After reading some of the other comments, I see that I was wrong about the weights in the linear layer being possibly negative. I actually wasn't able to find the part of the paper that specifies this. I think in general the paper could be improved by being a little bit more straightforward. The method is very simple but it's difficult to tell exactly what the method is from reading the paper.\r\n\r\nI definitely agree with Yann LeCun that the smoothness prior is interesting and should be explored in more detail."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 45d8"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 2,
"praise": 1,
"presentation_and_reporting": 4,
"results_and_discussion": 0,
"suggestion_and_solution": 2,
"total": 6
}
| 2.166667
| 1.393328
| 0.773339
| 2.174394
| 0.155331
| 0.007728
| 0.5
| 0
| 0.166667
| 0.333333
| 0.166667
| 0.666667
| 0
| 0.333333
|
{
"criticism": 0.5,
"example": 0,
"importance_and_relevance": 0.16666666666666666,
"materials_and_methods": 0.3333333333333333,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0.6666666666666666,
"results_and_discussion": 0,
"suggestion_and_solution": 0.3333333333333333
}
| 2.166667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
As far as I can tell, the algorithm in section 2.2 (pooling + linear classifier) is essentially a 2-layer neural net trained with backprop, except that the hidden layer is linear with positive weights.
The only innovation seems to be the weight spatial smoothness regularizer of section 2.3. I think this should be emphasized.
Question: why use LBFGS when a simple stochastic gradient would have been simpler and probably faster?
The introduction seems to suggest that pooling appeared with [Riesenhuber and Poggio 2009] and [Koenderink and van Doorn 1999], but models of vision with pooling (even multiple levesl of pooling) can be found in the neo-cognitron model [Fukushima 1980] and in convolutional networks [LeCun et al. 1990, and pretty much every subsequent paper on convolutional nets].
The origin of the idea can be traced to the 'complex cell' model from Hubel and Wiesel's classic work on the cat's primary visual cortex [Hubel and Wiesel 1962].
You might also be interested in [Boureau et al. ICML 2010] 'A theoretical analysis of feature pooling in vision algorithms'.
|
Yann LeCun
| null | null |
{"id": "ttaRtzuy2NtjF", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1360139640000, "tmdate": 1360139640000, "ddate": null, "number": 2, "content": {"title": "", "review": "As far as I can tell, the algorithm in section 2.2 (pooling + linear classifier) is essentially a 2-layer neural net trained with backprop, except that the hidden layer is linear with positive weights.\r\nThe only innovation seems to be the weight spatial smoothness regularizer of section 2.3. I think this should be emphasized.\r\n\r\nQuestion: why use LBFGS when a simple stochastic gradient would have been simpler and probably faster?\r\n\r\nThe introduction seems to suggest that pooling appeared with [Riesenhuber and Poggio 2009] and [Koenderink and van Doorn 1999], but models of vision with pooling (even multiple levesl of pooling) can be found in the neo-cognitron model [Fukushima 1980] and in convolutional networks [LeCun et al. 1990, and pretty much every subsequent paper on convolutional nets].\r\nThe origin of the idea can be traced to the 'complex cell' model from Hubel and Wiesel's classic work on the cat's primary visual cortex [Hubel and Wiesel 1962].\r\n\r\nYou might also be interested in [Boureau et al. ICML 2010] 'A theoretical analysis of feature pooling in vision algorithms'."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["Yann LeCun"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 6,
"praise": 0,
"presentation_and_reporting": 1,
"results_and_discussion": 0,
"suggestion_and_solution": 3,
"total": 9
}
| 1.222222
| 0.969703
| 0.252519
| 1.239295
| 0.221353
| 0.017073
| 0
| 0
| 0.111111
| 0.666667
| 0
| 0.111111
| 0
| 0.333333
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0.1111111111111111,
"materials_and_methods": 0.6666666666666666,
"praise": 0,
"presentation_and_reporting": 0.1111111111111111,
"results_and_discussion": 0,
"suggestion_and_solution": 0.3333333333333333
}
| 1.222222
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
Our paper addresses the shortcomings of fixed and data-independent pooling regions in architectures such as Spatial Pyramid Matching [Lazebnik et. al., 'Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories', CVPR 2006], where dictionary-based features are pooled over large neighborhood. In our work we propose an alternative data-driven approach for the pooling stage, and there are three main novelties of our work.
First of all, we base our work on the popular Spatial Pyramid Matching architectures and generalize the pooling operator allowing for joint and discriminative training of both the classifier together with the pooling operator. The realization of the idea necessary for training is essentially an Artificial Neural Network with dense connections between pooling units with the classifier, and the pooling units connected with the high-dimensional dictionary-based features. Therefore, back-propagation and the Neural Network interpretation should rather be considered here as a tool to achieve joint and data-dependent training of the parameters of the pooling operator and the classifier. Moreover, our parameterization allows for the interpretation in terms of spatial regions. The proposed architecture is an alternative to another discriminatively trained architecture presented by Jia et. al. ['Beyond spatial pyramids: Receptive field learning for pooled image features' CVPR 2012 and NIPS workshop 2011] outperforming the latter on the CIFAR-100 dataset.
Secondly, as opposed to the previous Spatial Pyramid Matching schemes, we don't constrain the pooling regions to be the identical for all coordinates of the code.
Lastly, as you've said, we investigate regularization terms. The popular spatial pyramid matching architectures which we generalize in this paper are typically used to pool over large spatial regions. In combination with our code-specific pooling scheme this leads to a large number of parameters that call for regularization. In our investigations of different regularizers it turns out that a smoothness regularizer is key to strong performance for this type of architecture on CIFAR-10 and CIFAR-100 datasets.
Concerning LBFGS vs SGD: We have chosen LBFGS out of convenience, as it tends to have fewer parameters.
Thanks for pointing out missing references.
|
Mateusz Malinowski
| null | null |
{"id": "mdD47o8J4hmr1", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1360973580000, "tmdate": 1360973580000, "ddate": null, "number": 10, "content": {"title": "", "review": "Our paper addresses the shortcomings of fixed and data-independent pooling regions in architectures such as Spatial Pyramid Matching [Lazebnik et. al., 'Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories', CVPR 2006], where dictionary-based features are pooled over large neighborhood. In our work we propose an alternative data-driven approach for the pooling stage, and there are three main novelties of our work.\r\n \r\nFirst of all, we base our work on the popular Spatial Pyramid Matching architectures and generalize the pooling operator allowing for joint and discriminative training of both the classifier together with the pooling operator. The realization of the idea necessary for training is essentially an Artificial Neural Network with dense connections between pooling units with the classifier, and the pooling units connected with the high-dimensional dictionary-based features. Therefore, back-propagation and the Neural Network interpretation should rather be considered here as a tool to achieve joint and data-dependent training of the parameters of the pooling operator and the classifier. Moreover, our parameterization allows for the interpretation in terms of spatial regions. The proposed architecture is an alternative to another discriminatively trained architecture presented by Jia et. al. ['Beyond spatial pyramids: Receptive field learning for pooled image features' CVPR 2012 and NIPS workshop 2011] outperforming the latter on the CIFAR-100 dataset.\r\n\r\nSecondly, as opposed to the previous Spatial Pyramid Matching schemes, we don't constrain the pooling regions to be the identical for all coordinates of the code.\r\n \r\nLastly, as you've said, we investigate regularization terms. The popular spatial pyramid matching architectures which we generalize in this paper are typically used to pool over large spatial regions. In combination with our code-specific pooling scheme this leads to a large number of parameters that call for regularization. In our investigations of different regularizers it turns out that a smoothness regularizer is key to strong performance for this type of architecture on CIFAR-10 and CIFAR-100 datasets.\r\n\r\nConcerning LBFGS vs SGD: We have chosen LBFGS out of convenience, as it tends to have fewer parameters.\r\n\r\nThanks for pointing out missing references."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["Mateusz Malinowski"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 14,
"praise": 0,
"presentation_and_reporting": 1,
"results_and_discussion": 2,
"suggestion_and_solution": 1,
"total": 17
}
| 1.235294
| 0.982775
| 0.252519
| 1.268301
| 0.319113
| 0.033007
| 0.058824
| 0
| 0.117647
| 0.823529
| 0
| 0.058824
| 0.117647
| 0.058824
|
{
"criticism": 0.058823529411764705,
"example": 0,
"importance_and_relevance": 0.11764705882352941,
"materials_and_methods": 0.8235294117647058,
"praise": 0,
"presentation_and_reporting": 0.058823529411764705,
"results_and_discussion": 0.11764705882352941,
"suggestion_and_solution": 0.058823529411764705
}
| 1.235294
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
This is a follow-up to Yoshua Bengio's comment. I'm lead author on the paper that he linked to.
One reason that Zeiler & Fergus got good results on CIFAR-100 with stochastic max pooling and my co-authors and I got good results on CIFAR-100 with maxout is that we were both using deep architectures. I think there's room to ask the scientific question 'how well can we do with one layer, just by being more clever about how to do the pooling?' even if this doesn't immediately lead to better answers to the engineering question, 'how can we get the best possible numbers on CIFAR-100?' So it's important to evaluate Malinowski and Fritz's method in the context of it being constrained to using a single-layer architecture.
On the other hand, it's not obvious to me that Malinowski and Fritz's training procedure would generalize to deeper achitectures, since the current implementation assumes that the output of the pooling layer is connected directly to the classification layer. It would be interesting to investigate whether this strategy (and Jia and Huang's strategy) works for deeper architectures.
|
Ian Goodfellow
| null | null |
{"id": "ddaBUNcnvHrLK", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361922660000, "tmdate": 1361922660000, "ddate": null, "number": 6, "content": {"title": "", "review": "This is a follow-up to Yoshua Bengio's comment. I'm lead author on the paper that he linked to.\r\n\r\nOne reason that Zeiler & Fergus got good results on CIFAR-100 with stochastic max pooling and my co-authors and I got good results on CIFAR-100 with maxout is that we were both using deep architectures. I think there's room to ask the scientific question 'how well can we do with one layer, just by being more clever about how to do the pooling?' even if this doesn't immediately lead to better answers to the engineering question, 'how can we get the best possible numbers on CIFAR-100?' So it's important to evaluate Malinowski and Fritz's method in the context of it being constrained to using a single-layer architecture.\r\n\r\nOn the other hand, it's not obvious to me that Malinowski and Fritz's training procedure would generalize to deeper achitectures, since the current implementation assumes that the output of the pooling layer is connected directly to the classification layer. It would be interesting to investigate whether this strategy (and Jia and Huang's strategy) works for deeper architectures."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ian Goodfellow"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 4,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 2,
"total": 8
}
| 1.25
| 0.855439
| 0.394561
| 1.265513
| 0.196999
| 0.015513
| 0.125
| 0
| 0.125
| 0.5
| 0.125
| 0
| 0.125
| 0.25
|
{
"criticism": 0.125,
"example": 0,
"importance_and_relevance": 0.125,
"materials_and_methods": 0.5,
"praise": 0.125,
"presentation_and_reporting": 0,
"results_and_discussion": 0.125,
"suggestion_and_solution": 0.25
}
| 1.25
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
We thank all the reviewers for their comments.
We will include suggested papers on related work and origins of pooling architectures as well as improvement on the state of the art that occurred in the meanwhile.
The reviewers acknowledge our analysis of regularization schemes to learn weighted pooling units together with a regularizer that promotes spatial smoothness.
Our work aims at replacing hand-crafted pooling stage in computer vision architectures ([1], [2], [3] and [4]) where the pooling is a way to reduce dimensionality of the features while preserving spatial information. Handcrafted spatial pooling schemes that operate on an image-level are still part of many state of the art architectures. In particular, recent approaches that aim at higher-level semantic representations (e.g. [3], [6]) follow this paradigm and are within the scope of our method. We therefore believe that our method will find wide applicability in those scenarios.
Anonymous 45d8:
We don't agree that CIFAR-100 is less-competitive as the state-of-the-art results are lower than CIFAR-10, moreover CIFAR-100 contains fewer examples per class for training and 10x more classes.
We are not restricted to sum pooling as back-propagation over the max operator is possible.
We use non-negativity constraint for the weights as Formula 5 shows.
Sparsity constraint on the weights has no computational benefits at test time as the weighted sum ranges over the whole image.
Concerning the remarks about increased computation time, we would like to point out that computational costs are dominated by the coding procedure. The pooling stage - hand-crafted or learnt - is on the order of milliseconds per image.
The connection between the matrix factorization of the weights of the softmax classifier and pooling stage is an interesting additional observation, however, the paper analyzes the regularization terms of the pooling operator and therefore regularization of the factorized weight matrix.
In our work we want to make our architecture consistent with other computer vision architectures that use image-level pooling stage ([1], [2], [3], [4] and [5]) exploiting the shared representation among classes and computational benefits of this method.
Anonymous 2426:
The method produces state-of-the-art results, at the time of submission, on CIFAR-100 and state-of-the-art on both CIFAR-10 and CIFAR-100 given SPM architecture ([1], [2], [4]).
As our results show, the smoothness constrain/regularization is the most crucial (Table 3), non-negativity constraint though increases the interpretability of the results. We use lbfgs with projection onto a unit box after every weights update.
Although some of our speed-ups to make the system more scalable are heuristic, they are appreciated e.g. by 'Anonymous c1a0' and share similarities with recently proposed approaches for scalable learning as we reference in the paper.
Anonymous c1a0:
Increasing number of classification parameters in the SPM architecture ([1], [2], [4]) requires a bigger codebooks which increases the complexity of encoding step as every image patch has to be assigned to a cluster via triangle coding [4]. This would lead to a significant increase at test time. On the other hand, our architecture adds little overhead compared to SPM architectures at the test time.
Anonymous 45d8 & Anonymous 2426:
The pre-pooling step is pooling over a small neighborhood (over a 3x3 neighboring pixels), and therefore can be seen as form of weight sharing. This is a technical detail in order to reduce memory consumption and training time. This doesn't defy the main argument given in the paper as pooling is learnt over larger areas.
|
Mateusz Malinowski, Mario Fritz
| null | null |
{"id": "bYfTY-ABwrbB2", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363737660000, "tmdate": 1363737660000, "ddate": null, "number": 7, "content": {"title": "", "review": "We thank all the reviewers for their comments.\r\nWe will include suggested papers on related work and origins of pooling architectures as well as improvement on the state of the art that occurred in the meanwhile.\r\nThe reviewers acknowledge our analysis of regularization schemes to learn weighted pooling units together with a regularizer that promotes spatial smoothness.\r\n\r\nOur work aims at replacing hand-crafted pooling stage in computer vision architectures ([1], [2], [3] and [4]) where the pooling is a way to reduce dimensionality of the features while preserving spatial information. Handcrafted spatial pooling schemes that operate on an image-level are still part of many state of the art architectures. In particular, recent approaches that aim at higher-level semantic representations (e.g. [3], [6]) follow this paradigm and are within the scope of our method. We therefore believe that our method will find wide applicability in those scenarios.\r\n\r\nAnonymous 45d8:\r\nWe don't agree that CIFAR-100 is less-competitive as the state-of-the-art results are lower than CIFAR-10, moreover CIFAR-100 contains fewer examples per class for training and 10x more classes.\r\nWe are not restricted to sum pooling as back-propagation over the max operator is possible. \r\nWe use non-negativity constraint for the weights as Formula 5 shows.\r\nSparsity constraint on the weights has no computational benefits at test time as the weighted sum ranges over the whole image. \r\nConcerning the remarks about increased computation time, we would like to point out that computational costs are dominated by the coding procedure. The pooling stage - hand-crafted or learnt - is on the order of milliseconds per image.\r\nThe connection between the matrix factorization of the weights of the softmax classifier and pooling stage is an interesting additional observation, however, the paper analyzes the regularization terms of the pooling operator and therefore regularization of the factorized weight matrix.\r\nIn our work we want to make our architecture consistent with other computer vision architectures that use image-level pooling stage ([1], [2], [3], [4] and [5]) exploiting the shared representation among classes and computational benefits of this method.\r\n\r\nAnonymous 2426:\r\nThe method produces state-of-the-art results, at the time of submission, on CIFAR-100 and state-of-the-art on both CIFAR-10 and CIFAR-100 given SPM architecture ([1], [2], [4]).\r\nAs our results show, the smoothness constrain/regularization is the most crucial (Table 3), non-negativity constraint though increases the interpretability of the results. We use lbfgs with projection onto a unit box after every weights update. \r\nAlthough some of our speed-ups to make the system more scalable are heuristic, they are appreciated e.g. by 'Anonymous c1a0' and share similarities with recently proposed approaches for scalable learning as we reference in the paper.\r\n\r\nAnonymous c1a0:\r\nIncreasing number of classification parameters in the SPM architecture ([1], [2], [4]) requires a bigger codebooks which increases the complexity of encoding step as every image patch has to be assigned to a cluster via triangle coding [4]. This would lead to a significant increase at test time. On the other hand, our architecture adds little overhead compared to SPM architectures at the test time.\r\n\r\nAnonymous 45d8 & Anonymous 2426:\r\nThe pre-pooling step is pooling over a small neighborhood (over a 3x3 neighboring pixels), and therefore can be seen as form of weight sharing. This is a technical detail in order to reduce memory consumption and training time. This doesn't defy the main argument given in the paper as pooling is learnt over larger areas."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["Mateusz Malinowski, Mario Fritz"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 4,
"importance_and_relevance": 2,
"materials_and_methods": 20,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 7,
"suggestion_and_solution": 3,
"total": 27
}
| 1.518519
| -1.574838
| 3.093356
| 1.572411
| 0.506506
| 0.053892
| 0.074074
| 0.148148
| 0.074074
| 0.740741
| 0.074074
| 0.037037
| 0.259259
| 0.111111
|
{
"criticism": 0.07407407407407407,
"example": 0.14814814814814814,
"importance_and_relevance": 0.07407407407407407,
"materials_and_methods": 0.7407407407407407,
"praise": 0.07407407407407407,
"presentation_and_reporting": 0.037037037037037035,
"results_and_discussion": 0.25925925925925924,
"suggestion_and_solution": 0.1111111111111111
}
| 1.518519
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
This is an interesting investigation and I only have remarks to make regarding the CIFAR-10 and CIFAR-100 results and the rapidly moving state-of-the-art (SOTA). In particular, on CIFAR-100, the 56.29% accuracy is not state-of-the-art anymore (thankfully, our field is moving fast!). There was first the result by Zeiler & Fergus using stochastic pooling, bringing the SOTA to 57.49% accuracy. Then, using another form of pooling innovation (max-linear pooling units with dropout, which we call maxout units), we brought the SOTA on CIFAR-100 to 61.43% accuracy. On CIFAR-10, maxout networks also beat the SOTA, bringing it to 87.07% accuracy. All these are of course without using any deformations.
You can find these in this arxiv paper (which appeared after your submission): http://arxiv.org/abs/1302.4389
Maxout units also use linear filters pooled with a max, but without the positivity constraint. We found that using dropout on the max output makes a huge difference in performance, so you may want to try that as well.
|
Yoshua Bengio
| null | null |
{"id": "DtAvRX423kRIf", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361903280000, "tmdate": 1361903280000, "ddate": null, "number": 1, "content": {"title": "", "review": "This is an interesting investigation and I only have remarks to make regarding the CIFAR-10 and CIFAR-100 results and the rapidly moving state-of-the-art (SOTA). In particular, on CIFAR-100, the 56.29% accuracy is not state-of-the-art anymore (thankfully, our field is moving fast!). There was first the result by Zeiler & Fergus using stochastic pooling, bringing the SOTA to 57.49% accuracy. Then, using another form of pooling innovation (max-linear pooling units with dropout, which we call maxout units), we brought the SOTA on CIFAR-100 to 61.43% accuracy. On CIFAR-10, maxout networks also beat the SOTA, bringing it to 87.07% accuracy. All these are of course without using any deformations.\r\n\r\nYou can find these in this arxiv paper (which appeared after your submission): http://arxiv.org/abs/1302.4389\r\n\r\nMaxout units also use linear filters pooled with a max, but without the positivity constraint. We found that using dropout on the max output makes a huge difference in performance, so you may want to try that as well."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["Yoshua Bengio"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 4,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 3,
"suggestion_and_solution": 2,
"total": 8
}
| 1.5
| 1.105439
| 0.394561
| 1.514897
| 0.19416
| 0.014897
| 0.125
| 0
| 0.125
| 0.5
| 0.125
| 0
| 0.375
| 0.25
|
{
"criticism": 0.125,
"example": 0,
"importance_and_relevance": 0.125,
"materials_and_methods": 0.5,
"praise": 0.125,
"presentation_and_reporting": 0,
"results_and_discussion": 0.375,
"suggestion_and_solution": 0.25
}
| 1.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
I'm not sure why the authors are claiming state of the art on CIFAR-10 in their response, because the paper doesn't make this claim and I don't see any update to the paper. The method does not actually have state of the art on CIFAR-10 even under the constraint that it follow the architecture considered in the paper. It's nearly as good as Jia and Huang's method but not quite as good.
Back-propagation over the max operator may be possible, but how would you parameterize the max to include or exclude different input features? Each max pooling unit needs to take the max over some subset of the detector layer features. Since including or excluding a feature in the max is a hard 0/1 decision it's not obvious how to learn those subsets using your gradient based method.
Regarding the competitiveness of CIFAR-100: This is not a very important point because CIFAR-100 being competitive or not doesn't enter much into my evaluation of the paper. It's still true that the proposed method beats Jia and Huang on that dataset. However, I do think that my opinion of CIFAR-100 as being less competitive than CIFAR-10 is justified. I'm aware that CIFAR-100 has fewer examples per class and that this explains why the error rates published on that dataset are higher. My reason for considering it less competitive is that the top two papers on CIFAR-100 right now both say that they didn't even bother optimizing their hyperparameters for that dataset. Presumably, anyone could easily get a better result on that dataset just by downloading the code for one of those papers and playing with the hyperparameters for a day or two.
|
anonymous reviewer 45d8
| null | null |
{"id": "6tLOt5yk_I6cd", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363741140000, "tmdate": 1363741140000, "ddate": null, "number": 4, "content": {"title": "", "review": "I'm not sure why the authors are claiming state of the art on CIFAR-10 in their response, because the paper doesn't make this claim and I don't see any update to the paper. The method does not actually have state of the art on CIFAR-10 even under the constraint that it follow the architecture considered in the paper. It's nearly as good as Jia and Huang's method but not quite as good.\r\n\r\nBack-propagation over the max operator may be possible, but how would you parameterize the max to include or exclude different input features? Each max pooling unit needs to take the max over some subset of the detector layer features. Since including or excluding a feature in the max is a hard 0/1 decision it's not obvious how to learn those subsets using your gradient based method.\r\n\r\nRegarding the competitiveness of CIFAR-100: This is not a very important point because CIFAR-100 being competitive or not doesn't enter much into my evaluation of the paper. It's still true that the proposed method beats Jia and Huang on that dataset. However, I do think that my opinion of CIFAR-100 as being less competitive than CIFAR-10 is justified. I'm aware that CIFAR-100 has fewer examples per class and that this explains why the error rates published on that dataset are higher. My reason for considering it less competitive is that the top two papers on CIFAR-100 right now both say that they didn't even bother optimizing their hyperparameters for that dataset. Presumably, anyone could easily get a better result on that dataset just by downloading the code for one of those papers and playing with the hyperparameters for a day or two."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 45d8"], "writers": ["anonymous"]}
|
{
"criticism": 6,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 11,
"praise": 1,
"presentation_and_reporting": 1,
"results_and_discussion": 2,
"suggestion_and_solution": 3,
"total": 12
}
| 2
| 1.984218
| 0.015782
| 2.021859
| 0.247019
| 0.021859
| 0.5
| 0
| 0
| 0.916667
| 0.083333
| 0.083333
| 0.166667
| 0.25
|
{
"criticism": 0.5,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.9166666666666666,
"praise": 0.08333333333333333,
"presentation_and_reporting": 0.08333333333333333,
"results_and_discussion": 0.16666666666666666,
"suggestion_and_solution": 0.25
}
| 2
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
This paper proposes a method to jointly train a pooling layer and a classifier in a supervised way.
The idea is to first extract some features and then train a 2 layer neural net by backpropagation (although in practice they use l-bfgs). The first layer is linear and the parameters are box constrained and regularized to be spatially smooth. The authors propose also several little tricks to speed up training (divide the space into smaller pools, partition the features, etc.).
Most relevant work related to this method is cited but some references are missing.
For instance, learning pooling (and unappealing) regions was also proposed by Zeiler et al. in an unsupervised setting:
Differentiable Pooling for Hierarchical Feature Learning
Matthew D. Zeiler and Rob Fergus
arXiv:1207.0151v1 (July 3, 2012)
See below for other missing references.
The overall novelty is limited but sufficient. In my opinion the most novel piece in this work is the choice of the regularizer that enforces smoothness in the weights of the pooling. This regularization term is not new per se, but its application to learning filters certainly is.
The overall quality is fair. The paper lacks clarity in some parts and the empirical validation is ok but not great.
I wish the authors stressed more the importance of the weight regularization and analyzed that part a bit more in depth instead of focussing on other aspects of their method which seem less exciting actually.
PROS
+ nice idea to regularize weights promoting spatial smoothness
+ nice visualization of the learned parameters
CONS
- novelty is limited and the overall method relies on heuristics to improve its scalability
- empirical validation is ok but not state of the art as claimed
- some parts of the paper are not clear
- some references are missing
Detailed comments:
- The notation in sec. 2.2 could be improved. In particular, it seems to me that pooling is just a linear projection subject to constraints in the parameterization. The authors mentions that constraints are used just for interpretability but I think they are actually important to make the system 'less unidentifiable' (since it is the composition of two linear stages).
Regarding the box constraints, I really do not understand how the authors modified l-bfgs to account for these box constraints since this is an unconstrained optimization method. A detailed explanation is required for making this method reproducible. Besides, why not making the weights non-negative and sum to one instead?
- The pre-pooling step is unsatisfying because it seems to defeat the whole purpose of the method. Effectively, there seem to be too many other little tricks that need to be in place to make this method competitive.
- Other people have reported better accuracy on these datasets. For instance,
Practical Bayesian Optimization of Machine Learning Algorithms
Jasper Snoek, Hugo Larochelle and Ryan Prescott Adams
Neural Information Processing Systems, 2012
- There are lots of imprecise claims:
- convolutional nets before HMAX and SPM used pooling and they actually learned weights in the average pooling/subsampling step
- 'logistic function' in pag. 3 should be 'softmax function'
- the contrast with the work by Le et al. on pag.4 is weak since although pooling regions can be trained in parallel but the classifier trained on the top of them has to be done afterwards. This sequential step makes the whole procedure less parallelizable.
- second paragraph of sec. 3.2 about 'transfer pooling regions' is not clear.
|
anonymous reviewer 2426
| null | null |
{"id": "4w1kwHXszr4D8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362138060000, "tmdate": 1362138060000, "ddate": null, "number": 5, "content": {"title": "review of Learnable Pooling Regions for Image Classification", "review": "This paper proposes a method to jointly train a pooling layer and a classifier in a supervised way. \r\nThe idea is to first extract some features and then train a 2 layer neural net by backpropagation (although in practice they use l-bfgs). The first layer is linear and the parameters are box constrained and regularized to be spatially smooth. The authors propose also several little tricks to speed up training (divide the space into smaller pools, partition the features, etc.).\r\n\r\nMost relevant work related to this method is cited but some references are missing.\r\nFor instance, learning pooling (and unappealing) regions was also proposed by Zeiler et al. in an unsupervised setting:\r\nDifferentiable Pooling for Hierarchical Feature Learning\r\nMatthew D. Zeiler and Rob Fergus\r\narXiv:1207.0151v1 (July 3, 2012)\r\nSee below for other missing references.\r\n\r\nThe overall novelty is limited but sufficient. In my opinion the most novel piece in this work is the choice of the regularizer that enforces smoothness in the weights of the pooling. This regularization term is not new per se, but its application to learning filters certainly is.\r\nThe overall quality is fair. The paper lacks clarity in some parts and the empirical validation is ok but not great.\r\nI wish the authors stressed more the importance of the weight regularization and analyzed that part a bit more in depth instead of focussing on other aspects of their method which seem less exciting actually.\r\n\r\nPROS\r\n+ nice idea to regularize weights promoting spatial smoothness\r\n+ nice visualization of the learned parameters\r\n\r\nCONS\r\n- novelty is limited and the overall method relies on heuristics to improve its scalability\r\n- empirical validation is ok but not state of the art as claimed\r\n- some parts of the paper are not clear\r\n- some references are missing\r\n\r\nDetailed comments:\r\n- The notation in sec. 2.2 could be improved. In particular, it seems to me that pooling is just a linear projection subject to constraints in the parameterization. The authors mentions that constraints are used just for interpretability but I think they are actually important to make the system 'less unidentifiable' (since it is the composition of two linear stages). \r\nRegarding the box constraints, I really do not understand how the authors modified l-bfgs to account for these box constraints since this is an unconstrained optimization method. A detailed explanation is required for making this method reproducible. Besides, why not making the weights non-negative and sum to one instead?\r\n- The pre-pooling step is unsatisfying because it seems to defeat the whole purpose of the method. Effectively, there seem to be too many other little tricks that need to be in place to make this method competitive.\r\n- Other people have reported better accuracy on these datasets. For instance, \r\nPractical Bayesian Optimization of Machine Learning Algorithms\r\nJasper Snoek, Hugo Larochelle and Ryan Prescott Adams\r\nNeural Information Processing Systems, 2012\r\n- There are lots of imprecise claims:\r\n - convolutional nets before HMAX and SPM used pooling and they actually learned weights in the average pooling/subsampling step\r\n - 'logistic function' in pag. 3 should be 'softmax function'\r\n - the contrast with the work by Le et al. on pag.4 is weak since although pooling regions can be trained in parallel but the classifier trained on the top of them has to be done afterwards. This sequential step makes the whole procedure less parallelizable.\r\n - second paragraph of sec. 3.2 about 'transfer pooling regions' is not clear."}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 2426"], "writers": ["anonymous"]}
|
{
"criticism": 10,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 20,
"praise": 1,
"presentation_and_reporting": 6,
"results_and_discussion": 1,
"suggestion_and_solution": 5,
"total": 29
}
| 1.551724
| -2.488578
| 4.040302
| 1.596763
| 0.438764
| 0.045039
| 0.344828
| 0
| 0.068966
| 0.689655
| 0.034483
| 0.206897
| 0.034483
| 0.172414
|
{
"criticism": 0.3448275862068966,
"example": 0,
"importance_and_relevance": 0.06896551724137931,
"materials_and_methods": 0.6896551724137931,
"praise": 0.034482758620689655,
"presentation_and_reporting": 0.20689655172413793,
"results_and_discussion": 0.034482758620689655,
"suggestion_and_solution": 0.1724137931034483
}
| 1.551724
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
rOvg47Txgprkn
|
Learnable Pooling Regions for Image Classification
|
From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.
|
Learnable Pooling Regions for Image Classification
Mateusz Malinowski
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mmalinow at mpi-inf.mpg.de
Mario Fritz
Computer Vision and Multimodal Computing
Max Planck Institute for Informatics
Campus E1 4, 66123 Saarbr¨ucken, Germany
mfritz at mpi-inf.mpg.de
Abstract
Biologically inspired, from the early HMAX model to Spatial Pyramid Match-
ing, pooling has played an important role in visual recognition pipelines. Spatial
pooling, by grouping of local codes, equips these methods with a certain degree
of robustness to translation and deformation yet preserving important spatial in-
formation. Despite the predominance of this approach in current recognition sys-
tems, we have seen little progress to fully adapt the pooling strategy to the task at
hand. This paper proposes a model for learning task dependent pooling scheme
– including previously proposed hand-crafted pooling schemes as a particular in-
stantiation. In our work, we investigate the role of different regularization terms
showing that the smooth regularization term is crucial to achieve strong perfor-
mance using the presented architecture. Finally, we propose an efficient and par-
allel method to train the model. Our experiments show improved performance
over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets –
in particular improving the state-of-the-art to 56.29% on the latter.
1 Introduction
Spatial pooling plays a crucial role in modern object recognition and detection systems. Motivated
from biology [Riesenhuber and Poggio, 2009] and statistics of locally orderless images [Koenderink
and Van Doorn, 1999], the spatial pooling approach has been found useful as an intermediate step
of many today’s computer vision methods. For instance, the most popular visual descriptors such as
SIFT [Lowe, 2004] and HOG [Dalal and Triggs, 2005], which compute local histograms of gradi-
ents, can be in fact seen as a special version of the spatial pooling strategy. In order to form more
robust features under translation or small object deformations, activations of the codes are pooled
over larger areas in a spatial pyramid scheme [Lazebnik et al., 2006, Yang et al., 2009]. Unfortu-
nately, this critical decision, namely the spatial division, is most prominently based on hand-crafted
algorithms and therefore data independent.
Related Work As large amounts of training data is available to us today,, there is an increasing
interest to push the boundary of learning based approaches towards fully optimized and adaptive
architectures where design choices, that would potentially constrain or bias a model, are kept to a
minimum. Neural networks have a great tradition of approaching hierarchical learning problems
and training intermediate representations [Ranzato et al., 2007, Le et al., 2012a]. Along this line, we
propose a learnable spatial pooling strategy that can shape the pooling regions in a discriminative
manner. Our architecture has a direct interpretation as a pooling strategy and therefore subsumes
popular spatial pyramids as a special case. Yet we have the freedom to investigate different regular-
ization terms that lead to new pooling strategies when optimized jointly with the classifier.
Recent progress has been made in learning pooling regions in the context of image classification
using the Spatial Pyramid Matching (SPM) pipeline [Lazebnik et al., 2006, Yang et al., 2009]. Jia
1
arXiv:1301.3516v3 [cs.CV] 5 May 2015
and Huang [2011], Jia et al. [2012] and Feng et al. [2011] have investigated how to further liber-
ate the recognition from preconceptions of the hand crafted recognition pipelines, and include the
pooling strategy into the optimization framework jointly with the classifier. However, these methods
still make strong assumptions on the solutions that can be achieved. For instance Jia and Huang
[2011] optimizes binary pooling strategies that are given by the superposition of rectangular basis
functions, and Feng et al. [2011] finds pooling regions by applying a linear discriminant analysis
for individual pooling strategies and training a classifier afterwards. Also as opposed to Ranzato
and Hinton [2010], we aim for discriminative pooling over large neighborhoods in the SPM fashion
where the information about the image class membership is available during training.
Outline We question restrictions imposed by the above methods and suggest to learn pooling
strategies under weaker assumptions. Indeed, our method discovers new pooling shapes that were
not found previously as they were suppressed by the more restrictive settings.
The generality that we are aiming for comes at the price of a high dimensional parameters space.
This manifests in a complex optimization problem that is more demanding on memory requirements
as well as computations needs, not to mention a possibility of over-fitting. Therefore, we also discuss
two approximations to our method. First approximation introduces a pre-pooling step and therefore
reduces the spatial dimension of the codes. The second approximation divides the codes into a set
of smaller batches (subset of codes) that can be optimized independently and therefore in parallel.
Finally, we evaluate our method on the CIFAR-10 and show strong improvements over hand-crafted
pooling schemes in the regime of small dictionaries where our more flexible model shows its capa-
bility to make best use of the representation by exploring spatial pooling strategies specific to each
coordinate of the code. Despite the diminishing return, the performance improvements persist up to
largest codes we have investigated. We also show strong classification performance on the CIFAR-
100 dataset where our method outperforms, to the best of our knowledge, the state-of-the-art.
2 Method
As opposed to the methods that use fixed spatial pooling regions in the object classification task
[Lazebnik et al., 2006, Yang et al., 2009] our method jointly optimizes both the classifier and the
pooling regions. In this way, the learning signal available in the classifier can help shaping the
pooling regions in order to arrive at better pooled features.
2.1 Parameterized pooling operator
The simplest form of the spatial pooling is computing histogram over the whole image. This can
be expressed as Σ(U) := ∑M
j=1 uj, where uj ∈RK is a code (out of M such codes) and an
index j refers to the spatial location that the code originates from 1. A code is an encoded patch
extracted from the image. The proposed method is agnostic to the patch extraction method and
encoding scheme. Since the pooling approach looses spatial information of the codes, Lazebnik
et al. [2006] proposed to first divide the image into subregions, and afterwards to create pooled
features by concatenating histograms computed over each subregion. There are two problems with
such an approach: first, the division is largely arbitrary and in particular independent of the data;
second, discretization artifacts occur as spatially nearby codes can belong to two different regions
as the ’hard’ division is made.
In this paper we address both problems by using a parameterized version of the pooling operator
Θw(U) :=
M∑
j=1
wj ◦uj (1)
where a ◦b is the element-wise multiplication. Standard spatial division of the image can be re-
covered from Formula 1 by setting the vectors wj either to a vector of zeros 0, or ones 1. For
instance, features obtained from dividing the image into 2 subregions can be recovered from Θ by
1That is j = (x, y) where x and y refer to the spatial location of the center of the extracted patch.
2
concatenating two vectors: ∑M
2
j=1 1 ◦uj + ∑M
j= M
2 +1 0 ◦uj, and ∑M
2
j=1 0 ◦uj + ∑M
j= M
2 +1 1 ◦uj,
where
{
1,..., M
2
}
and
{M
2 + 1,...,M
}
refer to the first and second half of the image respectively.
In general, let F := {Θw}w be a family of the pooling functions given by Eq. 1, parameterized
by the vector w, and let w∗,l be the ’best’ parameter chosen from the familyF based on the initial
configuration land a given set of images.2 First row of Figure 2 shows four initial configurations that
mimic the standard 2-by-2 spatial image division. Every initial configuration can lead to different
w∗,l as it is shown in Figure 2. Clearly, the family F contains all possible ’soft’ and ’hard’ spatial
divisions of the image, and therefore can be considered as their generalization.
2.2 Learnable pooling regions
In SPM architectures the pooling weights w are designed by hand, here we aim for joint learning
w together with the parameters of the classifier. Intuitively, the classifier during training has access
to the classes that the images belong to, and therefore can shape the pooling regions. On the other
hand, the method aggregates statistics of the codes over such learnt regions and pass them to the
classifier allowing to achieve higher accuracy. Such joint training of the classifier and the pooling
regions can be done by adapting the backpropagation algorithm [Bishop, 1999, LeCun et al., 1998],
and so can be interpreted as a densely connected multilayer perceptron [Collobert and Bengio, 2004,
Bishop, 1999].
Consider a sampling scheme and an encoding method producing M codes each K dimensional.
Every coordinate of the code is an input layer for the multilayer perceptron. Then we connect every
j-th input unit at the layer kto the l-th pooling unit ak
l via the relation wk
ljuk
j . Since the receptive
field of the pooling unit ak
l consists of all codes at the layer k, we have ak
l := ∑M
j=1 wk
ljuk
j , and so
in the vector notation
al :=
M∑
j=1
wl
j ◦uj = Θwl(U) (2)
Next, we connect all pooling units with the classifier allowing the information to circulate between
the pooling layers and the classifier.
Although our method is independent of the choice of a dictionary and an encoding scheme, in this
work we use K-means with triangle coding fk(x) := max {0,µ(z) −zk}[Coates et al., 2011].
Similarly, every multi-class classifier that can be interpreted in terms of an artificial neural network
can be used. In our work we employ logistic regression. This classifier is connected to the pooling
units via the formula
J(Θ) := −1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ) (3)
where Ddenotes the number of all images, Cis the number of all classes, y(i) is a label assigned to
the i-th input image, anda(i) are responses from the ’stacked’ pooling units[al]l for the i-th image3.
We use the logistic function to represent the probabilities: p(y = j|x; Θ) :=
exp(θT
j x)∑C
l=1 exp(θT
l x) . Since
the classifier is connected to the pooling units, our task is to learn jointly the pooling parameters W
together with the classifier parameters Θ, where W is the matrix containing all pooling weights.
Finally, we use standard gradient descent algorithm that updates the parameters using the following
fixed point iteration
Xt+1 := Xt −γ∇J(Xt) (4)
where in our caseX is a vector consisting of the pooling parametersW and the classifier parameters
Θ. In practice, however, we employ a quasi-Newton algorithm LBFGS4.
2 We will show the learning procedure that can select such parameter vectors in the following subsection.
3Providing the codes U(i) are collected from the i-th image and a(i)
l := Θwl(U(i)) then a(i) := [a(i)
l ]l.
4The algorithm, developed by Mark Schmidt, can be downloaded from the following webpage:
http://www.di.ens.fr/ mschmidt/Software/minFunc.html
3
2.3 Regularization terms
In order to improve the generalization, we introduce regularization of our network as we deal with
a large number of the parameters. For the classification Θ and pooling parameters W, we employ
a simple L2 regularization terms: ||Θ||2
l2 and ∑
k ||Wk||2
l2 . We improve the interpretability of the
pooling weights as well as to facilitate a transfer among models by adding a projection onto a unit
cube. To reduce quantization artifacts of the pooling strategy as well as to ensure smoothness of
the output w.r.t. small translations of the image, the model penalizes weights whenever the pooling
surface is non-smooth. This can be done by measuring the spatial variation, that is ||∇xWk||2
l2 +
||∇yWk||2
l2 for every layer k. This regularization enforces soft transition between the pooling
subregions.
Every regularization term comes with its own hyper-parameter set by cross-validation. The overall
objective that we want to optimize is
minimize
W,Θ
JR(Θ,W) := (5)
− 1
D
D∑
i=1
C∑
j=1
1{y(i) = j}log p(y(i) = j|a(i); Θ)
+ α1
2 ||Θ||2
l2 + α2
2 ||W||2
l2
+ α3
2
(
||∇xW||2
l2 + ||∇yW||2
l2
)
subject to W ∈[0,1]K×M×L
where al is the l-th pooling unit described by Formula 2, and ||W||l2 is the Frobenius norm.
2.4 Approximation of the model
The presented approach is demanding to train in the means of the CPU time and memory storage
when using high dimensional representations. That is, the number of the pooling parameters to
learn grows as K×M×L, where Kis dimensionality of codes, M is the number of patches taken
from the image and Lis the number of pooling units. Therefore, we propose two approximations
to our method making the whole approach more scalable towards bigger dictionaries. However, we
emphasize that learnt pooling regions have very little if any overhead compared to standard spatial
division approaches at test time.
First approximation does a fine-grained spatial partition of the image, and then pools the codes over
such subregions. This operation, we call it a pre-pooling step, reduces the number of considered
spatial locations by the factor of the pre-pooling size. For instance, if we collect M codes and the
pre-pooling size is Sper dimension, then we reduce the number of codes to a number M
S2 . The pre-
pooling operation fits well into our generalization of the SPM architectures as by choosing S := M
2
we obtain a weighted quadrants scheme. Moreover, the modeler has the option to start with the
larger S when little data is available and gradually decreases S as more parameters can be learnt
using more data.
The second approximation divides a K dimensional code into K
D batches, each D dimensional
(where D≤Kand Kis divisible by D). Then we train our model on all such batches in parallel to
obtain the pooling weights. Later, we train the classifier on top of the concatenation of the trained,
partial models. As opposed to Le et al. [2012b] our training is fully independent and doesn’t need
communication between different machines.
Since the ordering of the codes is arbitrary, we also considerDdimensional batches formed from the
permuted version of the original codes, and combine them together with the concatenated batches to
boost the classification accuracy (we call this approximation redundant batches). Given a fixed sized
dictionary, this approximation performs slightly better, although it comes at the cost of increased
number of features due to the redundant batches.
4
Finally, our approximations not only lead to a highly parallel training procedure with reduced mem-
ory requirements and computational demands, but also have shown to greatly reduce the number
of required iterations as they tend to converge roughly 5 times faster than the full model on large
dictionaries.
3 Experimental Results
We evaluate our method on the CIFAR-10 and CIFAR-100 datasets [Krizhevsky and Hinton, 2010].
Furthermore, we provide insights into the learnt pooling strategies as well as investigate transfer
between datasets. In this section we describe our experimental setup, and present our results on both
datasets.
3.1 CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 and CIFAR-100 datasets contain 50000 training color images and 10000 test color
images from respectively 10 and 100 categories, with 6000 and 600 images per class respectively.
All images have the same size: 32 ×32 pixels, and were sampled from the 80 million tiny images
dataset [Torralba et al., 2008].
3.2 Evaluation pipeline
In this work, we follow the Coates and Ng [2011] pipeline. We extract normalized and whitened
6 ×6 patches from images using a dense, equispaced grid with a unit sample spacing. As the next
step, we employ the K-means assignment and triangle encoding [Coates and Ng, 2011, Coates et al.,
2011] to compute codes – a K-dimensional representation of the patch. We classify images using
either a logistic regression, or a linear SVM in the case of transferred pooling regions. Optionally we
use two approximations described in subsection 2.4. As we want to be comparable to Coates et al.
[2011], who use a spatial division into 2-by-2 subregions which results in 4 ·Kpooled features, we
use 4 pooling units. Furthermore, we use standard division (first row of Figure 2) as an initialization
of our model.
To learn parameters of the model we use the limited-memory BFGS algorithm (details are described
in subsection 2.2), and limit the number iterations to 3000. After the training, we can also concate-
nate the results of the parameterized pooling operator[Θwl(U)]4
l=1. This yields a 4 ·Kdimensional
feature vector that can be again fed into the classifier, and trained independently with the already
trained pooling regions. We call this procedure transfer of pooling regions.
The reason behind the transfer is threefold. Firstly, we can combine partial models trained with our
approximation in batches to a full, originally intractable, model 5. Secondly, the transfer process
allows to combine both the codes and the learnt model from the dictionaries of different sizes.
Lastly, it enables training of the pooling regions together with the classifier on one dataset, and then
re-train the classifier alone on a target dataset. To transfer the pooling regions, we tried logistic
regression classifier and linear SVM showing that both classifying procedures can benefit from the
learnt pooling regions. However, since we achieve slightly better results for the linear SVM (about
0.5% for bigger dictionaries), only those results are reported. Similarly, we don’t notice significant
difference in the classification accuracy for smaller dictionaries when the pre-pooling is used (with
the pre-pooling size S := 3), and therefore all experiments refer only to this case. Finally, we select
hyper-parameters of our model based on the 5-fold cross-validation.
3.3 Evaluation of our method on small dictionaries
Figure 1(a) shows the classification accuracy of our full method against the baseline [Coates and Ng,
2011]. Since we train the pooling regions without any approximations in this set of experiments the
results are limited to dictionary sizes up to 800. Our method outperforms the approach of Coates by
10% for dictionary size 16 (our method achieves the accuracy 57.07%, whereas the baseline only
46.93%). This improvement is consistent up to the bigger dictionaries although the margin is getting
5The reader can find details of such approximation in subsection 2.4.
5
0 50 100 150 200 250 300 350 40035
40
45
50
55
60
65
70
75
80
Dictionary size
Accuracy
Our
Coates
Random Pooling
Bag of Features
(a)
200 400 600 800 1000 1200 1400 160055
60
65
70
75
80
85
Dictionary size
Accuracy
Our (redundant batches)
Our (batches)
Our
Coates
Random Pooling
Bag of Features (b)
Figure 1: Figure 1(a) shows accuracy of the classification with respect to the number of dictionary elements on
smaller dictionaries. Figure 1(b) shows the accuracy of the classification for bigger dictionaries when batches,
and the redundant batches were used. Experiments are done on CIFAR-10.
smaller. Our method is about 2.5% and 1.88% better than the baseline for 400 and 800 dictionary
elements respectively.
3.4 Scaling up to sizable dictionaries
In subsection 2.4 we have discussed the possibility of dividing the codes into low dimensional
batches and learning the pooling regions on those. In the following experiments we use batches
with 40 coordinates extracted from the original code, as those fit conveniently into the memory of a
single, standard machine (about 5 Gbytes for the main data) and can all be trained in parallel.
Besides a reduction in the memory requirements, the batches have shown multiple benefits in prac-
tice due to smaller number of parameters. We need less computations per iterations as well as
observe faster convergence. Figure 1(b) shows the classification performance for larger dictionar-
ies where we examined the full model [Our], the baseline [Coates], random pooling regions (de-
scribed in subsection 3.5), bag of features, and two possible approximation - the batched model
[Our (batches)], and the redundantly batched model [Our (redundant batches)].
Our test results are presented in Table 1. When comparing our full model to the approximated
versions with batches for dictionaries of size 200, 400 and 800, we observe that there is almost no
drop in performance and we even slightly improve for the bigger dictionaries. We attribute this to the
better conditioned learning problem of the smaller codes within one batch. With an accuracy for the
batched model of 79.6% we outperform the Coates baseline by 1.7%. Interestingly, we gain another
small improvement to 80.02% by adding redundant batches which amounts to a total improvement
of 2.12% compared to the baseline. Our method performs comparable to the pooling strategy of
Jia and Huang [2011] which uses more restrictive assumptions on the pooling regions and employs
feature selection algorithm.
Method Dict. size Features Acc.
Jia 1600 6400 80.17%
Coates 1600 6400 77.9%
Our (batches) 1600 6400 79.6%
Our (redundant) 1600 12800 80.02%
Table 1: Comparison of our methods against the baseline [Coates and Ng, 2011] and Jia and Huang [2011] with
respect to the dictionary size, number of features and the test accuracy on CIFAR-10.
To the best of our knowledge Ciresan et al. [2012] achieves the best results on the CIFAR-10 dataset
with an accuracy 88.79% with a method based on a deep architecture – different type of architecture
to the one that we investigate in our study. More recently Goodfellow et al. [2013] has achieved
accuracy 90.62% with new maxout model that takes an advantage of dropout.
6
regularization pooling weights
dataset: CIFAR-10 ; dictionary size: 200
Coates (no learn.)
l2
smooth
smooth & l2
dataset: CIFAR-10 ; dictionary size: 1600
smooth & batches
dataset: CIFAR-100 ; dictionary size: 1600
smooth & batches
Table 2: Visualization of different pooling strategies obtained for different regularizations, datasets and dic-
tionary size. Every column shows the regions from two different coordinates of the codes. First row presents
the initial configuration also used in standard hand-crafted pooling methods. Brighter regions denote larger
weights.
3.5 Random pooling regions
Our investigation also includes results using random pooling regions where the weights for the
parameterized operator (Eq. 2) were sampled from normal distribution with mean 0.5 and standard
deviation 0.1, that is wl
j ∼N (0.5,0.1) for all l. This notion of the random pooling differs from
the Jia et al. [2012] where random selection of rectangles is used. The experiments show that the
random pooling regions can compete with the standard spatial pooling (Figure 1(a) and 1(b)) on the
CIFAR-10 dataset, and suggest that random projection can still preserve some spatial information.
This is especially visible in the regime of bigger dictionaries where the difference is only 1.09%.
The obtained results indicate that hand-crafted division of the image into subregions is questionable,
and call for a learning-based approach.
3.6 Investigation of the regularization terms
Our model (Eq. 5) comes with two regularization terms associated with the pooling weights, each
imposing different assumptions on the pooling regions. Hence, it is interesting to investigate their
role in the classification task by considering all possible subsets of {l2,smooth}, where “l2” and
“smooth” refer to ||W||2
l2 and
(
||∇xW||2
l2 + ||∇yW||2
l2
)
respectively.
Table 3 shows our results on CIFAR-10. We choose a dictionary size of 200 for these experiments,
so that we can evaluate different regularization terms without any approximations. We conclude that
the spatial smoothness regularization term is crucial to achieve a good predictive performance of
our method whereas the l2-norm term can be left out, and thus also reducing the number of hyper-
parameters. Based on the cross-validation results (second column of Table 3), we select this setting
for further experiments.
Regularization CV Acc. Test Acc.
free 68.48% 69.59%
l2 67.86% 68.39%
smooth 73.36% 73.96%
l2 + smooth 70.42% 70.32%
Table 3: We investigate the impact of the regularization terms on the CIFAR-10 dataset with dictionary size
equals to 200. Term “free” denotes the objective function without the l2-norm and smoothness regularization
terms. The cross-validation accuracy and test accuracy are shown.
7
3.7 Experiments on the CIFAR-100 dataset
Although the main body of work is conducted on the CIFAR-10 dataset, we also investigate how
the model performs on the much more demanding CIFAR-100 dataset with 100 classes. Our model
with the spatial smoothness regularization term on the 40 dimensional batches achieves 56.29%
accuracy. To our best knowledge, this result consitutes the state-of-the-art performance on this
dataset, outperforming Jia and Huang [2011] by 1.41%, and the baseline by 4.63%. Using different
architecture Goodfellow et al. [2013] has achieved accuracy 61.43%.
Method Dict. size Features Acc.
Jia 1600 6400 54.88%
Coates 1600 6400 51.66%
Our (batches) 1600 6400 56.29%
Table 4: The classification accuracy on CIFAR-100, where our method is compared against the Coates and
Ng [2011] (we downloaded the framework from https://sites.google.com/site/kmeanslearning, we also use 5-
fold cross-validation to choose hyper-parameter C) and Jia and Huang [2011] (here we refer to the NIPS 2011
workshop paper).
3.8 Transfer of the pooling regions between datasets
Beyond the standard classification task, we also examine if the learnt pooling regions are trans-
ferrable between datasets. In this scenario the pooling regions are first trained on the source dataset
and then used on the target dataset to train a new classifier. We use dictionary of 1600 with 40-
dimensional batches. Our results (Table 5) suggest that the learnt pooling regions are indeed trans-
ferable between both datasets. While we observe a decrease in performance when learning the
pooling strategy on the less diverse CIFAR-10 dataset, we do see improvements for learning on the
richer CIFAR-100 dataset. We arrive at a test accuracy of 80.35% which is an additional improve-
ment of 0.75% and 0.18% over our best results (batch-based approximation) and Jia and Huang
[2011] respectively.
Source Target Accuracy
CIFAR-10 CIFAR-100 52.86%
CIFAR-100 CIFAR-10 80.35%
Table 5: We train the pooling regions on the ’Source’ dataset. Next, we use such regions to train the classifier
on the ’Target’ dataset where the test accuracy is reported.
3.9 Visualization and analysis of pooling strategies
Table 2 visualizes different pooling strategies investigated in this paper. The first row shows the
widely used rectangular spatial division of the image. The other visualizations correspond to pooling
weights discovered by our model using different regularization terms, datasets and dictionary size.
The second row shows the results on CIFAR-10 with the “l2” regularization term. The pooling is
most distinct from the other results, as it learns highly localized weights. This pooling strategy has
also performed the worst in our investigation (Table 3).
The ”smooth” pooling performs the best. Visualization shows that weights are localized but vary
smoothly over the image. The weights expose a bias towards initialization shown in the first row.
All methods with the spatial smoothness regularization tend to focus on similar parts of the image,
however “l2 & smooth” is more conservative in spreading out the weights.
The last two rows show weights trained using our approximation by batches. From visual inspection,
they show a similar level of localization and smoothness to the regions obtained without approxima-
tion. This further supports the use of our approximation into independent batches.
8
4 Conclusion
In this paper we propose a flexible parameterization of the pooling operator which can be trained
jointly with the classifier. In this manner, we study the effect of different regularizers on the pooling
regions as well as the overall system. To be able to train the large set of parameters we propose
approximations to our model allowing efficient and parallel training without loss of accuracy.
Our experiments show there is a room to improve the classification accuracy by advancing the spatial
pooling stage. The presented method outperforms a popular hand-crafted pooling based method and
previous approaches to learn pooling strategies. While our improvements are consistent over the
whole range of dictionary sizes that we have investigated, the margin is most impressive for small
codes where we observe improvements up to 10% compared to the baseline of Coates. Finally, our
method achieves an accuracy of 56.29% on CIFAR-100, which is to the best of our knowledge the
new state-of-the-art on this dataset.
As we believe that our method is a good framework for further investigations of different pooling
strategies and in order to speed-up progress on the pooling stage we will make our code publicly
available at time of publication.
References
David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the
cat’s visual cortex.The Journal of physiology, 160(1):106, 1962.
K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations
and shifts in position. Pattern recognition, 15(6):455–469, 1982.
Y . LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Handwritten
digit recognition with a back-propagation network. In NIPS, 1990.
M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience,
2009.
J. J. Koenderink and A. J. Van Doorn. The structure of locally orderless images. International Journal of
Computer Vision, 31(2):159–168, 1999.
D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004.
N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005.
S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing
natural scene categories. In CVPR, 2006.
J. Yang, K. Yu, Y . Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image
classification. In CVPR, 2009.
M. A. Ranzato, F. J. Huang, Y . Boureau, and Y . LeCun. Unsupervised learning of invariant feature hierarchies
with applications to object recognition. In CVPR, 2007.
Q. V . Le, M. A. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y . Ng. Building
high-level features using large scale unsupervised learning. In ICML, 2012a.
Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image features. In NIPS
Workshop on Deep Learning, 2011.
Y . Jia, C. Huang, and T. Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features.
In CVPR, 2012.
J. Feng, B. Ni, Q. Tian, and S. Yan. Geometric lp-norm feature pooling for image classification. In CVPR,
2011.
M. A. Ranzato and G. E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann
machines. In CVPR, 2010.
C. M. Bishop. Neural Network for Pattern Recognition. Oxford University Press, 1999.
Y . LeCun, L. Bottou, G. Orr, and K. M¨uller. Efficient backprop. Neural networks: Tricks of the trade, pages
546–546, 1998.
R. Collobert and S. Bengio. Links between perceptrons, mlps and svms. In ICML, 2004.
A. Coates, H. Lee, and A. Y . Ng. An analysis of single-layer networks in unsupervised feature learning. In
AISTATS, 2011.
Q. V . Le, R. Monga, M. Devin, G. Corrado, K. Chen, M. A. Ranzato, J. Dean, and A. Y . Ng. Building high-level
features using large scale unsupervised learning. 2012b.
9
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. Technical report, 2010.
A. Torralba, R. Fergus, and W. T. Freeman. 80 million tiny images: A large data set for nonparametric object
and scene recognition. PAMI, 2008.
A. Coates and A. Y . Ng. The importance of encoding versus training with sparse coding and vector quantization.
In ICML, 2011.
D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In
CVPR, 2012.
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y . Bengio. Maxout networks. InICML, 2013.
10
|
Mateusz Malinowski, Mario Fritz
|
Unknown
| 2,013
|
{"id": "rOvg47Txgprkn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358430300000, "tmdate": 1358430300000, "ddate": null, "number": 21, "content": {"title": "Learnable Pooling Regions for Image Classification", "decision": "conferencePoster-iclr2013-workshop", "abstract": "From the early HMAX model to Spatial Pyramid Matching, pooling has played an important role in visual recognition pipelines. Spatial pooling, by grouping of local codes, equips these methods with a certain degree of robustness to translation and deformation yet preserving important spatial information. Despite the predominance of this approach in current recognition systems, we have seen little progress to fully adapt the pooling strategy to the task at hand. This paper proposes a model for learning task dependent pooling scheme -- including previously proposed hand-crafted pooling schemes as a particular instantiation. In our work, we investigate the role of different regularization terms used in the proposed model together with an efficient method to train them. Our experiments show improved performance over hand-crafted pooling schemes on the CIFAR-10 and CIFAR-100 datasets -- in particular improving the state-of-the-art to 56.29% on the latter.", "pdf": "https://arxiv.org/abs/1301.3516", "paperhash": "malinowski|learnable_pooling_regions_for_image_classification", "keywords": [], "conflicts": [], "authors": ["Mateusz Malinowski", "Mario Fritz"], "authorids": ["mmalinow@mpi-inf.mpg.de", "mario.j.fritz@googlemail.com"]}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["mmalinow@mpi-inf.mpg.de"], "writers": []}
|
[Review]:
The paper presents a method for training pooling regions in image classification pipelines (similar to those that employ bag-of-words or spatial pyramid models). The system uses a linear pooling matrix to parametrize the pooling units and follows them with a linear classifier. The pooling units are then trained jointly with the classifier. Several strategies for regularizing the training of the pooling parameters are proposed in addition to several tricks to increase scalability. Results are presented on the CIFAR10 and CIFAR100 datasets.
The main idea here appears to be to replace the 'hard coded' average pooling stage + linear classifier with a trainable linear pooling stage + linear classifier. Though I see why this is natural, it is not clear to me why using two linear stages is advantageous here since the combined system is no more powerful than connecting the linear classifier directly to all the features. The two main advantages of competing approaches are that they can dramatically reduce dimensionality or identify features to combine with nonlinear pooling operations. It could be that the performance advantage of this approach (without regularization) comes from directly learning the linear classifier from all the feature values (and thus the classifier has lower bias).
The proposed regularization schemes applied to the pooling units potentially change the picture. Indeed the authors found that a 'smoothness' penalty (which enforces some spatial coherence on the pooling weights) was useful to regularize the system, which is quite similar to what is achieved using hand-coded pooling areas. The advantage is that the classifier is given the flexibility to choose other weights for all of the feature values while retaining regularization that is similar to hand-coded pooling. How useful this effect is in general seems worth exploring in more detail.
Pros:
(1) Potentially interesting analysis of regularization schemes to learn weighted pooling units.
(2) Tricks for pre-training the pooling units in batches and transferring the results to other datasets.
Cons:
(1) The method does not appear to add much power beyond the ability to specify prior knowledge about the smoothness of the weights along the spatial dimensions.
(2) The results show some improvement on CIFAR-100, but it is not clear that this could not be achieved simply due to the greater number of classifier parameters (as opposed to the pooling methods proposed in the paper.)
|
anonymous reviewer c1a0
| null | null |
{"id": "0IOVI1hnXH0m-", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362196620000, "tmdate": 1362196620000, "ddate": null, "number": 3, "content": {"title": "review of Learnable Pooling Regions for Image Classification", "review": "The paper presents a method for training pooling regions in image classification pipelines (similar to those that employ bag-of-words or spatial pyramid models). The system uses a linear pooling matrix to parametrize the pooling units and follows them with a linear classifier. The pooling units are then trained jointly with the classifier. Several strategies for regularizing the training of the pooling parameters are proposed in addition to several tricks to increase scalability. Results are presented on the CIFAR10 and CIFAR100 datasets.\r\n\r\nThe main idea here appears to be to replace the 'hard coded' average pooling stage + linear classifier with a trainable linear pooling stage + linear classifier. Though I see why this is natural, it is not clear to me why using two linear stages is advantageous here since the combined system is no more powerful than connecting the linear classifier directly to all the features. The two main advantages of competing approaches are that they can dramatically reduce dimensionality or identify features to combine with nonlinear pooling operations. It could be that the performance advantage of this approach (without regularization) comes from directly learning the linear classifier from all the feature values (and thus the classifier has lower bias).\r\n\r\nThe proposed regularization schemes applied to the pooling units potentially change the picture. Indeed the authors found that a 'smoothness' penalty (which enforces some spatial coherence on the pooling weights) was useful to regularize the system, which is quite similar to what is achieved using hand-coded pooling areas. The advantage is that the classifier is given the flexibility to choose other weights for all of the feature values while retaining regularization that is similar to hand-coded pooling. How useful this effect is in general seems worth exploring in more detail.\r\n\r\nPros:\r\n(1) Potentially interesting analysis of regularization schemes to learn weighted pooling units.\r\n(2) Tricks for pre-training the pooling units in batches and transferring the results to other datasets.\r\n\r\nCons:\r\n(1) The method does not appear to add much power beyond the ability to specify prior knowledge about the smoothness of the weights along the spatial dimensions.\r\n(2) The results show some improvement on CIFAR-100, but it is not clear that this could not be achieved simply due to the greater number of classifier parameters (as opposed to the pooling methods proposed in the paper.)"}, "forum": "rOvg47Txgprkn", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "rOvg47Txgprkn", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer c1a0"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 16,
"praise": 2,
"presentation_and_reporting": 4,
"results_and_discussion": 8,
"suggestion_and_solution": 1,
"total": 17
}
| 2.058824
| 1.806305
| 0.252519
| 2.092186
| 0.32455
| 0.033363
| 0.176471
| 0
| 0.058824
| 0.941176
| 0.117647
| 0.235294
| 0.470588
| 0.058824
|
{
"criticism": 0.17647058823529413,
"example": 0,
"importance_and_relevance": 0.058823529411764705,
"materials_and_methods": 0.9411764705882353,
"praise": 0.11764705882352941,
"presentation_and_reporting": 0.23529411764705882,
"results_and_discussion": 0.47058823529411764,
"suggestion_and_solution": 0.058823529411764705
}
| 2.058824
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
qEV_E7oCrKqWT
|
Zero-Shot Learning Through Cross-Modal Transfer
|
This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.
|
Zero-Shot Learning Through Cross-Modal Transfer
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher D. Manning, Andrew Y. Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
richard@socher.org, {mganjoo, hsridhar, obastani, manning, ang}@stanford.edu
Abstract
This work introduces a model that can recognize objects in images even if no
training data is available for the objects. The only necessary knowledge about the
unseen categories comes from unsupervised large text corpora. In our zero-shot
framework distributional information in language can be seen as spanning a se-
mantic basis for understanding what objects look like. Most previous zero-shot
learning models can only differentiate between unseen classes. In contrast, our
model can both obtain state of the art performance on classes that have thousands
of training images and obtain reasonable performance on unseen classes. This is
achieved by first using outlier detection in the semantic space and then two sepa-
rate recognition models. Furthermore, our model does not require any manually
defined semantic features for either words or images.
1 Introduction
The ability to classify instances of an unseen visual class, called zero-shot learning, is useful in
many situations. There are many species, products or activities without labeled data and new visual
categories, such as the latest gadgets or car models are introduced frequently. In this work, we
show how to make use of the vast amount of knowledge about the visual world available in natural
language to classify unseen objects. We attempt to model people’s ability to identify unseen objects
even if the only knowledge about that object came from reading about it. For instance, after reading
the description of a two-wheeled self-balancing electric vehicle, controlled by a stick, with which
you can move around while standing on top of it, many would be able to identify aSegway, possibly
after being briefly perplexed because the new object looks different to any previously observed
object class.
We introduce a zero-shot model that can predict both seen and unseen classes. For instance, without
ever seeing a cat image, it can determine whether an image shows a cat or a known category from
the training set such as a dog or a horse. The model is based on two main ideas.
First, images are mapped into a semantic space of words that is learned by a neural network model
[15]. Word vectors capture distributional similarities from a large, unsupervised text corpus. By
learning an image mapping into this space, the word vectors get implicitly grounded by the visual
modality, allowing us to give prototypical instances for various words.
Second, because classifiers prefer to assign test images into classes for which they have seen training
examples, the model incorporates an outlier detection probability which determines whether a new
image is on the manifold of known categories. If the image is of a known category, a standard
classifier can be used. Otherwise, images are assigned to a class based on the likelihood of being
an unseen category. The probability of being an outlier or a known category is integrated into our
probabilistic model. The model is illustrated in Fig 1.
Unlike previous work on zero-shot learning which can only predict intermediate features or dif-
ferentiate between various zero-shot classes [26], our joint model can achieve both state of the art
accuracy on known classes as well as reasonable performance on unseen classes. Furthermore, com-
1
arXiv:1301.3666v2 [cs.CV] 20 Mar 2013
Manifold of known classes
auto horse
dog
truck
New test image from
unknown class
cat
Figure 1: Overview of our multi-modal zero-shot model. We first map each new testing image into a
lower dimensional semantic space. Then, we use outlier detection to determine whether it is on the
manifold of seen images. If the image is not on the manifold, we determine its class with the help
of unsupervised semantic word vectors. In this example, the unseen classes are truck and cat.
pared to related work in knowledge transfer [19, 27] we do not require manually defined semantic
or visual attributes for the zero-shot classes. Our language feature representations are learned from
unsupervised and unaligned corpora.
We first briefly describe a selection of related work, followed by the model description and experi-
ments on CIFAR10.
2 Related Work
We briefly outline connections and differences to five related lines of research. Due to space con-
straints, we cannot do justice to the complete literature.
Zero-Shot Learning. The work most similar to ours is that by Palatucci et al. [26]. They map fMRI
scans of people thinking about certain words into a space of manually designed features and then
classify using these features. They are able to predict semantic features even for words for which
they have not seen scans and experiment with differentiating between several zero-shot classes.
However, the do not classify new test instances into both seen and unseen classes. We extend their
approach to allow for this setup using outlier detection.
Larochelle et al. [21] describe the unseen zero-shot classes by a “canonical” example or use ground
truth human labeling of attributes.
One-Shot LearningOne-shot learning [17, 18] seeks to learn a visual object class by using very few
training examples. This is usually achieved by either sharing of feature representations [2], model
parameters [12] or via similar context [14]. A recent related work on one-shot learning is that of
Salakhutdinov et al. [28]. Similar to their work, our model is based on using deep learning tech-
niques to learn low-level image features followed by a probabilistic model to transfer knowledge.
However, our work is able to classify object categories without any training data due to the cross-
2
modal knowledge transfer from natural language and at the same time obtain high performance on
classes with many training examples.
Knowledge and Visual Attribute Transfer.Lambert et al. and Farhadi et al. [19, 10] were two
of the first to use well-designed visual attributes of unseen classes to classify them. This is different
to our setting since we only have distributional features of words learned from unsupervised, non-
parallel corpora and can classify between categories that have thousands or zero training images. Qi
et al. [27] learn when to transfer knowledge from one category to another for each instance.
Domain Adaptation. Domain adaptation is useful in situations in which there is a lot of training
data in one domain but little to none in another. For instance, in sentiment analysis one could train a
classifier for movie reviews and then adapt from that domain to book reviews [4, 13]. While related,
this line of work is different since there is data for each class but the features may differ between
domains.
Multimodal Embeddings. Multimodal embeddings relate information from multiple sources such
as sound and video [24] or images and text. Socher et al. [30] project words and image regions into a
common space using kernelized canonical correlation analysis to obtain state of the art performance
in annotation and segmentation. Similar to our work, they use unsupervised large text corpora to
learn semantic word representations. Their model does require a small amount of training data
however for each class. Among other recent work is that by Srivastava and Salakhutdinov [31] who
developed multimodal Deep Boltzmann Machines. Similar to their work, we use techniques from
the broad field of deep learning to represent images and words.
Some work has been done on multimodal distributional methods [11, 22]. Most recently, Bruni et al.
[5] worked on perceptually grounding word meaning and showed that joint models are better able
to predict the color of concrete objects.
3 Word and Image Representations
We begin the description of the full framework with the feature representations of words and images.
Distributional approaches are very common for capturing semantic similarity between words. In
these approaches, words are represented as vectors of distributional characteristics – most often their
co-occurrences with words in context [25, 9, 1, 32]. These representations have proven very effective
in natural language processing tasks such as sense disambiguation [29], thesaurus extraction [23, 8]
and cognitive modeling [20].
We initialize all word vectors with pre-trained 50-dimensional word vectors from the unsupervised
model of Huang et al. [15]. Using free Wikipedia text, their model learns word vectors by predict-
ing how likely it is for each word to occur in its context. Their model uses both local context in
the window around each word and global document context. Similar to other local co-occurrence
based vector space models, the resulting word vectors capture distributional syntactic and semantic
information. For further details and evaluations of these embeddings, see [3, 7].
We use the unsupervised method of Coates et al. [6] to extract F image features from raw pixels in
an unsupervised fashion. Each image is henceforth represented by a vector x∈RF .
4 Projecting Images into Semantic Word Spaces
In order to learn semantic relationships and class membership of images we project the image feature
vectors into the 50-dimensional word space. During training and testing, we consider a set of classes
Y. Some of the classes yin this set will have available training data, others will be zero-shot classes
without any training data. We define the former as the seen classes Ys and the latter as the unseen
classes Yu. Let W = Ws ∪Wu be the set of word vectors capturing distributional information for
both seen and unseen visual classes, respectively.
All training images x(i) ∈Xy of a seen class y∈Ys are mapped to the word vector wy correspond-
ing to the class name. To train this mapping, we minimize the following objective function with
3
airplane
automobile
bird
cat
deer
dog
frog
horse
ship
truckcat
automobile
truck
frog
ship
airplane
horse
bird
dog
deer
Figure 2: T-SNE visualization of the semantic word space. Word vector locations are highlighted
and mapped image locations are shown both for images for which this mapping has been trained and
unseen images. The unseen classes are cat and truck.
respect to the matrix θ∈R50×F :
J(θ) =
∑
y∈Ys
∑
x(i)∈Xy
∥wy −θx(i)∥2. (1)
By projecting images into the word vector space, we implicitly extend the word semantics with a
visual grounding, allowing us to query the space, for instance for prototypical visual instances of a
word or the average color of concrete nouns.
Fig. 2 shows a visualization of the 50-dimensional semantic space with word vectors and images
of both seen and unseen classes. The unseen classes are cat and truck. The mapping from 50 to 2
dimensions was done with t-SNE [33]. We can observe that most classes are tightly clustered around
their corresponding word vector while the zero-shot classes (cat and truck for this mapping) do not
have close-by vectors. However, the images of the two zero-shot classes are close to semantically
similar classes. For instance, the cat testing images are mapped most closely to dog, and horse and
are all very far away from car or ship. This motivated the idea for first finding outliers and then
classifying them to the zero-shot word vectors.
Now that we have covered the representations for words and images as well as the image to word
space mapping we can describe the probabilistic model for joint zero-shot learning and standard
image classification.
5 Zero-Shot Learning Model
In this section we first give an overview of our model and then describe each of its components.
In general, we want to predict p(y|x), the conditional probability for both seen and unseen classes
y ∈Ys ∪Yu given an image x. Because standard classifiers will never predict a class that has
no training examples, we introduce a binary visibility random variable which indicates whether an
4
image is in a seen or unseen class V ∈{s,u}. Let Xs be the set of all feature vectors for training
images of seen classes.
We predict the class yfor a new input image xvia:
p(y|x,Xs,W,θ ) =
∑
V ∈{s,u}
P(y|V,x,X s,W,θ )P(V|x,Xs,W,θ ). (2)
Next, we will describe each factor in Eq. 2.
The term P(V = u|x,Xs,W,θ ) is the probability of an image being in an unseen class. It can
be computed by thresholding an outlier detection score. This score is computed on the manifold of
training images that were mapped to the semantic word space. We use a threshold on the marginal of
each point under a mixture of Gaussians. The mapped points of seen classes are used to obtain this
marginal: P(x|Xs,Ws,θ) = ∑
y∈Ys P(x|y)P(y) = ∑
y∈Ys N(θx|wy,Σy)P(y). The Gaussian
of each class is parameterized by the corresponding semantic word vector wy for its mean and a
covariance matrix Σy that is estimated from all the mapped training points with that label. We
restrict the Gaussians to be isometric to prevent overfitting.
For a new image x, the outlier detector then becomes the indicator function that is 1 if the marginal
probability is below a certain threshold T:
P(V = u|x,Xs,W,θ ) := 1 {P(x|Xs,Ws,θ) <T } (3)
We provide an experimental analysis for various thresholdsT below.
In the case where V = s, i.e. the point is considered to be of a known class, we can use any clas-
sifier for obtaining P(y|V = s,x,X s). We use a softmax classifier on the original F-dimensional
features. For the zero-shot case where V = uwe assume an isometric Gaussian distribution around
each of the zero-shot semantic word vectors.
An alternative would be to use the method of Kriegel et al. [16] to obtain an outlier probability for
each testing point and then use the weighted combination of classifiers for both seen and unseen
classes.
6 Experiments
We run most of our experiments on the CIFAR10 dataset. The dataset has 10 classes, each with
5000 32 ×32 ×3 RGB images. We use the unsupervised feature extraction method of Coates and
Ng [6] to obtain a 12,800-dimensional feature vector for each image. In the following experiments,
we omit the training images of 2 classes for the zero-shot analysis.
6.1 Zero-Shot Classes Only
In this section we compare classification between only two zero-shot classes. We observe that if
there is no seen class that is remotely similar to the zero-shot classes, the performance is close to
random. In other words, if the two zero-shot classes are the most similar classes and the seen classes
do not properly span the subspace of the zero-shot classes then performance is poor. For instance,
when cat and dog are taken out from training, the resulting zero-shot classification does not work
well because none of the other 8 categories is similar enough to learn a good feature mapping. On
the other hand, if cat and truck are taken out, then the cat vectors can be mapped to the word space
thanks to transfer from dogs and trucks can be mapped thanks to car, so the performance is very
high.
Fig. 3 shows the performance at various cutoffs for the outlier detection. The cutoff is defined on
the negative log-likelihood of the marginal of each point in the outlier detection. We can observe
that when classifying images of unseen classes into only zero-shot classes (right side of the figure),
we can differentiate images with an accuracy of above 80%.
6.2 Zero-Shot and Seen Classes
In Fig. 3 we can observe that depending on the threshold that splits images into seen or unseen
classes at test time we can obtain accuracies of trained classes of approximately 80%. At 70%
5
0 10 20 30 40 50 60 70 80
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Negative log p(x)
Classification accuracy
automobile−frog
deer−truck
frog−truck
horse−ship
horse−truck
Figure 3: Visualization of the accuracy of the seen classes (lines from the top left to bottom right)
and pairs of zero-shot classes (lines from bottom left to top right) at different thresholds of the
negative log-likelihood of each mapped test image vector.
accuracy, unseen classes can be classified with accuracies of between 30% to 15%. Random chance
is 10%.
7 Conclusion
We introduced a novel model for joint standard and zero-shot classification based on deep learned
word and image representations. The two key ideas are that (i) using semantic word vector repre-
sentations can help to transfer knowledge between categories even when these representations are
learned in an unsupervised way and (ii) that our Bayesian framework that first differentiates outliers
from points on the projected semantic manifold can help to combine both zero-shot and seen classi-
fication into one framework. If the task was only to differentiate between various zero-shot classes
we could obtain accuracies of up to 90% with a fully unsupervised model.
References
[1] M. Baroni and A. Lenci. Distributional memory: A general framework for corpus-based semantics.
Computational Linguistics, 36(4):673–721, 2010.
[2] E. Bart and S. Ullman. Cross-generalization: learning novel classes from a single example by feature
replacement. In CVPR, 2005.
[3] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[4] J. Blitzer, M. Dredze, and F. Pereira. Biographies, Bollywood, Boom-boxes and Blenders: Domain
Adaptation for Sentiment Classification. In ACL, 2007.
[5] E. Bruni, G. Boleda, M. Baroni, and N. Tran. Distributional semantics in technicolor. In ACL, 2012.
6
[6] A. Coates and A. Ng. The Importance of Encoding Versus Training with Sparse Coding and Vector
Quantization . In ICML, 2011.
[7] R. Collobert and J. Weston. A unified architecture for natural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[8] J. Curran. From Distributional to Semantic Similarity. PhD thesis, University of Edinburgh, 2004.
[9] K. Erk and S. Pad ´o. A structured vector space model for word meaning in context. In EMNLP, 2008.
[10] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. In CVPR, 2009.
[11] Y . Feng and M. Lapata. Visual information in semantic representation. In HLT-NAACL, 2010.
[12] M. Fink. Object classification from a single example utilizing class relevance pseudo-metrics. In NIPS,
2004.
[13] X. Glorot, A. Bordes, and Y . Bengio. Domain adaptation for Large-Scale sentiment classification: A deep
learning approach. In ICML, 2011.
[14] D. Hoiem, A.A. Efros, and M. Herbert. Geometric context from a single image. In ICCV, 2005.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improving Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
[16] H. Kriegel, P. Kr ¨oger, E. Schubert, and A. Zimek. LoOP: local Outlier Probabilities. In Proceedings of
the 18th ACM conference on Information and knowledge management, CIKM ’09, 2009.
[17] R.; Perona L. Fei-Fei; Fergus. One-shot learning of object categories. TPAMI, 28, 2006.
[18] B. M. Lake, J. Gross R. Salakhutdinov, and J. B. Tenenbaum. One shot learning of simple visual concepts.
2011.
[19] C. H. Lampert, H. Nickisch, and S. Harmeling. Learning to Detect Unseen Object Classes by Between-
Class Attribute Transfer. In CVPR, 2009.
[20] T. K. Landauer and S. T. Dumais. A solution to Plato’s problem: the Latent Semantic Analysis theory of
acquisition, induction and representation of knowledge. Psychological Review, 104(2):211–240, 1997.
[21] H. Larochelle, D. Erhan, and Y . Bengio. Zero-data learning of new tasks. In AAAI, 2008.
[22] C.W. Leong and R. Mihalcea. Going beyond text: A hybrid image-text approach for measuring word
relatedness. In IJCNLP, 2011.
[23] D. Lin. Automatic retrieval and clustering of similar words. In Proceedings of COLING-ACL , pages
768–774, 1998.
[24] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A.Y . Ng. Multimodal deep learning. In ICML, 2011.
[25] S. Pado and M. Lapata. Dependency-based construction of semantic space models. Computational Lin-
guistics, 33(2):161–199, 2007.
[26] M. Palatucci, D. Pomerleau, G. Hinton, and T. Mitchell. Zero-shot learning with semantic output codes.
In NIPS, 2009.
[27] Guo-Jun Qi, C. Aggarwal, Y . Rui, Q. Tian, S. Chang, and T. Huang. Towards cross-category knowledge
propagation for learning visual concepts. In CVPR, 2011.
[28] A. Torralba R. Salakhutdinov, J. Tenenbaum. Learning to learn with compound hierarchical-deep models.
In NIPS, 2012.
[29] H. Sch ¨utze. Automatic word sense discrimination. Computational Linguistics, 24:97–124, 1998.
[30] R. Socher and L. Fei-Fei. Connecting modalities: Semi-supervised segmentation and annotation of images
using unaligned text corpora. In CVPR, 2010.
[31] N. Srivastava and R. Salakhutdinov. Multimodal learning with deep boltzmann machines. In NIPS, 2012.
[32] P. D. Turney and P. Pantel. From frequency to meaning: Vector space models of semantics. Journal of
Artificial Intelligence Research, 37:141–188, 2010.
[33] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research,
2008.
7
|
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "qEV_E7oCrKqWT", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358436600000, "tmdate": 1358436600000, "ddate": null, "number": 9, "content": {"title": "Zero-Shot Learning Through Cross-Modal Transfer", "decision": "conferenceOral-iclr2013-workshop", "abstract": "This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.", "pdf": "https://arxiv.org/abs/1301.3666", "paperhash": "socher|zeroshot_learning_through_crossmodal_transfer", "keywords": [], "conflicts": [], "authors": ["Richard Socher", "Milind Ganjoo", "Hamsa Sridhar", "Osbert Bastani", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["richard@socher.org", "mganjoo@stanford.edu", "hsridhar@stanford.edu", "obastani@stanford.edu", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["richard@socher.org"], "writers": []}
|
[Review]:
We thank the reviewers for their feedback.
I have not seen references to similarity learning, which can be used to say if two images are of the same class. These can obviously be used to determine if an image is of a known class or not, without having seen any image of the class.
- Thanks for the reference. Would you use the images of other classes to train classification similarity learning? These would have a different distribution than the completely unseen images from the zero shot classes? In other words, what would the non-similar objects be?
* I wonder if the standard deviation will not be biased (small) since it is estimated on the training samples. How important is that?
- We tried fitting a general covariance matrix and it decreases performance.
* I wonder if the threshold does not depend on things like the complexity of the class and the number of training examples of the class.
- It might be and we notice that different thresholds should be selected via cross validation.
In general, I am not convinced that a single threshold can be used to estimate if a new image is of a new class.
- Right, we found a better performance by fitting different thresholds for each class. We will include this in follow-up paper submissions.
I did not understand what to do when one decides that an image is of an unknown class. How should it be labeled in that case?
- Using the distances to the word vectors of the unknown classes.
I did not understand why one needs to learn a separate classifier for the known classes, instead of just using the distance to the known classes in the embedding space.
reply.
- The discriminative classifiers have much higher accuracy than the simple distances for known classes.
I do wonder why the authors claim that they 'further extend [the] theoretical analysis [of Palatucci et a.] ... and weaken their strong assumptions'.
- Thanks, we will take this and the other typo out and uploaded a new version to arxiv (which should be available soon).
|
Richard Socher
| null | null |
{"id": "ddIxYp60xFd0m", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363754820000, "tmdate": 1363754820000, "ddate": null, "number": 1, "content": {"title": "", "review": "We thank the reviewers for their feedback.\r\n\r\nI have not seen references to similarity learning, which can be used to say if two images are of the same class. These can obviously be used to determine if an image is of a known class or not, without having seen any image of the class. \r\n- Thanks for the reference. Would you use the images of other classes to train classification similarity learning? These would have a different distribution than the completely unseen images from the zero shot classes? In other words, what would the non-similar objects be?\r\n\r\n* I wonder if the standard deviation will not be biased (small) since it is estimated on the training samples. How important is that? \r\n- We tried fitting a general covariance matrix and it decreases performance.\r\n\r\n* I wonder if the threshold does not depend on things like the complexity of the class and the number of training examples of the class. \r\n- It might be and we notice that different thresholds should be selected via cross validation.\r\n\r\n\r\nIn general, I am not convinced that a single threshold can be used to estimate if a new image is of a new class. \r\n- Right, we found a better performance by fitting different thresholds for each class. We will include this in follow-up paper submissions.\r\n\r\n\r\nI did not understand what to do when one decides that an image is of an unknown class. How should it be labeled in that case?\r\n- Using the distances to the word vectors of the unknown classes.\r\n\r\nI did not understand why one needs to learn a separate classifier for the known classes, instead of just using the distance to the known classes in the embedding space.\r\nreply.\r\n- The discriminative classifiers have much higher accuracy than the simple distances for known classes. \r\n\r\n\r\n\r\nI do wonder why the authors claim that they 'further extend [the] theoretical analysis [of Palatucci et a.] ... and weaken their strong assumptions'. \r\n- Thanks, we will take this and the other typo out and uploaded a new version to arxiv (which should be available soon)."}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "qEV_E7oCrKqWT", "readers": ["everyone"], "nonreaders": [], "signatures": ["Richard Socher"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 12,
"praise": 1,
"presentation_and_reporting": 7,
"results_and_discussion": 3,
"suggestion_and_solution": 6,
"total": 24
}
| 1.333333
| -0.576341
| 1.909674
| 1.377911
| 0.437321
| 0.044578
| 0.125
| 0
| 0
| 0.5
| 0.041667
| 0.291667
| 0.125
| 0.25
|
{
"criticism": 0.125,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.5,
"praise": 0.041666666666666664,
"presentation_and_reporting": 0.2916666666666667,
"results_and_discussion": 0.125,
"suggestion_and_solution": 0.25
}
| 1.333333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
qEV_E7oCrKqWT
|
Zero-Shot Learning Through Cross-Modal Transfer
|
This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.
|
Zero-Shot Learning Through Cross-Modal Transfer
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher D. Manning, Andrew Y. Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
richard@socher.org, {mganjoo, hsridhar, obastani, manning, ang}@stanford.edu
Abstract
This work introduces a model that can recognize objects in images even if no
training data is available for the objects. The only necessary knowledge about the
unseen categories comes from unsupervised large text corpora. In our zero-shot
framework distributional information in language can be seen as spanning a se-
mantic basis for understanding what objects look like. Most previous zero-shot
learning models can only differentiate between unseen classes. In contrast, our
model can both obtain state of the art performance on classes that have thousands
of training images and obtain reasonable performance on unseen classes. This is
achieved by first using outlier detection in the semantic space and then two sepa-
rate recognition models. Furthermore, our model does not require any manually
defined semantic features for either words or images.
1 Introduction
The ability to classify instances of an unseen visual class, called zero-shot learning, is useful in
many situations. There are many species, products or activities without labeled data and new visual
categories, such as the latest gadgets or car models are introduced frequently. In this work, we
show how to make use of the vast amount of knowledge about the visual world available in natural
language to classify unseen objects. We attempt to model people’s ability to identify unseen objects
even if the only knowledge about that object came from reading about it. For instance, after reading
the description of a two-wheeled self-balancing electric vehicle, controlled by a stick, with which
you can move around while standing on top of it, many would be able to identify aSegway, possibly
after being briefly perplexed because the new object looks different to any previously observed
object class.
We introduce a zero-shot model that can predict both seen and unseen classes. For instance, without
ever seeing a cat image, it can determine whether an image shows a cat or a known category from
the training set such as a dog or a horse. The model is based on two main ideas.
First, images are mapped into a semantic space of words that is learned by a neural network model
[15]. Word vectors capture distributional similarities from a large, unsupervised text corpus. By
learning an image mapping into this space, the word vectors get implicitly grounded by the visual
modality, allowing us to give prototypical instances for various words.
Second, because classifiers prefer to assign test images into classes for which they have seen training
examples, the model incorporates an outlier detection probability which determines whether a new
image is on the manifold of known categories. If the image is of a known category, a standard
classifier can be used. Otherwise, images are assigned to a class based on the likelihood of being
an unseen category. The probability of being an outlier or a known category is integrated into our
probabilistic model. The model is illustrated in Fig 1.
Unlike previous work on zero-shot learning which can only predict intermediate features or dif-
ferentiate between various zero-shot classes [26], our joint model can achieve both state of the art
accuracy on known classes as well as reasonable performance on unseen classes. Furthermore, com-
1
arXiv:1301.3666v2 [cs.CV] 20 Mar 2013
Manifold of known classes
auto horse
dog
truck
New test image from
unknown class
cat
Figure 1: Overview of our multi-modal zero-shot model. We first map each new testing image into a
lower dimensional semantic space. Then, we use outlier detection to determine whether it is on the
manifold of seen images. If the image is not on the manifold, we determine its class with the help
of unsupervised semantic word vectors. In this example, the unseen classes are truck and cat.
pared to related work in knowledge transfer [19, 27] we do not require manually defined semantic
or visual attributes for the zero-shot classes. Our language feature representations are learned from
unsupervised and unaligned corpora.
We first briefly describe a selection of related work, followed by the model description and experi-
ments on CIFAR10.
2 Related Work
We briefly outline connections and differences to five related lines of research. Due to space con-
straints, we cannot do justice to the complete literature.
Zero-Shot Learning. The work most similar to ours is that by Palatucci et al. [26]. They map fMRI
scans of people thinking about certain words into a space of manually designed features and then
classify using these features. They are able to predict semantic features even for words for which
they have not seen scans and experiment with differentiating between several zero-shot classes.
However, the do not classify new test instances into both seen and unseen classes. We extend their
approach to allow for this setup using outlier detection.
Larochelle et al. [21] describe the unseen zero-shot classes by a “canonical” example or use ground
truth human labeling of attributes.
One-Shot LearningOne-shot learning [17, 18] seeks to learn a visual object class by using very few
training examples. This is usually achieved by either sharing of feature representations [2], model
parameters [12] or via similar context [14]. A recent related work on one-shot learning is that of
Salakhutdinov et al. [28]. Similar to their work, our model is based on using deep learning tech-
niques to learn low-level image features followed by a probabilistic model to transfer knowledge.
However, our work is able to classify object categories without any training data due to the cross-
2
modal knowledge transfer from natural language and at the same time obtain high performance on
classes with many training examples.
Knowledge and Visual Attribute Transfer.Lambert et al. and Farhadi et al. [19, 10] were two
of the first to use well-designed visual attributes of unseen classes to classify them. This is different
to our setting since we only have distributional features of words learned from unsupervised, non-
parallel corpora and can classify between categories that have thousands or zero training images. Qi
et al. [27] learn when to transfer knowledge from one category to another for each instance.
Domain Adaptation. Domain adaptation is useful in situations in which there is a lot of training
data in one domain but little to none in another. For instance, in sentiment analysis one could train a
classifier for movie reviews and then adapt from that domain to book reviews [4, 13]. While related,
this line of work is different since there is data for each class but the features may differ between
domains.
Multimodal Embeddings. Multimodal embeddings relate information from multiple sources such
as sound and video [24] or images and text. Socher et al. [30] project words and image regions into a
common space using kernelized canonical correlation analysis to obtain state of the art performance
in annotation and segmentation. Similar to our work, they use unsupervised large text corpora to
learn semantic word representations. Their model does require a small amount of training data
however for each class. Among other recent work is that by Srivastava and Salakhutdinov [31] who
developed multimodal Deep Boltzmann Machines. Similar to their work, we use techniques from
the broad field of deep learning to represent images and words.
Some work has been done on multimodal distributional methods [11, 22]. Most recently, Bruni et al.
[5] worked on perceptually grounding word meaning and showed that joint models are better able
to predict the color of concrete objects.
3 Word and Image Representations
We begin the description of the full framework with the feature representations of words and images.
Distributional approaches are very common for capturing semantic similarity between words. In
these approaches, words are represented as vectors of distributional characteristics – most often their
co-occurrences with words in context [25, 9, 1, 32]. These representations have proven very effective
in natural language processing tasks such as sense disambiguation [29], thesaurus extraction [23, 8]
and cognitive modeling [20].
We initialize all word vectors with pre-trained 50-dimensional word vectors from the unsupervised
model of Huang et al. [15]. Using free Wikipedia text, their model learns word vectors by predict-
ing how likely it is for each word to occur in its context. Their model uses both local context in
the window around each word and global document context. Similar to other local co-occurrence
based vector space models, the resulting word vectors capture distributional syntactic and semantic
information. For further details and evaluations of these embeddings, see [3, 7].
We use the unsupervised method of Coates et al. [6] to extract F image features from raw pixels in
an unsupervised fashion. Each image is henceforth represented by a vector x∈RF .
4 Projecting Images into Semantic Word Spaces
In order to learn semantic relationships and class membership of images we project the image feature
vectors into the 50-dimensional word space. During training and testing, we consider a set of classes
Y. Some of the classes yin this set will have available training data, others will be zero-shot classes
without any training data. We define the former as the seen classes Ys and the latter as the unseen
classes Yu. Let W = Ws ∪Wu be the set of word vectors capturing distributional information for
both seen and unseen visual classes, respectively.
All training images x(i) ∈Xy of a seen class y∈Ys are mapped to the word vector wy correspond-
ing to the class name. To train this mapping, we minimize the following objective function with
3
airplane
automobile
bird
cat
deer
dog
frog
horse
ship
truckcat
automobile
truck
frog
ship
airplane
horse
bird
dog
deer
Figure 2: T-SNE visualization of the semantic word space. Word vector locations are highlighted
and mapped image locations are shown both for images for which this mapping has been trained and
unseen images. The unseen classes are cat and truck.
respect to the matrix θ∈R50×F :
J(θ) =
∑
y∈Ys
∑
x(i)∈Xy
∥wy −θx(i)∥2. (1)
By projecting images into the word vector space, we implicitly extend the word semantics with a
visual grounding, allowing us to query the space, for instance for prototypical visual instances of a
word or the average color of concrete nouns.
Fig. 2 shows a visualization of the 50-dimensional semantic space with word vectors and images
of both seen and unseen classes. The unseen classes are cat and truck. The mapping from 50 to 2
dimensions was done with t-SNE [33]. We can observe that most classes are tightly clustered around
their corresponding word vector while the zero-shot classes (cat and truck for this mapping) do not
have close-by vectors. However, the images of the two zero-shot classes are close to semantically
similar classes. For instance, the cat testing images are mapped most closely to dog, and horse and
are all very far away from car or ship. This motivated the idea for first finding outliers and then
classifying them to the zero-shot word vectors.
Now that we have covered the representations for words and images as well as the image to word
space mapping we can describe the probabilistic model for joint zero-shot learning and standard
image classification.
5 Zero-Shot Learning Model
In this section we first give an overview of our model and then describe each of its components.
In general, we want to predict p(y|x), the conditional probability for both seen and unseen classes
y ∈Ys ∪Yu given an image x. Because standard classifiers will never predict a class that has
no training examples, we introduce a binary visibility random variable which indicates whether an
4
image is in a seen or unseen class V ∈{s,u}. Let Xs be the set of all feature vectors for training
images of seen classes.
We predict the class yfor a new input image xvia:
p(y|x,Xs,W,θ ) =
∑
V ∈{s,u}
P(y|V,x,X s,W,θ )P(V|x,Xs,W,θ ). (2)
Next, we will describe each factor in Eq. 2.
The term P(V = u|x,Xs,W,θ ) is the probability of an image being in an unseen class. It can
be computed by thresholding an outlier detection score. This score is computed on the manifold of
training images that were mapped to the semantic word space. We use a threshold on the marginal of
each point under a mixture of Gaussians. The mapped points of seen classes are used to obtain this
marginal: P(x|Xs,Ws,θ) = ∑
y∈Ys P(x|y)P(y) = ∑
y∈Ys N(θx|wy,Σy)P(y). The Gaussian
of each class is parameterized by the corresponding semantic word vector wy for its mean and a
covariance matrix Σy that is estimated from all the mapped training points with that label. We
restrict the Gaussians to be isometric to prevent overfitting.
For a new image x, the outlier detector then becomes the indicator function that is 1 if the marginal
probability is below a certain threshold T:
P(V = u|x,Xs,W,θ ) := 1 {P(x|Xs,Ws,θ) <T } (3)
We provide an experimental analysis for various thresholdsT below.
In the case where V = s, i.e. the point is considered to be of a known class, we can use any clas-
sifier for obtaining P(y|V = s,x,X s). We use a softmax classifier on the original F-dimensional
features. For the zero-shot case where V = uwe assume an isometric Gaussian distribution around
each of the zero-shot semantic word vectors.
An alternative would be to use the method of Kriegel et al. [16] to obtain an outlier probability for
each testing point and then use the weighted combination of classifiers for both seen and unseen
classes.
6 Experiments
We run most of our experiments on the CIFAR10 dataset. The dataset has 10 classes, each with
5000 32 ×32 ×3 RGB images. We use the unsupervised feature extraction method of Coates and
Ng [6] to obtain a 12,800-dimensional feature vector for each image. In the following experiments,
we omit the training images of 2 classes for the zero-shot analysis.
6.1 Zero-Shot Classes Only
In this section we compare classification between only two zero-shot classes. We observe that if
there is no seen class that is remotely similar to the zero-shot classes, the performance is close to
random. In other words, if the two zero-shot classes are the most similar classes and the seen classes
do not properly span the subspace of the zero-shot classes then performance is poor. For instance,
when cat and dog are taken out from training, the resulting zero-shot classification does not work
well because none of the other 8 categories is similar enough to learn a good feature mapping. On
the other hand, if cat and truck are taken out, then the cat vectors can be mapped to the word space
thanks to transfer from dogs and trucks can be mapped thanks to car, so the performance is very
high.
Fig. 3 shows the performance at various cutoffs for the outlier detection. The cutoff is defined on
the negative log-likelihood of the marginal of each point in the outlier detection. We can observe
that when classifying images of unseen classes into only zero-shot classes (right side of the figure),
we can differentiate images with an accuracy of above 80%.
6.2 Zero-Shot and Seen Classes
In Fig. 3 we can observe that depending on the threshold that splits images into seen or unseen
classes at test time we can obtain accuracies of trained classes of approximately 80%. At 70%
5
0 10 20 30 40 50 60 70 80
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Negative log p(x)
Classification accuracy
automobile−frog
deer−truck
frog−truck
horse−ship
horse−truck
Figure 3: Visualization of the accuracy of the seen classes (lines from the top left to bottom right)
and pairs of zero-shot classes (lines from bottom left to top right) at different thresholds of the
negative log-likelihood of each mapped test image vector.
accuracy, unseen classes can be classified with accuracies of between 30% to 15%. Random chance
is 10%.
7 Conclusion
We introduced a novel model for joint standard and zero-shot classification based on deep learned
word and image representations. The two key ideas are that (i) using semantic word vector repre-
sentations can help to transfer knowledge between categories even when these representations are
learned in an unsupervised way and (ii) that our Bayesian framework that first differentiates outliers
from points on the projected semantic manifold can help to combine both zero-shot and seen classi-
fication into one framework. If the task was only to differentiate between various zero-shot classes
we could obtain accuracies of up to 90% with a fully unsupervised model.
References
[1] M. Baroni and A. Lenci. Distributional memory: A general framework for corpus-based semantics.
Computational Linguistics, 36(4):673–721, 2010.
[2] E. Bart and S. Ullman. Cross-generalization: learning novel classes from a single example by feature
replacement. In CVPR, 2005.
[3] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[4] J. Blitzer, M. Dredze, and F. Pereira. Biographies, Bollywood, Boom-boxes and Blenders: Domain
Adaptation for Sentiment Classification. In ACL, 2007.
[5] E. Bruni, G. Boleda, M. Baroni, and N. Tran. Distributional semantics in technicolor. In ACL, 2012.
6
[6] A. Coates and A. Ng. The Importance of Encoding Versus Training with Sparse Coding and Vector
Quantization . In ICML, 2011.
[7] R. Collobert and J. Weston. A unified architecture for natural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[8] J. Curran. From Distributional to Semantic Similarity. PhD thesis, University of Edinburgh, 2004.
[9] K. Erk and S. Pad ´o. A structured vector space model for word meaning in context. In EMNLP, 2008.
[10] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. In CVPR, 2009.
[11] Y . Feng and M. Lapata. Visual information in semantic representation. In HLT-NAACL, 2010.
[12] M. Fink. Object classification from a single example utilizing class relevance pseudo-metrics. In NIPS,
2004.
[13] X. Glorot, A. Bordes, and Y . Bengio. Domain adaptation for Large-Scale sentiment classification: A deep
learning approach. In ICML, 2011.
[14] D. Hoiem, A.A. Efros, and M. Herbert. Geometric context from a single image. In ICCV, 2005.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improving Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
[16] H. Kriegel, P. Kr ¨oger, E. Schubert, and A. Zimek. LoOP: local Outlier Probabilities. In Proceedings of
the 18th ACM conference on Information and knowledge management, CIKM ’09, 2009.
[17] R.; Perona L. Fei-Fei; Fergus. One-shot learning of object categories. TPAMI, 28, 2006.
[18] B. M. Lake, J. Gross R. Salakhutdinov, and J. B. Tenenbaum. One shot learning of simple visual concepts.
2011.
[19] C. H. Lampert, H. Nickisch, and S. Harmeling. Learning to Detect Unseen Object Classes by Between-
Class Attribute Transfer. In CVPR, 2009.
[20] T. K. Landauer and S. T. Dumais. A solution to Plato’s problem: the Latent Semantic Analysis theory of
acquisition, induction and representation of knowledge. Psychological Review, 104(2):211–240, 1997.
[21] H. Larochelle, D. Erhan, and Y . Bengio. Zero-data learning of new tasks. In AAAI, 2008.
[22] C.W. Leong and R. Mihalcea. Going beyond text: A hybrid image-text approach for measuring word
relatedness. In IJCNLP, 2011.
[23] D. Lin. Automatic retrieval and clustering of similar words. In Proceedings of COLING-ACL , pages
768–774, 1998.
[24] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A.Y . Ng. Multimodal deep learning. In ICML, 2011.
[25] S. Pado and M. Lapata. Dependency-based construction of semantic space models. Computational Lin-
guistics, 33(2):161–199, 2007.
[26] M. Palatucci, D. Pomerleau, G. Hinton, and T. Mitchell. Zero-shot learning with semantic output codes.
In NIPS, 2009.
[27] Guo-Jun Qi, C. Aggarwal, Y . Rui, Q. Tian, S. Chang, and T. Huang. Towards cross-category knowledge
propagation for learning visual concepts. In CVPR, 2011.
[28] A. Torralba R. Salakhutdinov, J. Tenenbaum. Learning to learn with compound hierarchical-deep models.
In NIPS, 2012.
[29] H. Sch ¨utze. Automatic word sense discrimination. Computational Linguistics, 24:97–124, 1998.
[30] R. Socher and L. Fei-Fei. Connecting modalities: Semi-supervised segmentation and annotation of images
using unaligned text corpora. In CVPR, 2010.
[31] N. Srivastava and R. Salakhutdinov. Multimodal learning with deep boltzmann machines. In NIPS, 2012.
[32] P. D. Turney and P. Pantel. From frequency to meaning: Vector space models of semantics. Journal of
Artificial Intelligence Research, 37:141–188, 2010.
[33] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research,
2008.
7
|
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "qEV_E7oCrKqWT", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358436600000, "tmdate": 1358436600000, "ddate": null, "number": 9, "content": {"title": "Zero-Shot Learning Through Cross-Modal Transfer", "decision": "conferenceOral-iclr2013-workshop", "abstract": "This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.", "pdf": "https://arxiv.org/abs/1301.3666", "paperhash": "socher|zeroshot_learning_through_crossmodal_transfer", "keywords": [], "conflicts": [], "authors": ["Richard Socher", "Milind Ganjoo", "Hamsa Sridhar", "Osbert Bastani", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["richard@socher.org", "mganjoo@stanford.edu", "hsridhar@stanford.edu", "obastani@stanford.edu", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["richard@socher.org"], "writers": []}
|
[Review]:
*A brief summary of the paper's contributions, in the context of prior work*
This paper introduces a zero-shot learning approach to image classification. The model first tries to detect whether an image contains an object from a so-far unseen category. If not, the model relies on a regular, state-of-the art supervised classifier to assign the image to known classes. Otherwise, it attempts to identify what this object is, based on a comparison between the image and each unseen class, in a learned joint image/class representation space. The method relies on pre-trained word representations, extracted from unlabelled text, to represent the classes. Experiments evaluate the compromise between classification accuracy on the seen classes and the unseen classes, as a threshold for identifying an unseen class is varied.
*An assessment of novelty and quality*
This paper goes beyond the current work on zero-shot learning in 2 ways. First, it shows that very good classification of certain pairs of unseen classes can be achieved based on learned (as opposed to hand designed) representations for these classes. I find this pretty impressive.
The second contribution is in a method for dealing with seen and unseen classes, based on the idea that unseen classes are outliers. I've seen little work attacking directly this issue. Unfortunately, I'm not super impressed with the results: having to drop from 80% to 70% to obtain between 15% and 30% accuracy on unseen classes (and only for certain pairs) is a bit disappointing. But it's a decent first step. Plus, the proposed model is overall fairly simple, and zero-shot learning is quite challenging, so in fact it's perhaps surprising that a simple approach doesn't do worse.
Finally, I find the paper reads well and is quite clear in its methodology.
I do wonder why the authors claim that they 'further extend [the] theoretical analysis [of Palatucci et a.] ... and weaken their strong assumptions'. This sentence suggests there is a theoretical contribution to this work, which I don't see. So I would remove that sentence.
Also, the second paragraph of section 6 is incomplete.
*A list of pros and cons (reasons to accept/reject)*
The pros are:
- attacks an important, very hard problem
- goes significantly beyond the current literature on zero-shot learning
- some of the results are pretty impressive
The cons are:
- model is a bit simple and builds quite a bit on previous work on image classification [6] and unsupervised learning of word representation [15] (but frankly, that's really not such a big deal)
|
anonymous reviewer cfb0
| null | null |
{"id": "UgMKgxnHDugHr", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362080640000, "tmdate": 1362080640000, "ddate": null, "number": 3, "content": {"title": "review of Zero-Shot Learning Through Cross-Modal Transfer", "review": "*A brief summary of the paper's contributions, in the context of prior work*\r\nThis paper introduces a zero-shot learning approach to image classification. The model first tries to detect whether an image contains an object from a so-far unseen category. If not, the model relies on a regular, state-of-the art supervised classifier to assign the image to known classes. Otherwise, it attempts to identify what this object is, based on a comparison between the image and each unseen class, in a learned joint image/class representation space. The method relies on pre-trained word representations, extracted from unlabelled text, to represent the classes. Experiments evaluate the compromise between classification accuracy on the seen classes and the unseen classes, as a threshold for identifying an unseen class is varied. \r\n\r\n*An assessment of novelty and quality*\r\nThis paper goes beyond the current work on zero-shot learning in 2 ways. First, it shows that very good classification of certain pairs of unseen classes can be achieved based on learned (as opposed to hand designed) representations for these classes. I find this pretty impressive.\r\n\r\nThe second contribution is in a method for dealing with seen and unseen classes, based on the idea that unseen classes are outliers. I've seen little work attacking directly this issue. Unfortunately, I'm not super impressed with the results: having to drop from 80% to 70% to obtain between 15% and 30% accuracy on unseen classes (and only for certain pairs) is a bit disappointing. But it's a decent first step. Plus, the proposed model is overall fairly simple, and zero-shot learning is quite challenging, so in fact it's perhaps surprising that a simple approach doesn't do worse.\r\n\r\nFinally, I find the paper reads well and is quite clear in its methodology.\r\n\r\nI do wonder why the authors claim that they 'further extend [the] theoretical analysis [of Palatucci et a.] ... and weaken their strong assumptions'. This sentence suggests there is a theoretical contribution to this work, which I don't see. So I would remove that sentence.\r\n\r\nAlso, the second paragraph of section 6 is incomplete.\r\n\r\n*A list of pros and cons (reasons to accept/reject)*\r\nThe pros are:\r\n- attacks an important, very hard problem\r\n- goes significantly beyond the current literature on zero-shot learning\r\n- some of the results are pretty impressive\r\n\r\nThe cons are:\r\n- model is a bit simple and builds quite a bit on previous work on image classification [6] and unsupervised learning of word representation [15] (but frankly, that's really not such a big deal)"}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "qEV_E7oCrKqWT", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer cfb0"], "writers": ["anonymous"]}
|
{
"criticism": 5,
"example": 0,
"importance_and_relevance": 6,
"materials_and_methods": 12,
"praise": 5,
"presentation_and_reporting": 6,
"results_and_discussion": 2,
"suggestion_and_solution": 2,
"total": 21
}
| 1.809524
| 0.799448
| 1.010076
| 1.861526
| 0.51181
| 0.052002
| 0.238095
| 0
| 0.285714
| 0.571429
| 0.238095
| 0.285714
| 0.095238
| 0.095238
|
{
"criticism": 0.23809523809523808,
"example": 0,
"importance_and_relevance": 0.2857142857142857,
"materials_and_methods": 0.5714285714285714,
"praise": 0.23809523809523808,
"presentation_and_reporting": 0.2857142857142857,
"results_and_discussion": 0.09523809523809523,
"suggestion_and_solution": 0.09523809523809523
}
| 1.809524
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
qEV_E7oCrKqWT
|
Zero-Shot Learning Through Cross-Modal Transfer
|
This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.
|
Zero-Shot Learning Through Cross-Modal Transfer
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher D. Manning, Andrew Y. Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
richard@socher.org, {mganjoo, hsridhar, obastani, manning, ang}@stanford.edu
Abstract
This work introduces a model that can recognize objects in images even if no
training data is available for the objects. The only necessary knowledge about the
unseen categories comes from unsupervised large text corpora. In our zero-shot
framework distributional information in language can be seen as spanning a se-
mantic basis for understanding what objects look like. Most previous zero-shot
learning models can only differentiate between unseen classes. In contrast, our
model can both obtain state of the art performance on classes that have thousands
of training images and obtain reasonable performance on unseen classes. This is
achieved by first using outlier detection in the semantic space and then two sepa-
rate recognition models. Furthermore, our model does not require any manually
defined semantic features for either words or images.
1 Introduction
The ability to classify instances of an unseen visual class, called zero-shot learning, is useful in
many situations. There are many species, products or activities without labeled data and new visual
categories, such as the latest gadgets or car models are introduced frequently. In this work, we
show how to make use of the vast amount of knowledge about the visual world available in natural
language to classify unseen objects. We attempt to model people’s ability to identify unseen objects
even if the only knowledge about that object came from reading about it. For instance, after reading
the description of a two-wheeled self-balancing electric vehicle, controlled by a stick, with which
you can move around while standing on top of it, many would be able to identify aSegway, possibly
after being briefly perplexed because the new object looks different to any previously observed
object class.
We introduce a zero-shot model that can predict both seen and unseen classes. For instance, without
ever seeing a cat image, it can determine whether an image shows a cat or a known category from
the training set such as a dog or a horse. The model is based on two main ideas.
First, images are mapped into a semantic space of words that is learned by a neural network model
[15]. Word vectors capture distributional similarities from a large, unsupervised text corpus. By
learning an image mapping into this space, the word vectors get implicitly grounded by the visual
modality, allowing us to give prototypical instances for various words.
Second, because classifiers prefer to assign test images into classes for which they have seen training
examples, the model incorporates an outlier detection probability which determines whether a new
image is on the manifold of known categories. If the image is of a known category, a standard
classifier can be used. Otherwise, images are assigned to a class based on the likelihood of being
an unseen category. The probability of being an outlier or a known category is integrated into our
probabilistic model. The model is illustrated in Fig 1.
Unlike previous work on zero-shot learning which can only predict intermediate features or dif-
ferentiate between various zero-shot classes [26], our joint model can achieve both state of the art
accuracy on known classes as well as reasonable performance on unseen classes. Furthermore, com-
1
arXiv:1301.3666v2 [cs.CV] 20 Mar 2013
Manifold of known classes
auto horse
dog
truck
New test image from
unknown class
cat
Figure 1: Overview of our multi-modal zero-shot model. We first map each new testing image into a
lower dimensional semantic space. Then, we use outlier detection to determine whether it is on the
manifold of seen images. If the image is not on the manifold, we determine its class with the help
of unsupervised semantic word vectors. In this example, the unseen classes are truck and cat.
pared to related work in knowledge transfer [19, 27] we do not require manually defined semantic
or visual attributes for the zero-shot classes. Our language feature representations are learned from
unsupervised and unaligned corpora.
We first briefly describe a selection of related work, followed by the model description and experi-
ments on CIFAR10.
2 Related Work
We briefly outline connections and differences to five related lines of research. Due to space con-
straints, we cannot do justice to the complete literature.
Zero-Shot Learning. The work most similar to ours is that by Palatucci et al. [26]. They map fMRI
scans of people thinking about certain words into a space of manually designed features and then
classify using these features. They are able to predict semantic features even for words for which
they have not seen scans and experiment with differentiating between several zero-shot classes.
However, the do not classify new test instances into both seen and unseen classes. We extend their
approach to allow for this setup using outlier detection.
Larochelle et al. [21] describe the unseen zero-shot classes by a “canonical” example or use ground
truth human labeling of attributes.
One-Shot LearningOne-shot learning [17, 18] seeks to learn a visual object class by using very few
training examples. This is usually achieved by either sharing of feature representations [2], model
parameters [12] or via similar context [14]. A recent related work on one-shot learning is that of
Salakhutdinov et al. [28]. Similar to their work, our model is based on using deep learning tech-
niques to learn low-level image features followed by a probabilistic model to transfer knowledge.
However, our work is able to classify object categories without any training data due to the cross-
2
modal knowledge transfer from natural language and at the same time obtain high performance on
classes with many training examples.
Knowledge and Visual Attribute Transfer.Lambert et al. and Farhadi et al. [19, 10] were two
of the first to use well-designed visual attributes of unseen classes to classify them. This is different
to our setting since we only have distributional features of words learned from unsupervised, non-
parallel corpora and can classify between categories that have thousands or zero training images. Qi
et al. [27] learn when to transfer knowledge from one category to another for each instance.
Domain Adaptation. Domain adaptation is useful in situations in which there is a lot of training
data in one domain but little to none in another. For instance, in sentiment analysis one could train a
classifier for movie reviews and then adapt from that domain to book reviews [4, 13]. While related,
this line of work is different since there is data for each class but the features may differ between
domains.
Multimodal Embeddings. Multimodal embeddings relate information from multiple sources such
as sound and video [24] or images and text. Socher et al. [30] project words and image regions into a
common space using kernelized canonical correlation analysis to obtain state of the art performance
in annotation and segmentation. Similar to our work, they use unsupervised large text corpora to
learn semantic word representations. Their model does require a small amount of training data
however for each class. Among other recent work is that by Srivastava and Salakhutdinov [31] who
developed multimodal Deep Boltzmann Machines. Similar to their work, we use techniques from
the broad field of deep learning to represent images and words.
Some work has been done on multimodal distributional methods [11, 22]. Most recently, Bruni et al.
[5] worked on perceptually grounding word meaning and showed that joint models are better able
to predict the color of concrete objects.
3 Word and Image Representations
We begin the description of the full framework with the feature representations of words and images.
Distributional approaches are very common for capturing semantic similarity between words. In
these approaches, words are represented as vectors of distributional characteristics – most often their
co-occurrences with words in context [25, 9, 1, 32]. These representations have proven very effective
in natural language processing tasks such as sense disambiguation [29], thesaurus extraction [23, 8]
and cognitive modeling [20].
We initialize all word vectors with pre-trained 50-dimensional word vectors from the unsupervised
model of Huang et al. [15]. Using free Wikipedia text, their model learns word vectors by predict-
ing how likely it is for each word to occur in its context. Their model uses both local context in
the window around each word and global document context. Similar to other local co-occurrence
based vector space models, the resulting word vectors capture distributional syntactic and semantic
information. For further details and evaluations of these embeddings, see [3, 7].
We use the unsupervised method of Coates et al. [6] to extract F image features from raw pixels in
an unsupervised fashion. Each image is henceforth represented by a vector x∈RF .
4 Projecting Images into Semantic Word Spaces
In order to learn semantic relationships and class membership of images we project the image feature
vectors into the 50-dimensional word space. During training and testing, we consider a set of classes
Y. Some of the classes yin this set will have available training data, others will be zero-shot classes
without any training data. We define the former as the seen classes Ys and the latter as the unseen
classes Yu. Let W = Ws ∪Wu be the set of word vectors capturing distributional information for
both seen and unseen visual classes, respectively.
All training images x(i) ∈Xy of a seen class y∈Ys are mapped to the word vector wy correspond-
ing to the class name. To train this mapping, we minimize the following objective function with
3
airplane
automobile
bird
cat
deer
dog
frog
horse
ship
truckcat
automobile
truck
frog
ship
airplane
horse
bird
dog
deer
Figure 2: T-SNE visualization of the semantic word space. Word vector locations are highlighted
and mapped image locations are shown both for images for which this mapping has been trained and
unseen images. The unseen classes are cat and truck.
respect to the matrix θ∈R50×F :
J(θ) =
∑
y∈Ys
∑
x(i)∈Xy
∥wy −θx(i)∥2. (1)
By projecting images into the word vector space, we implicitly extend the word semantics with a
visual grounding, allowing us to query the space, for instance for prototypical visual instances of a
word or the average color of concrete nouns.
Fig. 2 shows a visualization of the 50-dimensional semantic space with word vectors and images
of both seen and unseen classes. The unseen classes are cat and truck. The mapping from 50 to 2
dimensions was done with t-SNE [33]. We can observe that most classes are tightly clustered around
their corresponding word vector while the zero-shot classes (cat and truck for this mapping) do not
have close-by vectors. However, the images of the two zero-shot classes are close to semantically
similar classes. For instance, the cat testing images are mapped most closely to dog, and horse and
are all very far away from car or ship. This motivated the idea for first finding outliers and then
classifying them to the zero-shot word vectors.
Now that we have covered the representations for words and images as well as the image to word
space mapping we can describe the probabilistic model for joint zero-shot learning and standard
image classification.
5 Zero-Shot Learning Model
In this section we first give an overview of our model and then describe each of its components.
In general, we want to predict p(y|x), the conditional probability for both seen and unseen classes
y ∈Ys ∪Yu given an image x. Because standard classifiers will never predict a class that has
no training examples, we introduce a binary visibility random variable which indicates whether an
4
image is in a seen or unseen class V ∈{s,u}. Let Xs be the set of all feature vectors for training
images of seen classes.
We predict the class yfor a new input image xvia:
p(y|x,Xs,W,θ ) =
∑
V ∈{s,u}
P(y|V,x,X s,W,θ )P(V|x,Xs,W,θ ). (2)
Next, we will describe each factor in Eq. 2.
The term P(V = u|x,Xs,W,θ ) is the probability of an image being in an unseen class. It can
be computed by thresholding an outlier detection score. This score is computed on the manifold of
training images that were mapped to the semantic word space. We use a threshold on the marginal of
each point under a mixture of Gaussians. The mapped points of seen classes are used to obtain this
marginal: P(x|Xs,Ws,θ) = ∑
y∈Ys P(x|y)P(y) = ∑
y∈Ys N(θx|wy,Σy)P(y). The Gaussian
of each class is parameterized by the corresponding semantic word vector wy for its mean and a
covariance matrix Σy that is estimated from all the mapped training points with that label. We
restrict the Gaussians to be isometric to prevent overfitting.
For a new image x, the outlier detector then becomes the indicator function that is 1 if the marginal
probability is below a certain threshold T:
P(V = u|x,Xs,W,θ ) := 1 {P(x|Xs,Ws,θ) <T } (3)
We provide an experimental analysis for various thresholdsT below.
In the case where V = s, i.e. the point is considered to be of a known class, we can use any clas-
sifier for obtaining P(y|V = s,x,X s). We use a softmax classifier on the original F-dimensional
features. For the zero-shot case where V = uwe assume an isometric Gaussian distribution around
each of the zero-shot semantic word vectors.
An alternative would be to use the method of Kriegel et al. [16] to obtain an outlier probability for
each testing point and then use the weighted combination of classifiers for both seen and unseen
classes.
6 Experiments
We run most of our experiments on the CIFAR10 dataset. The dataset has 10 classes, each with
5000 32 ×32 ×3 RGB images. We use the unsupervised feature extraction method of Coates and
Ng [6] to obtain a 12,800-dimensional feature vector for each image. In the following experiments,
we omit the training images of 2 classes for the zero-shot analysis.
6.1 Zero-Shot Classes Only
In this section we compare classification between only two zero-shot classes. We observe that if
there is no seen class that is remotely similar to the zero-shot classes, the performance is close to
random. In other words, if the two zero-shot classes are the most similar classes and the seen classes
do not properly span the subspace of the zero-shot classes then performance is poor. For instance,
when cat and dog are taken out from training, the resulting zero-shot classification does not work
well because none of the other 8 categories is similar enough to learn a good feature mapping. On
the other hand, if cat and truck are taken out, then the cat vectors can be mapped to the word space
thanks to transfer from dogs and trucks can be mapped thanks to car, so the performance is very
high.
Fig. 3 shows the performance at various cutoffs for the outlier detection. The cutoff is defined on
the negative log-likelihood of the marginal of each point in the outlier detection. We can observe
that when classifying images of unseen classes into only zero-shot classes (right side of the figure),
we can differentiate images with an accuracy of above 80%.
6.2 Zero-Shot and Seen Classes
In Fig. 3 we can observe that depending on the threshold that splits images into seen or unseen
classes at test time we can obtain accuracies of trained classes of approximately 80%. At 70%
5
0 10 20 30 40 50 60 70 80
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Negative log p(x)
Classification accuracy
automobile−frog
deer−truck
frog−truck
horse−ship
horse−truck
Figure 3: Visualization of the accuracy of the seen classes (lines from the top left to bottom right)
and pairs of zero-shot classes (lines from bottom left to top right) at different thresholds of the
negative log-likelihood of each mapped test image vector.
accuracy, unseen classes can be classified with accuracies of between 30% to 15%. Random chance
is 10%.
7 Conclusion
We introduced a novel model for joint standard and zero-shot classification based on deep learned
word and image representations. The two key ideas are that (i) using semantic word vector repre-
sentations can help to transfer knowledge between categories even when these representations are
learned in an unsupervised way and (ii) that our Bayesian framework that first differentiates outliers
from points on the projected semantic manifold can help to combine both zero-shot and seen classi-
fication into one framework. If the task was only to differentiate between various zero-shot classes
we could obtain accuracies of up to 90% with a fully unsupervised model.
References
[1] M. Baroni and A. Lenci. Distributional memory: A general framework for corpus-based semantics.
Computational Linguistics, 36(4):673–721, 2010.
[2] E. Bart and S. Ullman. Cross-generalization: learning novel classes from a single example by feature
replacement. In CVPR, 2005.
[3] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[4] J. Blitzer, M. Dredze, and F. Pereira. Biographies, Bollywood, Boom-boxes and Blenders: Domain
Adaptation for Sentiment Classification. In ACL, 2007.
[5] E. Bruni, G. Boleda, M. Baroni, and N. Tran. Distributional semantics in technicolor. In ACL, 2012.
6
[6] A. Coates and A. Ng. The Importance of Encoding Versus Training with Sparse Coding and Vector
Quantization . In ICML, 2011.
[7] R. Collobert and J. Weston. A unified architecture for natural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[8] J. Curran. From Distributional to Semantic Similarity. PhD thesis, University of Edinburgh, 2004.
[9] K. Erk and S. Pad ´o. A structured vector space model for word meaning in context. In EMNLP, 2008.
[10] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. In CVPR, 2009.
[11] Y . Feng and M. Lapata. Visual information in semantic representation. In HLT-NAACL, 2010.
[12] M. Fink. Object classification from a single example utilizing class relevance pseudo-metrics. In NIPS,
2004.
[13] X. Glorot, A. Bordes, and Y . Bengio. Domain adaptation for Large-Scale sentiment classification: A deep
learning approach. In ICML, 2011.
[14] D. Hoiem, A.A. Efros, and M. Herbert. Geometric context from a single image. In ICCV, 2005.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improving Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
[16] H. Kriegel, P. Kr ¨oger, E. Schubert, and A. Zimek. LoOP: local Outlier Probabilities. In Proceedings of
the 18th ACM conference on Information and knowledge management, CIKM ’09, 2009.
[17] R.; Perona L. Fei-Fei; Fergus. One-shot learning of object categories. TPAMI, 28, 2006.
[18] B. M. Lake, J. Gross R. Salakhutdinov, and J. B. Tenenbaum. One shot learning of simple visual concepts.
2011.
[19] C. H. Lampert, H. Nickisch, and S. Harmeling. Learning to Detect Unseen Object Classes by Between-
Class Attribute Transfer. In CVPR, 2009.
[20] T. K. Landauer and S. T. Dumais. A solution to Plato’s problem: the Latent Semantic Analysis theory of
acquisition, induction and representation of knowledge. Psychological Review, 104(2):211–240, 1997.
[21] H. Larochelle, D. Erhan, and Y . Bengio. Zero-data learning of new tasks. In AAAI, 2008.
[22] C.W. Leong and R. Mihalcea. Going beyond text: A hybrid image-text approach for measuring word
relatedness. In IJCNLP, 2011.
[23] D. Lin. Automatic retrieval and clustering of similar words. In Proceedings of COLING-ACL , pages
768–774, 1998.
[24] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A.Y . Ng. Multimodal deep learning. In ICML, 2011.
[25] S. Pado and M. Lapata. Dependency-based construction of semantic space models. Computational Lin-
guistics, 33(2):161–199, 2007.
[26] M. Palatucci, D. Pomerleau, G. Hinton, and T. Mitchell. Zero-shot learning with semantic output codes.
In NIPS, 2009.
[27] Guo-Jun Qi, C. Aggarwal, Y . Rui, Q. Tian, S. Chang, and T. Huang. Towards cross-category knowledge
propagation for learning visual concepts. In CVPR, 2011.
[28] A. Torralba R. Salakhutdinov, J. Tenenbaum. Learning to learn with compound hierarchical-deep models.
In NIPS, 2012.
[29] H. Sch ¨utze. Automatic word sense discrimination. Computational Linguistics, 24:97–124, 1998.
[30] R. Socher and L. Fei-Fei. Connecting modalities: Semi-supervised segmentation and annotation of images
using unaligned text corpora. In CVPR, 2010.
[31] N. Srivastava and R. Salakhutdinov. Multimodal learning with deep boltzmann machines. In NIPS, 2012.
[32] P. D. Turney and P. Pantel. From frequency to meaning: Vector space models of semantics. Journal of
Artificial Intelligence Research, 37:141–188, 2010.
[33] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research,
2008.
7
|
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "qEV_E7oCrKqWT", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358436600000, "tmdate": 1358436600000, "ddate": null, "number": 9, "content": {"title": "Zero-Shot Learning Through Cross-Modal Transfer", "decision": "conferenceOral-iclr2013-workshop", "abstract": "This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.", "pdf": "https://arxiv.org/abs/1301.3666", "paperhash": "socher|zeroshot_learning_through_crossmodal_transfer", "keywords": [], "conflicts": [], "authors": ["Richard Socher", "Milind Ganjoo", "Hamsa Sridhar", "Osbert Bastani", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["richard@socher.org", "mganjoo@stanford.edu", "hsridhar@stanford.edu", "obastani@stanford.edu", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["richard@socher.org"], "writers": []}
|
[Review]:
We thank the reviewers for their feedback.
I have not seen references to similarity learning, which can be used to say if two images are of the same class. These can obviously be used to determine if an image is of a known class or not, without having seen any image of the class.
- Thanks for the reference. Would you use the images of other classes to train classification similarity learning? These would have a different distribution than the completely unseen images from the zero shot classes? In other words, what would the non-similar objects be?
* I wonder if the standard deviation will not be biased (small) since it is estimated on the training samples. How important is that?
- We tried fitting a general covariance matrix and it decreases performance.
* I wonder if the threshold does not depend on things like the complexity of the class and the number of training examples of the class.
- It might be and we notice that different thresholds should be selected via cross validation.
In general, I am not convinced that a single threshold can be used to estimate if a new image is of a new class.
- Right, we found a better performance by fitting different thresholds for each class. We will include this in follow-up paper submissions.
I did not understand what to do when one decides that an image is of an unknown class. How should it be labeled in that case?
- Using the distances to the word vectors of the unknown classes.
I did not understand why one needs to learn a separate classifier for the known classes, instead of just using the distance to the known classes in the embedding space.
reply.
- The discriminative classifiers have much higher accuracy than the simple distances for known classes.
I do wonder why the authors claim that they 'further extend [the] theoretical analysis [of Palatucci et a.] ... and weaken their strong assumptions'.
- Thanks, we will take this and the other typo out and uploaded a new version to arxiv (which should be available soon).
|
Richard Socher
| null | null |
{"id": "SSiPd5Rr9bdXm", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363754760000, "tmdate": 1363754760000, "ddate": null, "number": 4, "content": {"title": "", "review": "We thank the reviewers for their feedback.\r\n\r\nI have not seen references to similarity learning, which can be used to say if two images are of the same class. These can obviously be used to determine if an image is of a known class or not, without having seen any image of the class. \r\n- Thanks for the reference. Would you use the images of other classes to train classification similarity learning? These would have a different distribution than the completely unseen images from the zero shot classes? In other words, what would the non-similar objects be?\r\n\r\n* I wonder if the standard deviation will not be biased (small) since it is estimated on the training samples. How important is that? \r\n- We tried fitting a general covariance matrix and it decreases performance.\r\n\r\n* I wonder if the threshold does not depend on things like the complexity of the class and the number of training examples of the class. \r\n- It might be and we notice that different thresholds should be selected via cross validation.\r\n\r\n\r\nIn general, I am not convinced that a single threshold can be used to estimate if a new image is of a new class. \r\n- Right, we found a better performance by fitting different thresholds for each class. We will include this in follow-up paper submissions.\r\n\r\n\r\nI did not understand what to do when one decides that an image is of an unknown class. How should it be labeled in that case?\r\n- Using the distances to the word vectors of the unknown classes.\r\n\r\nI did not understand why one needs to learn a separate classifier for the known classes, instead of just using the distance to the known classes in the embedding space.\r\nreply.\r\n- The discriminative classifiers have much higher accuracy than the simple distances for known classes. \r\n\r\n\r\n\r\nI do wonder why the authors claim that they 'further extend [the] theoretical analysis [of Palatucci et a.] ... and weaken their strong assumptions'. \r\n- Thanks, we will take this and the other typo out and uploaded a new version to arxiv (which should be available soon)."}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "qEV_E7oCrKqWT", "readers": ["everyone"], "nonreaders": [], "signatures": ["Richard Socher"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 12,
"praise": 1,
"presentation_and_reporting": 7,
"results_and_discussion": 3,
"suggestion_and_solution": 6,
"total": 24
}
| 1.333333
| -0.576341
| 1.909674
| 1.377911
| 0.437321
| 0.044578
| 0.125
| 0
| 0
| 0.5
| 0.041667
| 0.291667
| 0.125
| 0.25
|
{
"criticism": 0.125,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.5,
"praise": 0.041666666666666664,
"presentation_and_reporting": 0.2916666666666667,
"results_and_discussion": 0.125,
"suggestion_and_solution": 0.25
}
| 1.333333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
qEV_E7oCrKqWT
|
Zero-Shot Learning Through Cross-Modal Transfer
|
This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.
|
Zero-Shot Learning Through Cross-Modal Transfer
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher D. Manning, Andrew Y. Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
richard@socher.org, {mganjoo, hsridhar, obastani, manning, ang}@stanford.edu
Abstract
This work introduces a model that can recognize objects in images even if no
training data is available for the objects. The only necessary knowledge about the
unseen categories comes from unsupervised large text corpora. In our zero-shot
framework distributional information in language can be seen as spanning a se-
mantic basis for understanding what objects look like. Most previous zero-shot
learning models can only differentiate between unseen classes. In contrast, our
model can both obtain state of the art performance on classes that have thousands
of training images and obtain reasonable performance on unseen classes. This is
achieved by first using outlier detection in the semantic space and then two sepa-
rate recognition models. Furthermore, our model does not require any manually
defined semantic features for either words or images.
1 Introduction
The ability to classify instances of an unseen visual class, called zero-shot learning, is useful in
many situations. There are many species, products or activities without labeled data and new visual
categories, such as the latest gadgets or car models are introduced frequently. In this work, we
show how to make use of the vast amount of knowledge about the visual world available in natural
language to classify unseen objects. We attempt to model people’s ability to identify unseen objects
even if the only knowledge about that object came from reading about it. For instance, after reading
the description of a two-wheeled self-balancing electric vehicle, controlled by a stick, with which
you can move around while standing on top of it, many would be able to identify aSegway, possibly
after being briefly perplexed because the new object looks different to any previously observed
object class.
We introduce a zero-shot model that can predict both seen and unseen classes. For instance, without
ever seeing a cat image, it can determine whether an image shows a cat or a known category from
the training set such as a dog or a horse. The model is based on two main ideas.
First, images are mapped into a semantic space of words that is learned by a neural network model
[15]. Word vectors capture distributional similarities from a large, unsupervised text corpus. By
learning an image mapping into this space, the word vectors get implicitly grounded by the visual
modality, allowing us to give prototypical instances for various words.
Second, because classifiers prefer to assign test images into classes for which they have seen training
examples, the model incorporates an outlier detection probability which determines whether a new
image is on the manifold of known categories. If the image is of a known category, a standard
classifier can be used. Otherwise, images are assigned to a class based on the likelihood of being
an unseen category. The probability of being an outlier or a known category is integrated into our
probabilistic model. The model is illustrated in Fig 1.
Unlike previous work on zero-shot learning which can only predict intermediate features or dif-
ferentiate between various zero-shot classes [26], our joint model can achieve both state of the art
accuracy on known classes as well as reasonable performance on unseen classes. Furthermore, com-
1
arXiv:1301.3666v2 [cs.CV] 20 Mar 2013
Manifold of known classes
auto horse
dog
truck
New test image from
unknown class
cat
Figure 1: Overview of our multi-modal zero-shot model. We first map each new testing image into a
lower dimensional semantic space. Then, we use outlier detection to determine whether it is on the
manifold of seen images. If the image is not on the manifold, we determine its class with the help
of unsupervised semantic word vectors. In this example, the unseen classes are truck and cat.
pared to related work in knowledge transfer [19, 27] we do not require manually defined semantic
or visual attributes for the zero-shot classes. Our language feature representations are learned from
unsupervised and unaligned corpora.
We first briefly describe a selection of related work, followed by the model description and experi-
ments on CIFAR10.
2 Related Work
We briefly outline connections and differences to five related lines of research. Due to space con-
straints, we cannot do justice to the complete literature.
Zero-Shot Learning. The work most similar to ours is that by Palatucci et al. [26]. They map fMRI
scans of people thinking about certain words into a space of manually designed features and then
classify using these features. They are able to predict semantic features even for words for which
they have not seen scans and experiment with differentiating between several zero-shot classes.
However, the do not classify new test instances into both seen and unseen classes. We extend their
approach to allow for this setup using outlier detection.
Larochelle et al. [21] describe the unseen zero-shot classes by a “canonical” example or use ground
truth human labeling of attributes.
One-Shot LearningOne-shot learning [17, 18] seeks to learn a visual object class by using very few
training examples. This is usually achieved by either sharing of feature representations [2], model
parameters [12] or via similar context [14]. A recent related work on one-shot learning is that of
Salakhutdinov et al. [28]. Similar to their work, our model is based on using deep learning tech-
niques to learn low-level image features followed by a probabilistic model to transfer knowledge.
However, our work is able to classify object categories without any training data due to the cross-
2
modal knowledge transfer from natural language and at the same time obtain high performance on
classes with many training examples.
Knowledge and Visual Attribute Transfer.Lambert et al. and Farhadi et al. [19, 10] were two
of the first to use well-designed visual attributes of unseen classes to classify them. This is different
to our setting since we only have distributional features of words learned from unsupervised, non-
parallel corpora and can classify between categories that have thousands or zero training images. Qi
et al. [27] learn when to transfer knowledge from one category to another for each instance.
Domain Adaptation. Domain adaptation is useful in situations in which there is a lot of training
data in one domain but little to none in another. For instance, in sentiment analysis one could train a
classifier for movie reviews and then adapt from that domain to book reviews [4, 13]. While related,
this line of work is different since there is data for each class but the features may differ between
domains.
Multimodal Embeddings. Multimodal embeddings relate information from multiple sources such
as sound and video [24] or images and text. Socher et al. [30] project words and image regions into a
common space using kernelized canonical correlation analysis to obtain state of the art performance
in annotation and segmentation. Similar to our work, they use unsupervised large text corpora to
learn semantic word representations. Their model does require a small amount of training data
however for each class. Among other recent work is that by Srivastava and Salakhutdinov [31] who
developed multimodal Deep Boltzmann Machines. Similar to their work, we use techniques from
the broad field of deep learning to represent images and words.
Some work has been done on multimodal distributional methods [11, 22]. Most recently, Bruni et al.
[5] worked on perceptually grounding word meaning and showed that joint models are better able
to predict the color of concrete objects.
3 Word and Image Representations
We begin the description of the full framework with the feature representations of words and images.
Distributional approaches are very common for capturing semantic similarity between words. In
these approaches, words are represented as vectors of distributional characteristics – most often their
co-occurrences with words in context [25, 9, 1, 32]. These representations have proven very effective
in natural language processing tasks such as sense disambiguation [29], thesaurus extraction [23, 8]
and cognitive modeling [20].
We initialize all word vectors with pre-trained 50-dimensional word vectors from the unsupervised
model of Huang et al. [15]. Using free Wikipedia text, their model learns word vectors by predict-
ing how likely it is for each word to occur in its context. Their model uses both local context in
the window around each word and global document context. Similar to other local co-occurrence
based vector space models, the resulting word vectors capture distributional syntactic and semantic
information. For further details and evaluations of these embeddings, see [3, 7].
We use the unsupervised method of Coates et al. [6] to extract F image features from raw pixels in
an unsupervised fashion. Each image is henceforth represented by a vector x∈RF .
4 Projecting Images into Semantic Word Spaces
In order to learn semantic relationships and class membership of images we project the image feature
vectors into the 50-dimensional word space. During training and testing, we consider a set of classes
Y. Some of the classes yin this set will have available training data, others will be zero-shot classes
without any training data. We define the former as the seen classes Ys and the latter as the unseen
classes Yu. Let W = Ws ∪Wu be the set of word vectors capturing distributional information for
both seen and unseen visual classes, respectively.
All training images x(i) ∈Xy of a seen class y∈Ys are mapped to the word vector wy correspond-
ing to the class name. To train this mapping, we minimize the following objective function with
3
airplane
automobile
bird
cat
deer
dog
frog
horse
ship
truckcat
automobile
truck
frog
ship
airplane
horse
bird
dog
deer
Figure 2: T-SNE visualization of the semantic word space. Word vector locations are highlighted
and mapped image locations are shown both for images for which this mapping has been trained and
unseen images. The unseen classes are cat and truck.
respect to the matrix θ∈R50×F :
J(θ) =
∑
y∈Ys
∑
x(i)∈Xy
∥wy −θx(i)∥2. (1)
By projecting images into the word vector space, we implicitly extend the word semantics with a
visual grounding, allowing us to query the space, for instance for prototypical visual instances of a
word or the average color of concrete nouns.
Fig. 2 shows a visualization of the 50-dimensional semantic space with word vectors and images
of both seen and unseen classes. The unseen classes are cat and truck. The mapping from 50 to 2
dimensions was done with t-SNE [33]. We can observe that most classes are tightly clustered around
their corresponding word vector while the zero-shot classes (cat and truck for this mapping) do not
have close-by vectors. However, the images of the two zero-shot classes are close to semantically
similar classes. For instance, the cat testing images are mapped most closely to dog, and horse and
are all very far away from car or ship. This motivated the idea for first finding outliers and then
classifying them to the zero-shot word vectors.
Now that we have covered the representations for words and images as well as the image to word
space mapping we can describe the probabilistic model for joint zero-shot learning and standard
image classification.
5 Zero-Shot Learning Model
In this section we first give an overview of our model and then describe each of its components.
In general, we want to predict p(y|x), the conditional probability for both seen and unseen classes
y ∈Ys ∪Yu given an image x. Because standard classifiers will never predict a class that has
no training examples, we introduce a binary visibility random variable which indicates whether an
4
image is in a seen or unseen class V ∈{s,u}. Let Xs be the set of all feature vectors for training
images of seen classes.
We predict the class yfor a new input image xvia:
p(y|x,Xs,W,θ ) =
∑
V ∈{s,u}
P(y|V,x,X s,W,θ )P(V|x,Xs,W,θ ). (2)
Next, we will describe each factor in Eq. 2.
The term P(V = u|x,Xs,W,θ ) is the probability of an image being in an unseen class. It can
be computed by thresholding an outlier detection score. This score is computed on the manifold of
training images that were mapped to the semantic word space. We use a threshold on the marginal of
each point under a mixture of Gaussians. The mapped points of seen classes are used to obtain this
marginal: P(x|Xs,Ws,θ) = ∑
y∈Ys P(x|y)P(y) = ∑
y∈Ys N(θx|wy,Σy)P(y). The Gaussian
of each class is parameterized by the corresponding semantic word vector wy for its mean and a
covariance matrix Σy that is estimated from all the mapped training points with that label. We
restrict the Gaussians to be isometric to prevent overfitting.
For a new image x, the outlier detector then becomes the indicator function that is 1 if the marginal
probability is below a certain threshold T:
P(V = u|x,Xs,W,θ ) := 1 {P(x|Xs,Ws,θ) <T } (3)
We provide an experimental analysis for various thresholdsT below.
In the case where V = s, i.e. the point is considered to be of a known class, we can use any clas-
sifier for obtaining P(y|V = s,x,X s). We use a softmax classifier on the original F-dimensional
features. For the zero-shot case where V = uwe assume an isometric Gaussian distribution around
each of the zero-shot semantic word vectors.
An alternative would be to use the method of Kriegel et al. [16] to obtain an outlier probability for
each testing point and then use the weighted combination of classifiers for both seen and unseen
classes.
6 Experiments
We run most of our experiments on the CIFAR10 dataset. The dataset has 10 classes, each with
5000 32 ×32 ×3 RGB images. We use the unsupervised feature extraction method of Coates and
Ng [6] to obtain a 12,800-dimensional feature vector for each image. In the following experiments,
we omit the training images of 2 classes for the zero-shot analysis.
6.1 Zero-Shot Classes Only
In this section we compare classification between only two zero-shot classes. We observe that if
there is no seen class that is remotely similar to the zero-shot classes, the performance is close to
random. In other words, if the two zero-shot classes are the most similar classes and the seen classes
do not properly span the subspace of the zero-shot classes then performance is poor. For instance,
when cat and dog are taken out from training, the resulting zero-shot classification does not work
well because none of the other 8 categories is similar enough to learn a good feature mapping. On
the other hand, if cat and truck are taken out, then the cat vectors can be mapped to the word space
thanks to transfer from dogs and trucks can be mapped thanks to car, so the performance is very
high.
Fig. 3 shows the performance at various cutoffs for the outlier detection. The cutoff is defined on
the negative log-likelihood of the marginal of each point in the outlier detection. We can observe
that when classifying images of unseen classes into only zero-shot classes (right side of the figure),
we can differentiate images with an accuracy of above 80%.
6.2 Zero-Shot and Seen Classes
In Fig. 3 we can observe that depending on the threshold that splits images into seen or unseen
classes at test time we can obtain accuracies of trained classes of approximately 80%. At 70%
5
0 10 20 30 40 50 60 70 80
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Negative log p(x)
Classification accuracy
automobile−frog
deer−truck
frog−truck
horse−ship
horse−truck
Figure 3: Visualization of the accuracy of the seen classes (lines from the top left to bottom right)
and pairs of zero-shot classes (lines from bottom left to top right) at different thresholds of the
negative log-likelihood of each mapped test image vector.
accuracy, unseen classes can be classified with accuracies of between 30% to 15%. Random chance
is 10%.
7 Conclusion
We introduced a novel model for joint standard and zero-shot classification based on deep learned
word and image representations. The two key ideas are that (i) using semantic word vector repre-
sentations can help to transfer knowledge between categories even when these representations are
learned in an unsupervised way and (ii) that our Bayesian framework that first differentiates outliers
from points on the projected semantic manifold can help to combine both zero-shot and seen classi-
fication into one framework. If the task was only to differentiate between various zero-shot classes
we could obtain accuracies of up to 90% with a fully unsupervised model.
References
[1] M. Baroni and A. Lenci. Distributional memory: A general framework for corpus-based semantics.
Computational Linguistics, 36(4):673–721, 2010.
[2] E. Bart and S. Ullman. Cross-generalization: learning novel classes from a single example by feature
replacement. In CVPR, 2005.
[3] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[4] J. Blitzer, M. Dredze, and F. Pereira. Biographies, Bollywood, Boom-boxes and Blenders: Domain
Adaptation for Sentiment Classification. In ACL, 2007.
[5] E. Bruni, G. Boleda, M. Baroni, and N. Tran. Distributional semantics in technicolor. In ACL, 2012.
6
[6] A. Coates and A. Ng. The Importance of Encoding Versus Training with Sparse Coding and Vector
Quantization . In ICML, 2011.
[7] R. Collobert and J. Weston. A unified architecture for natural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[8] J. Curran. From Distributional to Semantic Similarity. PhD thesis, University of Edinburgh, 2004.
[9] K. Erk and S. Pad ´o. A structured vector space model for word meaning in context. In EMNLP, 2008.
[10] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. In CVPR, 2009.
[11] Y . Feng and M. Lapata. Visual information in semantic representation. In HLT-NAACL, 2010.
[12] M. Fink. Object classification from a single example utilizing class relevance pseudo-metrics. In NIPS,
2004.
[13] X. Glorot, A. Bordes, and Y . Bengio. Domain adaptation for Large-Scale sentiment classification: A deep
learning approach. In ICML, 2011.
[14] D. Hoiem, A.A. Efros, and M. Herbert. Geometric context from a single image. In ICCV, 2005.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improving Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
[16] H. Kriegel, P. Kr ¨oger, E. Schubert, and A. Zimek. LoOP: local Outlier Probabilities. In Proceedings of
the 18th ACM conference on Information and knowledge management, CIKM ’09, 2009.
[17] R.; Perona L. Fei-Fei; Fergus. One-shot learning of object categories. TPAMI, 28, 2006.
[18] B. M. Lake, J. Gross R. Salakhutdinov, and J. B. Tenenbaum. One shot learning of simple visual concepts.
2011.
[19] C. H. Lampert, H. Nickisch, and S. Harmeling. Learning to Detect Unseen Object Classes by Between-
Class Attribute Transfer. In CVPR, 2009.
[20] T. K. Landauer and S. T. Dumais. A solution to Plato’s problem: the Latent Semantic Analysis theory of
acquisition, induction and representation of knowledge. Psychological Review, 104(2):211–240, 1997.
[21] H. Larochelle, D. Erhan, and Y . Bengio. Zero-data learning of new tasks. In AAAI, 2008.
[22] C.W. Leong and R. Mihalcea. Going beyond text: A hybrid image-text approach for measuring word
relatedness. In IJCNLP, 2011.
[23] D. Lin. Automatic retrieval and clustering of similar words. In Proceedings of COLING-ACL , pages
768–774, 1998.
[24] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A.Y . Ng. Multimodal deep learning. In ICML, 2011.
[25] S. Pado and M. Lapata. Dependency-based construction of semantic space models. Computational Lin-
guistics, 33(2):161–199, 2007.
[26] M. Palatucci, D. Pomerleau, G. Hinton, and T. Mitchell. Zero-shot learning with semantic output codes.
In NIPS, 2009.
[27] Guo-Jun Qi, C. Aggarwal, Y . Rui, Q. Tian, S. Chang, and T. Huang. Towards cross-category knowledge
propagation for learning visual concepts. In CVPR, 2011.
[28] A. Torralba R. Salakhutdinov, J. Tenenbaum. Learning to learn with compound hierarchical-deep models.
In NIPS, 2012.
[29] H. Sch ¨utze. Automatic word sense discrimination. Computational Linguistics, 24:97–124, 1998.
[30] R. Socher and L. Fei-Fei. Connecting modalities: Semi-supervised segmentation and annotation of images
using unaligned text corpora. In CVPR, 2010.
[31] N. Srivastava and R. Salakhutdinov. Multimodal learning with deep boltzmann machines. In NIPS, 2012.
[32] P. D. Turney and P. Pantel. From frequency to meaning: Vector space models of semantics. Journal of
Artificial Intelligence Research, 37:141–188, 2010.
[33] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research,
2008.
7
|
Richard Socher, Milind Ganjoo, Hamsa Sridhar, Osbert Bastani, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "qEV_E7oCrKqWT", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358436600000, "tmdate": 1358436600000, "ddate": null, "number": 9, "content": {"title": "Zero-Shot Learning Through Cross-Modal Transfer", "decision": "conferenceOral-iclr2013-workshop", "abstract": "This work introduces a model that can recognize objects in images even if no training data is available for the objects. The only necessary knowledge about the unseen categories comes from unsupervised large text corpora. In our zero-shot framework distributional information in language can be seen as spanning a semantic basis for understanding what objects look like. Most previous zero-shot learning models can only differentiate between unseen classes. In contrast, our model can both obtain state of the art performance on classes that have thousands of training images and obtain reasonable performance on unseen classes. This is achieved by first using outlier detection in the semantic space and then two separate recognition models. Furthermore, our model does not require any manually defined semantic features for either words or images.", "pdf": "https://arxiv.org/abs/1301.3666", "paperhash": "socher|zeroshot_learning_through_crossmodal_transfer", "keywords": [], "conflicts": [], "authors": ["Richard Socher", "Milind Ganjoo", "Hamsa Sridhar", "Osbert Bastani", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["richard@socher.org", "mganjoo@stanford.edu", "hsridhar@stanford.edu", "obastani@stanford.edu", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["richard@socher.org"], "writers": []}
|
[Review]:
summary:
the paper presents a framework to learn to classify images that can come either from known
or unknown classes. This is done by first mapping both images and classes into a joint embedding
space. Furthermore, the probability of an image being of an unknown class is estimated using
a mixture of Gaussians. Experiments on CIFAR-10 show how performance vary depending on the threshold use to
determine if an image is of a known class or not.
review:
- The idea of learning a joint embedding of images and classes is not new, but is nicely explained
in the paper.
- the authors relate to other works on zero-shot learning. I have not seen references to similarity learning,
which can be used to say if two images are of the same class. These can obviously be used to determine
if an image is of a known class or not, without having seen any image of the class.
- The proposed approach to estimate the probability that an image is of a known class or not is based
on a mixture of Gaussians, where one Gaussian is estimated for each known class where the mean is
the embedding vector of the class and the standard deviation is estimated on the training samples of
that class. I have a few concerns with this:
* I wonder if the standard deviation will not be biased (small) since it is estimated on the training
samples. How important is that?
* I wonder if the threshold does not depend on things like the complexity of the class and the number
of training examples of the class. In general, I am not convinced that a single threshold can be used
to estimate if a new image is of a new class. I agree it might work for a small number of well
separate classes (like CIFAR-10), but I doubt it would work for problems with thousands of classes
which obviously are more interconnected to each other.
- I did not understand what to do when one decides that an image is of an unknown class. How should it
be labeled in that case?
- I did not understand why one needs to learn a separate classifier for the known classes, instead of
just using the distance to the known classes in the embedding space.
|
anonymous reviewer 310e
| null | null |
{"id": "88s34zXWw20My", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362001800000, "tmdate": 1362001800000, "ddate": null, "number": 2, "content": {"title": "review of Zero-Shot Learning Through Cross-Modal Transfer", "review": "summary:\r\nthe paper presents a framework to learn to classify images that can come either from known\r\nor unknown classes. This is done by first mapping both images and classes into a joint embedding\r\nspace. Furthermore, the probability of an image being of an unknown class is estimated using\r\na mixture of Gaussians. Experiments on CIFAR-10 show how performance vary depending on the threshold use to\r\ndetermine if an image is of a known class or not.\r\n\r\nreview:\r\n- The idea of learning a joint embedding of images and classes is not new, but is nicely explained\r\nin the paper.\r\n- the authors relate to other works on zero-shot learning. I have not seen references to similarity learning,\r\n which can be used to say if two images are of the same class. These can obviously be used to determine\r\n if an image is of a known class or not, without having seen any image of the class.\r\n- The proposed approach to estimate the probability that an image is of a known class or not is based\r\n on a mixture of Gaussians, where one Gaussian is estimated for each known class where the mean is\r\n the embedding vector of the class and the standard deviation is estimated on the training samples of\r\n that class. I have a few concerns with this:\r\n * I wonder if the standard deviation will not be biased (small) since it is estimated on the training\r\n samples. How important is that?\r\n * I wonder if the threshold does not depend on things like the complexity of the class and the number\r\n of training examples of the class. In general, I am not convinced that a single threshold can be used\r\n to estimate if a new image is of a new class. I agree it might work for a small number of well\r\n separate classes (like CIFAR-10), but I doubt it would work for problems with thousands of classes\r\n which obviously are more interconnected to each other.\r\n- I did not understand what to do when one decides that an image is of an unknown class. How should it\r\n be labeled in that case?\r\n- I did not understand why one needs to learn a separate classifier for the known classes, instead of\r\n just using the distance to the known classes in the embedding space."}, "forum": "qEV_E7oCrKqWT", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "qEV_E7oCrKqWT", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 310e"], "writers": ["anonymous"]}
|
{
"criticism": 5,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 9,
"praise": 0,
"presentation_and_reporting": 5,
"results_and_discussion": 4,
"suggestion_and_solution": 2,
"total": 17
}
| 1.529412
| 1.276893
| 0.252519
| 1.578995
| 0.468711
| 0.049583
| 0.294118
| 0
| 0.058824
| 0.529412
| 0
| 0.294118
| 0.235294
| 0.117647
|
{
"criticism": 0.29411764705882354,
"example": 0,
"importance_and_relevance": 0.058823529411764705,
"materials_and_methods": 0.5294117647058824,
"praise": 0,
"presentation_and_reporting": 0.29411764705882354,
"results_and_discussion": 0.23529411764705882,
"suggestion_and_solution": 0.11764705882352941
}
| 1.529412
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
msGKsXQXNiCBk
|
Learning New Facts From Knowledge Bases With Neural Tensor Networks and
Semantic Word Vectors
|
Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.
|
arXiv:1301.3618v2 [cs.CL] 16 Mar 2013
Learning New Facts From Knowledge Bases With
Neural T ensor Networks and Semantic W ord V ectors
Danqi Chen, Richard Socher , Christopher D. Manning, Andrew Y . Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
{danqi,manning,ang}@stanford.edu, richard@socher.org
Abstract
Knowledge bases provide applications with the benefit of eas ily accessible, sys-
tematic relational knowledge but often suffer in practice from their incompleteness
and lack of knowledge of new entities and relations. Much wor k has focused on
building or extending them by finding patterns in large unann otated text corpora.
In contrast, here we mainly aim to complete a knowledge base by predicting addi-
tional true relationships between entities, based on generalizations that can be dis-
cerned in the given knowledgebase. We introduce a neural tensor network (NTN)
model which predicts new relationship entries that can be ad ded to the database.
This model can be improved by initializing entity represent ations with word vec-
tors learned in an unsupervised fashion from text, and when d oing this, existing
relations can even be queried for entities that were not pres ent in the database.
Our model generalizes and outperforms existing models for this problem, and can
classify unseen relationships in WordNet with an accuracy of 75.8%.
1 Introduction
Ontologies and knowledge bases such as WordNet [1] or Yago [2 ] are extremely useful resources
for query expansion [3], coreference resolution [4], question answering (Siri), information retrieval
(Google Knowledge Graph), or generally providing inferenc e over structured knowledge to users.
Much work has focused on extending existing knowledge bases[5, 6, 2] using patterns or classifiers
applied to large corpora.
We introduce a model that can accurately learn to add additional facts to a database using only that
database. This is achieved by representing each entity (i.e., each object or individual) in the database
by a vector that can capture facts and their certainty about t hat entity. Each relation is defined by
the parameters of a novel neural tensor network which can explicitly relate two entity vectors and is
more powerful than a standard neural network layer.
Furthermore, our model allows us to ask whether even entitie s that were not in the database are
in certain relationships by simply using distributional wo rd vectors. These vectors are learned by a
neural network model [7] using unsupervised text corpora such as Wikipedia. They capture syntactic
and semantic information and allow us to extend the database without any manually designed rules
or additional parsing of other textual resources.
The model outperforms previously introduced related model s such as that of Bordes et al. [8]. We
evaluate on a heldout set of relationships in WordNet. The accuracy for predicting unseen relations
is 75.8%. We also evaluate in terms of ranking. For WordNet, t here are 38,696 different entities
and we use 11 relationship types. On average for each left ent ity there are 100 correct entities in a
specific relationship. For instance, dog has many hundreds of hyponyms such as puppy, barker or
dachshund. In 20.9% of the relationship triplets, the model ranks the c orrect test entity in the top
100 out of 38,696 possible entities.
1
2 Related W ork
There is a vast amount of work extending knowledge bases usin g external corpora [5, 6, 2], among
many others. In contrast, little work has been done in extens ions based purely on the knowledge
base itself. The work closest to ours is that by Bordes et al. [ 9]. We implement their approach and
compare to it directly. Our model outperforms it by a signific ant margin in terms of both accuracy
and ranking. Both models can benefit from initialization with unsupervised word vectors.
Another related approach is that by Sutskever et al. [10] who use tensor factorization and Bayesian
clustering for learning relational structures. Instead of clustering the entities in a nonparametric
Bayesian framework we rely purely on learned entity vectors . Their computation of the truth of a
relation can be seen as a special case of our proposed model. Instead of using MCMC for inference,
we use standard backpropagation which is modified for the Neu ral Tensor Network. Lastly, we do
not require multiple embeddings for each entity. Instead, we consider the subunits (space separated
words) of entity names. This allows more statistical strength to be shared among entities.
Many methods that use knowledge bases as features such as [3, 4] could benefit from a method
that maps the provided information into vector representat ions. We learn to modify unsupervised
word representations via grounding in world knowledge. This essentially allows us to analyze word
embeddings and query them for specific relations. Furthermo re, the resulting vectors could be used
in other tasks such as NER [7] or relation classification in natural language [11].
Lastly, Ranzato et al. [12] introduced a factored 3-way Restricted Boltzmann Machine which is also
parameterized by a tensor.
3 Neural T ensor Networks
In this section we describe the full neural tensor network. We begin by describing the representation
of entities and continue with the model that learns entity relationships.
We compare using both randomly initialized word vectors and pre-trained 100-dimensional word
vectors from the unsupervised model of Collobert and Weston [13, 7]. Using free Wikipedia text,
this model learns word vectors by predicting how likely it is for each word to occur in its context.
The model uses both local context in the window around each wo rd and global document context.
Similar to other local co-occurrence based vector space mod els, the resulting word vectors cap-
ture distributional syntactic and semantic information. F or further details and evaluations of these
embeddings, see [14, 13, 15].
For cases where the entity name has multiple words, we simply average the word vectors.
The Neural Tensor Network (NTN) replaces the standard linea r layer with a bilinear layer that di-
rectly relates the two entity vectors. Lete1, e2 ∈ Rd be the vector representations of the two entities.
We can compute a score of how plausible they are in a certain relationship R by the following NTN-
based function:
g(e1, R, e2) =UT f
(
eT
1 W [1:k]
R e2 + VR
[
e1
e2
]
+ bR
)
, (1)
where f = tanhis a standard nonlinearity. We define W [1:k] ∈ Rd× d× k as a tensor and the bilinear
tensor product results in a vector h ∈ Rk, where each entry is computed by one slice of the tensor:
hi = eT
1 W [i]e2. (2)
The remaining parameters for relation R are the standard form of a neural network: VR ∈ Rk× 2d
and U ∈ Rk, bR ∈ Rk.
The main advantage of this model is that it can directly relate the two inputs instead of only implicitly
through the nonlinearity. The bilinear model for truth valu es in [10] becomes a special case of this
model with VR = 0, bR = 0, k= 1, f= identity.
In order to train the parameters W, U, V, E, b, we minimize the following contrastive max-margin
objective:
J(W, U, V, E, b) =
N∑
i=1
C∑
c=1
max(0,1 − g(e(i)
1 , R(i), e(i)
2 ) +g(e(i)
1 , R(i), ec)), (3)
2
where N is the number of training triplets and we score the correct re lation triplets higher than a
corrupted one in which one of the entities was replaced with arandom entity. For each correct triplet
we sample C random corrupted entities.
The model is trained by taking gradients with respect to the fi ve sets of parameters and using mini-
batched L-BFGS.
4 Experiments
In our experiments, we follow the data settings of WordNet in [9]. There are a total of 38,696
different entities and 11 relations. We use 112,581 triplet s for training, 2,609 for the development
set and 10,544 for final testing.
The WordNet relationships we consider are has instance, type of, member meronym, member
holonym, part of, has part, subordinate instance of, domain region, synset domain region, similar
to, domain topic.
We compare our model with two models in Bordes et al. [9, 8], wh ich have the same goal as ours.
The model of [9] has the following scoring function:
g(e1, R, e2) =∥WR,lefte1 − WR,righte2∥1, (4)
where WR,left, WR,right ∈ Rd× d. The model of [8] also maps each relation type to an embedding
eR ∈ Rd and scores the relationships by:
g(e1, R, e2) =−(W1e1 ⊗ Wrel,1eR + b1) · (W2e2 ⊗ Wrel,2eR + b2), (5)
where W1, Wrel,1, W2, Wrel,2 ∈ Rd× d, b1, b2 ∈ Rd× 1. In the comparisons below, we call these
two models the similarity model and the Hadamard model respectively. While our function scores
correct triplets highly, these two models score correct tri plets lower. All models are trained in a
contrastive max-margin objective functions.
Our goal is to predict “correct” relations (e1, R, e2) in the testing data. We can compute a score for
each triplet (e1, R, e2). We can consider either just a classification accuracy result as to whether the
relation holds, or look at a ranking of e2, for considering relative confidence in particular relatio ns
holding. We use a different evaluation set from Bordes et al. [9] because it has became apparent to
us and them that there were issues of overlap between their training and testing sets which impacted
the quality and interpretability of their evaluation.
Ranking
For each triplet (e1, R, e2), we compute the score g(e1, R, e) for all other entities in the knowledge
base e ∈ E. We then sort values by decreasing order and report the rank of the correct entity e2.
For WordNet the total number of entities is|E| = 38,696. Some of the questions relating to triplets
are of the form “A is a type of ?” or “A has instance ?” Since thes e have multiple correct answers,
we report the percentage of times that e2 is ranked in the top 100 of the list (recall @ 100). The
higher this number, the more often the specific correct test entity has likely been correctly estimated.
After cross-validation of the hyperparameters of both mode ls on the development fold, our neural
tensor net obtains a ranking recall score of 20.9% while the similarity model achieves 10.6%, and the
Hadamard model achieves only 7.4%. The best performance of the NTN with random initialization
instead of the semantic vectors drops to 16.9% and the simila rity model and the Hadamard model
only achieve 5.7% and 7.1%.
Classification
In this experiment, we ask the model whether any arbitrary triplet of entities and relations is true or
not. With the help of the large vocabulary of semantic word ve ctors, we can query whether certain
WordNet relationships hold or not even for entities that were not originally in WordNet.
We use the development fold to find a thresholdTR for each relation such that if f(e1, R, e2) ≥ TR,
the relation (e1, R, e2) holds, otherwise it is considered false. In order to create n egative examples,
3
we randomly switch entities and relations from correct test ing triplets, resulting in a total of 2 ×
10,544 triplets. The final accuracy is based on how many of of triplets are classified correctly.
The Neural Tensor Network achieves an accuracy of 75.8% withsemantically initialized entity vec-
tors and 70.0% with randomly initialized ones. In compariso n, the similarity based model only
achieve 66.7% and 51.6%, the Hadamard model achieve 71.9% and 68.2% with the same setup. All
models improve in performance if entities are represented a s an average of their word vectors but
we will leave experimentation with this setup to future work.
5 Conclusion
We introduced a new model based on Neural Tensor Networks. Unlike previous models for predict-
ing relationships purely using entity representations in k nowledge bases, our model allows direct
interaction of entity vectors via a tensor. This architectu re allows for much better performance in
terms of both ranking correct answers out of tens of thousands of possible ones and predicting unseen
relationships between entities. It enables the extension o f databases even without external textual
resources but can also benefit from unsupervised large corpo ra even without manually designed
extraction rules.
References
[1] G.A. Miller. WordNet: A Lexical Database for English. Communications of the ACM, 1995.
[2] F. M. Suchanek, G. Kasneci, and G. Weikum. Yago: a core of semantic knowledge. In Proceedings of the
16th international conference on W orld Wide W eb, 2007.
[3] J. Graupmann, R. Schenkel, and G. Weikum. The SphereSear ch engine for unified ranked retrieval of
heterogeneous XML and web documents. In Proceedings of the 31st international conference on V ery
large data bases, VLDB, 2005.
[4] V . Ng and C. Cardie. Improving machine learning approaches to coreference resolution. In ACL, 2002.
[5] R. Snow, D. Jurafsky, and A. Y . Ng. Learning syntactic pat terns for automatic hypernym discovery. In
NIPS, 2005.
[6] A. Fader, S. Soderland, and O. Etzioni. Identifying rela tions for open information extraction. In EMNLP,
2011.
[7] J. Turian, L. Ratinov, and Y . Bengio. Word representatio ns: a simple and general method for semi-
supervised learning. In Proceedings of ACL, pages 384–394, 2010.
[8] A. Bordes, X. Glorot, J. Weston, and Y . Bengio. Joint Lear ning of Words and Meaning Representations
for Open-Text Semantic Parsing. AISTATS, 2012.
[9] A. Bordes, J. Weston, R. Collobert, and Y . Bengio. Learning structured embeddings of knowledge bases.
In AAAI, 2011.
[10] I. Sutskever, R. Salakhutdinov, and J. B. Tenenbaum. Mo delling relational data using Bayesian clustered
tensor factorization. In NIPS, 2009.
[11] R. Socher, B. Huval, C. D. Manning, and A. Y . Ng. Semantic Compositionality Through Recursive
Matrix-Vector Spaces. In EMNLP, 2012.
[12] M. Ranzato and A. Krizhevsky G. E. Hinton. Factored 3-Wa y Restricted Boltzmann Machines For Mod-
eling Natural Images. AISTATS, 2010.
[13] R. Collobert and J. Weston. A unified architecture for na tural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[14] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neur al probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improv ing Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
4
|
Danqi Chen, Richard Socher, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "msGKsXQXNiCBk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358425800000, "tmdate": 1358425800000, "ddate": null, "number": 67, "content": {"title": "Learning New Facts From Knowledge Bases With Neural Tensor Networks and\r\n Semantic Word Vectors", "decision": "conferencePoster-iclr2013-workshop", "abstract": "Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.", "pdf": "https://arxiv.org/abs/1301.3618", "paperhash": "chen|learning_new_facts_from_knowledge_bases_with_neural_tensor_networks_and_semantic_word_vectors", "keywords": [], "conflicts": [], "authors": ["Danqi Chen", "Richard Socher", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["danqi@stanford.edu", "richard@socher.org", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["danqi@stanford.edu"], "writers": []}
|
[Review]:
This paper proposes a new model for modeling data of multi-relational knowledge bases such as Wordnet or YAGO. Inspired by the work of (Bordes et al., AAAI11), they propose a neural network-based scoring function, which is trained to assign high score to plausible relations. Evaluation is performed on Wordnet.
The main differences w.r.t. (Bordes et al., AAAI11) is the scoring function, which now involves a tensor product to encode for the relation type and the use of a non-linearity. It would be interesting if the authors could comment the motivations of their architecture. For instance, what does the tanh could model here?
The experiments raise some questions:
- why do not also report the results on the original data set of (Bordes et al., AAAI11)? Even, is the data set contains duplicates, this stills makes a reference point.
- the classification task is hard to motivate. Link prediction is a problem of detection: very few positive to find in huge set of negative examples. Transform that into a balanced classification problem is a non-sense to me.
There have been several follow-up works to (Bordes et al., AAAI11) such as (Bordes et al., AISTATS12) or (Jenatton et al., NIPS12), that should be cited and discussed (some of those involve tensor for coding the relation type as well). Besides, they would also make the experimental comparison stronger.
It should be explained how the pre-trained word vectors trained by the model of Collobert & Weston are use in the model. Wordnet entities are senses and not words and, of course, there is no direct mapping from words to senses. Which heuristic has been used?
Pros:
- better experimental results
Cons:
- skinny experimental section
- lack of recent references
|
anonymous reviewer 7e51
| null | null |
{"id": "yA-tyFEFr2A5u", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362246000000, "tmdate": 1362246000000, "ddate": null, "number": 2, "content": {"title": "review of Learning New Facts From Knowledge Bases With Neural Tensor Networks and\r\n Semantic Word Vectors", "review": "This paper proposes a new model for modeling data of multi-relational knowledge bases such as Wordnet or YAGO. Inspired by the work of (Bordes et al., AAAI11), they propose a neural network-based scoring function, which is trained to assign high score to plausible relations. Evaluation is performed on Wordnet.\r\n\r\nThe main differences w.r.t. (Bordes et al., AAAI11) is the scoring function, which now involves a tensor product to encode for the relation type and the use of a non-linearity. It would be interesting if the authors could comment the motivations of their architecture. For instance, what does the tanh could model here?\r\n\r\nThe experiments raise some questions:\r\n- why do not also report the results on the original data set of (Bordes et al., AAAI11)? Even, is the data set contains duplicates, this stills makes a reference point.\r\n- the classification task is hard to motivate. Link prediction is a problem of detection: very few positive to find in huge set of negative examples. Transform that into a balanced classification problem is a non-sense to me.\r\n\r\nThere have been several follow-up works to (Bordes et al., AAAI11) such as (Bordes et al., AISTATS12) or (Jenatton et al., NIPS12), that should be cited and discussed (some of those involve tensor for coding the relation type as well). Besides, they would also make the experimental comparison stronger.\r\n\r\nIt should be explained how the pre-trained word vectors trained by the model of Collobert & Weston are use in the model. Wordnet entities are senses and not words and, of course, there is no direct mapping from words to senses. Which heuristic has been used?\r\n\r\nPros:\r\n- better experimental results\r\n\r\nCons:\r\n- skinny experimental section\r\n- lack of recent references"}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "msGKsXQXNiCBk", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 7e51"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 2,
"importance_and_relevance": 1,
"materials_and_methods": 14,
"praise": 0,
"presentation_and_reporting": 8,
"results_and_discussion": 5,
"suggestion_and_solution": 4,
"total": 18
}
| 2.111111
| 1.71655
| 0.394561
| 2.161251
| 0.494712
| 0.05014
| 0.222222
| 0.111111
| 0.055556
| 0.777778
| 0
| 0.444444
| 0.277778
| 0.222222
|
{
"criticism": 0.2222222222222222,
"example": 0.1111111111111111,
"importance_and_relevance": 0.05555555555555555,
"materials_and_methods": 0.7777777777777778,
"praise": 0,
"presentation_and_reporting": 0.4444444444444444,
"results_and_discussion": 0.2777777777777778,
"suggestion_and_solution": 0.2222222222222222
}
| 2.111111
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
msGKsXQXNiCBk
|
Learning New Facts From Knowledge Bases With Neural Tensor Networks and
Semantic Word Vectors
|
Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.
|
arXiv:1301.3618v2 [cs.CL] 16 Mar 2013
Learning New Facts From Knowledge Bases With
Neural T ensor Networks and Semantic W ord V ectors
Danqi Chen, Richard Socher , Christopher D. Manning, Andrew Y . Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
{danqi,manning,ang}@stanford.edu, richard@socher.org
Abstract
Knowledge bases provide applications with the benefit of eas ily accessible, sys-
tematic relational knowledge but often suffer in practice from their incompleteness
and lack of knowledge of new entities and relations. Much wor k has focused on
building or extending them by finding patterns in large unann otated text corpora.
In contrast, here we mainly aim to complete a knowledge base by predicting addi-
tional true relationships between entities, based on generalizations that can be dis-
cerned in the given knowledgebase. We introduce a neural tensor network (NTN)
model which predicts new relationship entries that can be ad ded to the database.
This model can be improved by initializing entity represent ations with word vec-
tors learned in an unsupervised fashion from text, and when d oing this, existing
relations can even be queried for entities that were not pres ent in the database.
Our model generalizes and outperforms existing models for this problem, and can
classify unseen relationships in WordNet with an accuracy of 75.8%.
1 Introduction
Ontologies and knowledge bases such as WordNet [1] or Yago [2 ] are extremely useful resources
for query expansion [3], coreference resolution [4], question answering (Siri), information retrieval
(Google Knowledge Graph), or generally providing inferenc e over structured knowledge to users.
Much work has focused on extending existing knowledge bases[5, 6, 2] using patterns or classifiers
applied to large corpora.
We introduce a model that can accurately learn to add additional facts to a database using only that
database. This is achieved by representing each entity (i.e., each object or individual) in the database
by a vector that can capture facts and their certainty about t hat entity. Each relation is defined by
the parameters of a novel neural tensor network which can explicitly relate two entity vectors and is
more powerful than a standard neural network layer.
Furthermore, our model allows us to ask whether even entitie s that were not in the database are
in certain relationships by simply using distributional wo rd vectors. These vectors are learned by a
neural network model [7] using unsupervised text corpora such as Wikipedia. They capture syntactic
and semantic information and allow us to extend the database without any manually designed rules
or additional parsing of other textual resources.
The model outperforms previously introduced related model s such as that of Bordes et al. [8]. We
evaluate on a heldout set of relationships in WordNet. The accuracy for predicting unseen relations
is 75.8%. We also evaluate in terms of ranking. For WordNet, t here are 38,696 different entities
and we use 11 relationship types. On average for each left ent ity there are 100 correct entities in a
specific relationship. For instance, dog has many hundreds of hyponyms such as puppy, barker or
dachshund. In 20.9% of the relationship triplets, the model ranks the c orrect test entity in the top
100 out of 38,696 possible entities.
1
2 Related W ork
There is a vast amount of work extending knowledge bases usin g external corpora [5, 6, 2], among
many others. In contrast, little work has been done in extens ions based purely on the knowledge
base itself. The work closest to ours is that by Bordes et al. [ 9]. We implement their approach and
compare to it directly. Our model outperforms it by a signific ant margin in terms of both accuracy
and ranking. Both models can benefit from initialization with unsupervised word vectors.
Another related approach is that by Sutskever et al. [10] who use tensor factorization and Bayesian
clustering for learning relational structures. Instead of clustering the entities in a nonparametric
Bayesian framework we rely purely on learned entity vectors . Their computation of the truth of a
relation can be seen as a special case of our proposed model. Instead of using MCMC for inference,
we use standard backpropagation which is modified for the Neu ral Tensor Network. Lastly, we do
not require multiple embeddings for each entity. Instead, we consider the subunits (space separated
words) of entity names. This allows more statistical strength to be shared among entities.
Many methods that use knowledge bases as features such as [3, 4] could benefit from a method
that maps the provided information into vector representat ions. We learn to modify unsupervised
word representations via grounding in world knowledge. This essentially allows us to analyze word
embeddings and query them for specific relations. Furthermo re, the resulting vectors could be used
in other tasks such as NER [7] or relation classification in natural language [11].
Lastly, Ranzato et al. [12] introduced a factored 3-way Restricted Boltzmann Machine which is also
parameterized by a tensor.
3 Neural T ensor Networks
In this section we describe the full neural tensor network. We begin by describing the representation
of entities and continue with the model that learns entity relationships.
We compare using both randomly initialized word vectors and pre-trained 100-dimensional word
vectors from the unsupervised model of Collobert and Weston [13, 7]. Using free Wikipedia text,
this model learns word vectors by predicting how likely it is for each word to occur in its context.
The model uses both local context in the window around each wo rd and global document context.
Similar to other local co-occurrence based vector space mod els, the resulting word vectors cap-
ture distributional syntactic and semantic information. F or further details and evaluations of these
embeddings, see [14, 13, 15].
For cases where the entity name has multiple words, we simply average the word vectors.
The Neural Tensor Network (NTN) replaces the standard linea r layer with a bilinear layer that di-
rectly relates the two entity vectors. Lete1, e2 ∈ Rd be the vector representations of the two entities.
We can compute a score of how plausible they are in a certain relationship R by the following NTN-
based function:
g(e1, R, e2) =UT f
(
eT
1 W [1:k]
R e2 + VR
[
e1
e2
]
+ bR
)
, (1)
where f = tanhis a standard nonlinearity. We define W [1:k] ∈ Rd× d× k as a tensor and the bilinear
tensor product results in a vector h ∈ Rk, where each entry is computed by one slice of the tensor:
hi = eT
1 W [i]e2. (2)
The remaining parameters for relation R are the standard form of a neural network: VR ∈ Rk× 2d
and U ∈ Rk, bR ∈ Rk.
The main advantage of this model is that it can directly relate the two inputs instead of only implicitly
through the nonlinearity. The bilinear model for truth valu es in [10] becomes a special case of this
model with VR = 0, bR = 0, k= 1, f= identity.
In order to train the parameters W, U, V, E, b, we minimize the following contrastive max-margin
objective:
J(W, U, V, E, b) =
N∑
i=1
C∑
c=1
max(0,1 − g(e(i)
1 , R(i), e(i)
2 ) +g(e(i)
1 , R(i), ec)), (3)
2
where N is the number of training triplets and we score the correct re lation triplets higher than a
corrupted one in which one of the entities was replaced with arandom entity. For each correct triplet
we sample C random corrupted entities.
The model is trained by taking gradients with respect to the fi ve sets of parameters and using mini-
batched L-BFGS.
4 Experiments
In our experiments, we follow the data settings of WordNet in [9]. There are a total of 38,696
different entities and 11 relations. We use 112,581 triplet s for training, 2,609 for the development
set and 10,544 for final testing.
The WordNet relationships we consider are has instance, type of, member meronym, member
holonym, part of, has part, subordinate instance of, domain region, synset domain region, similar
to, domain topic.
We compare our model with two models in Bordes et al. [9, 8], wh ich have the same goal as ours.
The model of [9] has the following scoring function:
g(e1, R, e2) =∥WR,lefte1 − WR,righte2∥1, (4)
where WR,left, WR,right ∈ Rd× d. The model of [8] also maps each relation type to an embedding
eR ∈ Rd and scores the relationships by:
g(e1, R, e2) =−(W1e1 ⊗ Wrel,1eR + b1) · (W2e2 ⊗ Wrel,2eR + b2), (5)
where W1, Wrel,1, W2, Wrel,2 ∈ Rd× d, b1, b2 ∈ Rd× 1. In the comparisons below, we call these
two models the similarity model and the Hadamard model respectively. While our function scores
correct triplets highly, these two models score correct tri plets lower. All models are trained in a
contrastive max-margin objective functions.
Our goal is to predict “correct” relations (e1, R, e2) in the testing data. We can compute a score for
each triplet (e1, R, e2). We can consider either just a classification accuracy result as to whether the
relation holds, or look at a ranking of e2, for considering relative confidence in particular relatio ns
holding. We use a different evaluation set from Bordes et al. [9] because it has became apparent to
us and them that there were issues of overlap between their training and testing sets which impacted
the quality and interpretability of their evaluation.
Ranking
For each triplet (e1, R, e2), we compute the score g(e1, R, e) for all other entities in the knowledge
base e ∈ E. We then sort values by decreasing order and report the rank of the correct entity e2.
For WordNet the total number of entities is|E| = 38,696. Some of the questions relating to triplets
are of the form “A is a type of ?” or “A has instance ?” Since thes e have multiple correct answers,
we report the percentage of times that e2 is ranked in the top 100 of the list (recall @ 100). The
higher this number, the more often the specific correct test entity has likely been correctly estimated.
After cross-validation of the hyperparameters of both mode ls on the development fold, our neural
tensor net obtains a ranking recall score of 20.9% while the similarity model achieves 10.6%, and the
Hadamard model achieves only 7.4%. The best performance of the NTN with random initialization
instead of the semantic vectors drops to 16.9% and the simila rity model and the Hadamard model
only achieve 5.7% and 7.1%.
Classification
In this experiment, we ask the model whether any arbitrary triplet of entities and relations is true or
not. With the help of the large vocabulary of semantic word ve ctors, we can query whether certain
WordNet relationships hold or not even for entities that were not originally in WordNet.
We use the development fold to find a thresholdTR for each relation such that if f(e1, R, e2) ≥ TR,
the relation (e1, R, e2) holds, otherwise it is considered false. In order to create n egative examples,
3
we randomly switch entities and relations from correct test ing triplets, resulting in a total of 2 ×
10,544 triplets. The final accuracy is based on how many of of triplets are classified correctly.
The Neural Tensor Network achieves an accuracy of 75.8% withsemantically initialized entity vec-
tors and 70.0% with randomly initialized ones. In compariso n, the similarity based model only
achieve 66.7% and 51.6%, the Hadamard model achieve 71.9% and 68.2% with the same setup. All
models improve in performance if entities are represented a s an average of their word vectors but
we will leave experimentation with this setup to future work.
5 Conclusion
We introduced a new model based on Neural Tensor Networks. Unlike previous models for predict-
ing relationships purely using entity representations in k nowledge bases, our model allows direct
interaction of entity vectors via a tensor. This architectu re allows for much better performance in
terms of both ranking correct answers out of tens of thousands of possible ones and predicting unseen
relationships between entities. It enables the extension o f databases even without external textual
resources but can also benefit from unsupervised large corpo ra even without manually designed
extraction rules.
References
[1] G.A. Miller. WordNet: A Lexical Database for English. Communications of the ACM, 1995.
[2] F. M. Suchanek, G. Kasneci, and G. Weikum. Yago: a core of semantic knowledge. In Proceedings of the
16th international conference on W orld Wide W eb, 2007.
[3] J. Graupmann, R. Schenkel, and G. Weikum. The SphereSear ch engine for unified ranked retrieval of
heterogeneous XML and web documents. In Proceedings of the 31st international conference on V ery
large data bases, VLDB, 2005.
[4] V . Ng and C. Cardie. Improving machine learning approaches to coreference resolution. In ACL, 2002.
[5] R. Snow, D. Jurafsky, and A. Y . Ng. Learning syntactic pat terns for automatic hypernym discovery. In
NIPS, 2005.
[6] A. Fader, S. Soderland, and O. Etzioni. Identifying rela tions for open information extraction. In EMNLP,
2011.
[7] J. Turian, L. Ratinov, and Y . Bengio. Word representatio ns: a simple and general method for semi-
supervised learning. In Proceedings of ACL, pages 384–394, 2010.
[8] A. Bordes, X. Glorot, J. Weston, and Y . Bengio. Joint Lear ning of Words and Meaning Representations
for Open-Text Semantic Parsing. AISTATS, 2012.
[9] A. Bordes, J. Weston, R. Collobert, and Y . Bengio. Learning structured embeddings of knowledge bases.
In AAAI, 2011.
[10] I. Sutskever, R. Salakhutdinov, and J. B. Tenenbaum. Mo delling relational data using Bayesian clustered
tensor factorization. In NIPS, 2009.
[11] R. Socher, B. Huval, C. D. Manning, and A. Y . Ng. Semantic Compositionality Through Recursive
Matrix-Vector Spaces. In EMNLP, 2012.
[12] M. Ranzato and A. Krizhevsky G. E. Hinton. Factored 3-Wa y Restricted Boltzmann Machines For Mod-
eling Natural Images. AISTATS, 2010.
[13] R. Collobert and J. Weston. A unified architecture for na tural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[14] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neur al probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improv ing Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
4
|
Danqi Chen, Richard Socher, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "msGKsXQXNiCBk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358425800000, "tmdate": 1358425800000, "ddate": null, "number": 67, "content": {"title": "Learning New Facts From Knowledge Bases With Neural Tensor Networks and\r\n Semantic Word Vectors", "decision": "conferencePoster-iclr2013-workshop", "abstract": "Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.", "pdf": "https://arxiv.org/abs/1301.3618", "paperhash": "chen|learning_new_facts_from_knowledge_bases_with_neural_tensor_networks_and_semantic_word_vectors", "keywords": [], "conflicts": [], "authors": ["Danqi Chen", "Richard Socher", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["danqi@stanford.edu", "richard@socher.org", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["danqi@stanford.edu"], "writers": []}
|
[Review]:
- A brief summary of the paper's contributions, in the context of prior work.
This paper proposes a new energy function (or scoring function) for ranking pairs of entities and their relationship type. The energy function is based on a so-called Neural Tensor Network, which essentially introduces a bilinear term in the computation of the hidden layer input activations of a single hidden layer neural network. A favorable comparison with the energy-function proposed in Bordes et al. 2011 is presented.
- An assessment of novelty and quality.
This work follows fairly closely the work of Border et al. 2011, with the main difference being the choice of the energy/scoring function. This is an advantage in terms of the interpretability of the results: this paper clearly demonstrates that the proposed energy function is better, since everything else (the training objective, the evaluation procedure) is the same. This is however a disadvantage in terms of novelty as this makes this work somewhat incremental.
Bordes et al. 2011 also proposed an improved version of their model, using kernel density estimation, which is not used here. However, I suppose that the proposed model in this paper could also be similarly improved.
More importantly, Bordes and collaborators have more recently looked at another type of energy function, in 'Joint Learning of Words and Meaning Representations for Open-Text Semantic Parsing' (AISTATS 2012), which also involves bilinear terms and is thus similar (but not the same) as the proposed energy function here. In fact, the Bordes et al. 2012 energy function seems to outperform the 2011 one (without KDE), hence I would argue that the former would have been a better baseline for comparisons.
- A list of pros and cons (reasons to accept/reject).
Pros: Clear demonstration of the superiority of the proposed energy function over that of Bordes et al. 2011.
Cons: No comparison with the more recent energy function of Bordes et al. 2012, which has some similarities to the proposed Neural Tensor Networks.
Since this was submitted to the workshop track, I would be inclined to have this paper accepted still. This is clearly work in progress (the submitted paper is only 4 pages long), and I think this line of work should be encouraged. However, I would suggest the authors also perform a comparison with the scoring function of Bordes et al. 2012 in future work, using their current protocol (which is nicely setup so as to thoroughly compare energy functions).
|
anonymous reviewer 75b8
| null | null |
{"id": "PnfD3BSBKbnZh", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362079260000, "tmdate": 1362079260000, "ddate": null, "number": 1, "content": {"title": "review of Learning New Facts From Knowledge Bases With Neural Tensor Networks and\r\n Semantic Word Vectors", "review": "- A brief summary of the paper's contributions, in the context of prior work.\r\n\r\nThis paper proposes a new energy function (or scoring function) for ranking pairs of entities and their relationship type. The energy function is based on a so-called Neural Tensor Network, which essentially introduces a bilinear term in the computation of the hidden layer input activations of a single hidden layer neural network. A favorable comparison with the energy-function proposed in Bordes et al. 2011 is presented.\r\n\r\n- An assessment of novelty and quality.\r\n\r\nThis work follows fairly closely the work of Border et al. 2011, with the main difference being the choice of the energy/scoring function. This is an advantage in terms of the interpretability of the results: this paper clearly demonstrates that the proposed energy function is better, since everything else (the training objective, the evaluation procedure) is the same. This is however a disadvantage in terms of novelty as this makes this work somewhat incremental.\r\n\r\nBordes et al. 2011 also proposed an improved version of their model, using kernel density estimation, which is not used here. However, I suppose that the proposed model in this paper could also be similarly improved.\r\n\r\nMore importantly, Bordes and collaborators have more recently looked at another type of energy function, in 'Joint Learning of Words and Meaning Representations for Open-Text Semantic Parsing' (AISTATS 2012), which also involves bilinear terms and is thus similar (but not the same) as the proposed energy function here. In fact, the Bordes et al. 2012 energy function seems to outperform the 2011 one (without KDE), hence I would argue that the former would have been a better baseline for comparisons.\r\n\r\n- A list of pros and cons (reasons to accept/reject).\r\n\r\nPros: Clear demonstration of the superiority of the proposed energy function over that of Bordes et al. 2011.\r\n\r\nCons: No comparison with the more recent energy function of Bordes et al. 2012, which has some similarities to the proposed Neural Tensor Networks.\r\n\r\nSince this was submitted to the workshop track, I would be inclined to have this paper accepted still. This is clearly work in progress (the submitted paper is only 4 pages long), and I think this line of work should be encouraged. However, I would suggest the authors also perform a comparison with the scoring function of Bordes et al. 2012 in future work, using their current protocol (which is nicely setup so as to thoroughly compare energy functions)."}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "msGKsXQXNiCBk", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 75b8"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 11,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 2,
"suggestion_and_solution": 6,
"total": 25
}
| 1
| -1.27267
| 2.27267
| 1.071736
| 0.675947
| 0.071736
| 0.04
| 0
| 0.08
| 0.44
| 0.08
| 0.04
| 0.08
| 0.24
|
{
"criticism": 0.04,
"example": 0,
"importance_and_relevance": 0.08,
"materials_and_methods": 0.44,
"praise": 0.08,
"presentation_and_reporting": 0.04,
"results_and_discussion": 0.08,
"suggestion_and_solution": 0.24
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
msGKsXQXNiCBk
|
Learning New Facts From Knowledge Bases With Neural Tensor Networks and
Semantic Word Vectors
|
Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.
|
arXiv:1301.3618v2 [cs.CL] 16 Mar 2013
Learning New Facts From Knowledge Bases With
Neural T ensor Networks and Semantic W ord V ectors
Danqi Chen, Richard Socher , Christopher D. Manning, Andrew Y . Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
{danqi,manning,ang}@stanford.edu, richard@socher.org
Abstract
Knowledge bases provide applications with the benefit of eas ily accessible, sys-
tematic relational knowledge but often suffer in practice from their incompleteness
and lack of knowledge of new entities and relations. Much wor k has focused on
building or extending them by finding patterns in large unann otated text corpora.
In contrast, here we mainly aim to complete a knowledge base by predicting addi-
tional true relationships between entities, based on generalizations that can be dis-
cerned in the given knowledgebase. We introduce a neural tensor network (NTN)
model which predicts new relationship entries that can be ad ded to the database.
This model can be improved by initializing entity represent ations with word vec-
tors learned in an unsupervised fashion from text, and when d oing this, existing
relations can even be queried for entities that were not pres ent in the database.
Our model generalizes and outperforms existing models for this problem, and can
classify unseen relationships in WordNet with an accuracy of 75.8%.
1 Introduction
Ontologies and knowledge bases such as WordNet [1] or Yago [2 ] are extremely useful resources
for query expansion [3], coreference resolution [4], question answering (Siri), information retrieval
(Google Knowledge Graph), or generally providing inferenc e over structured knowledge to users.
Much work has focused on extending existing knowledge bases[5, 6, 2] using patterns or classifiers
applied to large corpora.
We introduce a model that can accurately learn to add additional facts to a database using only that
database. This is achieved by representing each entity (i.e., each object or individual) in the database
by a vector that can capture facts and their certainty about t hat entity. Each relation is defined by
the parameters of a novel neural tensor network which can explicitly relate two entity vectors and is
more powerful than a standard neural network layer.
Furthermore, our model allows us to ask whether even entitie s that were not in the database are
in certain relationships by simply using distributional wo rd vectors. These vectors are learned by a
neural network model [7] using unsupervised text corpora such as Wikipedia. They capture syntactic
and semantic information and allow us to extend the database without any manually designed rules
or additional parsing of other textual resources.
The model outperforms previously introduced related model s such as that of Bordes et al. [8]. We
evaluate on a heldout set of relationships in WordNet. The accuracy for predicting unseen relations
is 75.8%. We also evaluate in terms of ranking. For WordNet, t here are 38,696 different entities
and we use 11 relationship types. On average for each left ent ity there are 100 correct entities in a
specific relationship. For instance, dog has many hundreds of hyponyms such as puppy, barker or
dachshund. In 20.9% of the relationship triplets, the model ranks the c orrect test entity in the top
100 out of 38,696 possible entities.
1
2 Related W ork
There is a vast amount of work extending knowledge bases usin g external corpora [5, 6, 2], among
many others. In contrast, little work has been done in extens ions based purely on the knowledge
base itself. The work closest to ours is that by Bordes et al. [ 9]. We implement their approach and
compare to it directly. Our model outperforms it by a signific ant margin in terms of both accuracy
and ranking. Both models can benefit from initialization with unsupervised word vectors.
Another related approach is that by Sutskever et al. [10] who use tensor factorization and Bayesian
clustering for learning relational structures. Instead of clustering the entities in a nonparametric
Bayesian framework we rely purely on learned entity vectors . Their computation of the truth of a
relation can be seen as a special case of our proposed model. Instead of using MCMC for inference,
we use standard backpropagation which is modified for the Neu ral Tensor Network. Lastly, we do
not require multiple embeddings for each entity. Instead, we consider the subunits (space separated
words) of entity names. This allows more statistical strength to be shared among entities.
Many methods that use knowledge bases as features such as [3, 4] could benefit from a method
that maps the provided information into vector representat ions. We learn to modify unsupervised
word representations via grounding in world knowledge. This essentially allows us to analyze word
embeddings and query them for specific relations. Furthermo re, the resulting vectors could be used
in other tasks such as NER [7] or relation classification in natural language [11].
Lastly, Ranzato et al. [12] introduced a factored 3-way Restricted Boltzmann Machine which is also
parameterized by a tensor.
3 Neural T ensor Networks
In this section we describe the full neural tensor network. We begin by describing the representation
of entities and continue with the model that learns entity relationships.
We compare using both randomly initialized word vectors and pre-trained 100-dimensional word
vectors from the unsupervised model of Collobert and Weston [13, 7]. Using free Wikipedia text,
this model learns word vectors by predicting how likely it is for each word to occur in its context.
The model uses both local context in the window around each wo rd and global document context.
Similar to other local co-occurrence based vector space mod els, the resulting word vectors cap-
ture distributional syntactic and semantic information. F or further details and evaluations of these
embeddings, see [14, 13, 15].
For cases where the entity name has multiple words, we simply average the word vectors.
The Neural Tensor Network (NTN) replaces the standard linea r layer with a bilinear layer that di-
rectly relates the two entity vectors. Lete1, e2 ∈ Rd be the vector representations of the two entities.
We can compute a score of how plausible they are in a certain relationship R by the following NTN-
based function:
g(e1, R, e2) =UT f
(
eT
1 W [1:k]
R e2 + VR
[
e1
e2
]
+ bR
)
, (1)
where f = tanhis a standard nonlinearity. We define W [1:k] ∈ Rd× d× k as a tensor and the bilinear
tensor product results in a vector h ∈ Rk, where each entry is computed by one slice of the tensor:
hi = eT
1 W [i]e2. (2)
The remaining parameters for relation R are the standard form of a neural network: VR ∈ Rk× 2d
and U ∈ Rk, bR ∈ Rk.
The main advantage of this model is that it can directly relate the two inputs instead of only implicitly
through the nonlinearity. The bilinear model for truth valu es in [10] becomes a special case of this
model with VR = 0, bR = 0, k= 1, f= identity.
In order to train the parameters W, U, V, E, b, we minimize the following contrastive max-margin
objective:
J(W, U, V, E, b) =
N∑
i=1
C∑
c=1
max(0,1 − g(e(i)
1 , R(i), e(i)
2 ) +g(e(i)
1 , R(i), ec)), (3)
2
where N is the number of training triplets and we score the correct re lation triplets higher than a
corrupted one in which one of the entities was replaced with arandom entity. For each correct triplet
we sample C random corrupted entities.
The model is trained by taking gradients with respect to the fi ve sets of parameters and using mini-
batched L-BFGS.
4 Experiments
In our experiments, we follow the data settings of WordNet in [9]. There are a total of 38,696
different entities and 11 relations. We use 112,581 triplet s for training, 2,609 for the development
set and 10,544 for final testing.
The WordNet relationships we consider are has instance, type of, member meronym, member
holonym, part of, has part, subordinate instance of, domain region, synset domain region, similar
to, domain topic.
We compare our model with two models in Bordes et al. [9, 8], wh ich have the same goal as ours.
The model of [9] has the following scoring function:
g(e1, R, e2) =∥WR,lefte1 − WR,righte2∥1, (4)
where WR,left, WR,right ∈ Rd× d. The model of [8] also maps each relation type to an embedding
eR ∈ Rd and scores the relationships by:
g(e1, R, e2) =−(W1e1 ⊗ Wrel,1eR + b1) · (W2e2 ⊗ Wrel,2eR + b2), (5)
where W1, Wrel,1, W2, Wrel,2 ∈ Rd× d, b1, b2 ∈ Rd× 1. In the comparisons below, we call these
two models the similarity model and the Hadamard model respectively. While our function scores
correct triplets highly, these two models score correct tri plets lower. All models are trained in a
contrastive max-margin objective functions.
Our goal is to predict “correct” relations (e1, R, e2) in the testing data. We can compute a score for
each triplet (e1, R, e2). We can consider either just a classification accuracy result as to whether the
relation holds, or look at a ranking of e2, for considering relative confidence in particular relatio ns
holding. We use a different evaluation set from Bordes et al. [9] because it has became apparent to
us and them that there were issues of overlap between their training and testing sets which impacted
the quality and interpretability of their evaluation.
Ranking
For each triplet (e1, R, e2), we compute the score g(e1, R, e) for all other entities in the knowledge
base e ∈ E. We then sort values by decreasing order and report the rank of the correct entity e2.
For WordNet the total number of entities is|E| = 38,696. Some of the questions relating to triplets
are of the form “A is a type of ?” or “A has instance ?” Since thes e have multiple correct answers,
we report the percentage of times that e2 is ranked in the top 100 of the list (recall @ 100). The
higher this number, the more often the specific correct test entity has likely been correctly estimated.
After cross-validation of the hyperparameters of both mode ls on the development fold, our neural
tensor net obtains a ranking recall score of 20.9% while the similarity model achieves 10.6%, and the
Hadamard model achieves only 7.4%. The best performance of the NTN with random initialization
instead of the semantic vectors drops to 16.9% and the simila rity model and the Hadamard model
only achieve 5.7% and 7.1%.
Classification
In this experiment, we ask the model whether any arbitrary triplet of entities and relations is true or
not. With the help of the large vocabulary of semantic word ve ctors, we can query whether certain
WordNet relationships hold or not even for entities that were not originally in WordNet.
We use the development fold to find a thresholdTR for each relation such that if f(e1, R, e2) ≥ TR,
the relation (e1, R, e2) holds, otherwise it is considered false. In order to create n egative examples,
3
we randomly switch entities and relations from correct test ing triplets, resulting in a total of 2 ×
10,544 triplets. The final accuracy is based on how many of of triplets are classified correctly.
The Neural Tensor Network achieves an accuracy of 75.8% withsemantically initialized entity vec-
tors and 70.0% with randomly initialized ones. In compariso n, the similarity based model only
achieve 66.7% and 51.6%, the Hadamard model achieve 71.9% and 68.2% with the same setup. All
models improve in performance if entities are represented a s an average of their word vectors but
we will leave experimentation with this setup to future work.
5 Conclusion
We introduced a new model based on Neural Tensor Networks. Unlike previous models for predict-
ing relationships purely using entity representations in k nowledge bases, our model allows direct
interaction of entity vectors via a tensor. This architectu re allows for much better performance in
terms of both ranking correct answers out of tens of thousands of possible ones and predicting unseen
relationships between entities. It enables the extension o f databases even without external textual
resources but can also benefit from unsupervised large corpo ra even without manually designed
extraction rules.
References
[1] G.A. Miller. WordNet: A Lexical Database for English. Communications of the ACM, 1995.
[2] F. M. Suchanek, G. Kasneci, and G. Weikum. Yago: a core of semantic knowledge. In Proceedings of the
16th international conference on W orld Wide W eb, 2007.
[3] J. Graupmann, R. Schenkel, and G. Weikum. The SphereSear ch engine for unified ranked retrieval of
heterogeneous XML and web documents. In Proceedings of the 31st international conference on V ery
large data bases, VLDB, 2005.
[4] V . Ng and C. Cardie. Improving machine learning approaches to coreference resolution. In ACL, 2002.
[5] R. Snow, D. Jurafsky, and A. Y . Ng. Learning syntactic pat terns for automatic hypernym discovery. In
NIPS, 2005.
[6] A. Fader, S. Soderland, and O. Etzioni. Identifying rela tions for open information extraction. In EMNLP,
2011.
[7] J. Turian, L. Ratinov, and Y . Bengio. Word representatio ns: a simple and general method for semi-
supervised learning. In Proceedings of ACL, pages 384–394, 2010.
[8] A. Bordes, X. Glorot, J. Weston, and Y . Bengio. Joint Lear ning of Words and Meaning Representations
for Open-Text Semantic Parsing. AISTATS, 2012.
[9] A. Bordes, J. Weston, R. Collobert, and Y . Bengio. Learning structured embeddings of knowledge bases.
In AAAI, 2011.
[10] I. Sutskever, R. Salakhutdinov, and J. B. Tenenbaum. Mo delling relational data using Bayesian clustered
tensor factorization. In NIPS, 2009.
[11] R. Socher, B. Huval, C. D. Manning, and A. Y . Ng. Semantic Compositionality Through Recursive
Matrix-Vector Spaces. In EMNLP, 2012.
[12] M. Ranzato and A. Krizhevsky G. E. Hinton. Factored 3-Wa y Restricted Boltzmann Machines For Mod-
eling Natural Images. AISTATS, 2010.
[13] R. Collobert and J. Weston. A unified architecture for na tural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[14] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neur al probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improv ing Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
4
|
Danqi Chen, Richard Socher, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "msGKsXQXNiCBk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358425800000, "tmdate": 1358425800000, "ddate": null, "number": 67, "content": {"title": "Learning New Facts From Knowledge Bases With Neural Tensor Networks and\r\n Semantic Word Vectors", "decision": "conferencePoster-iclr2013-workshop", "abstract": "Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.", "pdf": "https://arxiv.org/abs/1301.3618", "paperhash": "chen|learning_new_facts_from_knowledge_bases_with_neural_tensor_networks_and_semantic_word_vectors", "keywords": [], "conflicts": [], "authors": ["Danqi Chen", "Richard Socher", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["danqi@stanford.edu", "richard@socher.org", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["danqi@stanford.edu"], "writers": []}
|
[Review]:
We thank the reviewers for their comments and agree with most of them.
- We've updated our paper on arxiv, and added the important experimental comparison to the model in 'Joint Learning of Words and Meaning Representations for Open-Text Semantic Parsing' (AISTATS 2012).
Experimental results show that our model also outperforms this model in terms of ranking & classification.
- We didn't report the results on the original data because of the issues of overlap between training and testing set.
80.23% of the examples in the testing set appear exactly in the training set.
99.23% of the examples have e1 and e2 'connected' via some relation in the training set. Some relationships such as 'is similar to' are symmetric.
Furthermore, we can reach 92.8% of top 10 accuracy (instead of 76.7% in the original paper) using their model.
- The classification task can help us predict whether a relationship is correct or not, thus we report both the results of classification and ranking.
- To use the pre-trained word vectors, we ignore the senses of the entities in Wordnet in this paper.
- The experiments section is short because we tried to keep the paper's length close to the recommended length. From the ICLR website: 'Papers submitted to this track are ideally 2-3 pages long'.
|
Danqi Chen, Richard Socher, Christopher D. Manning, Andrew Y. Ng
| null | null |
{"id": "OgesTW8qZ5TWn", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363419120000, "tmdate": 1363419120000, "ddate": null, "number": 3, "content": {"title": "", "review": "We thank the reviewers for their comments and agree with most of them.\r\n\r\n- We've updated our paper on arxiv, and added the important experimental comparison to the model in 'Joint Learning of Words and Meaning Representations for Open-Text Semantic Parsing' (AISTATS 2012). \r\n Experimental results show that our model also outperforms this model in terms of ranking & classification.\r\n\r\n- We didn't report the results on the original data because of the issues of overlap between training and testing set. \r\n 80.23% of the examples in the testing set appear exactly in the training set.\r\n 99.23% of the examples have e1 and e2 'connected' via some relation in the training set. Some relationships such as 'is similar to' are symmetric. \r\n Furthermore, we can reach 92.8% of top 10 accuracy (instead of 76.7% in the original paper) using their model.\r\n\r\n- The classification task can help us predict whether a relationship is correct or not, thus we report both the results of classification and ranking. \r\n\r\n- To use the pre-trained word vectors, we ignore the senses of the entities in Wordnet in this paper. \r\n\r\n- The experiments section is short because we tried to keep the paper's length close to the recommended length. From the ICLR website: 'Papers submitted to this track are ideally 2-3 pages long'."}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "msGKsXQXNiCBk", "readers": ["everyone"], "nonreaders": [], "signatures": ["Danqi Chen, Richard Socher, Christopher D. Manning, Andrew Y. Ng"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 1,
"importance_and_relevance": 1,
"materials_and_methods": 8,
"praise": 2,
"presentation_and_reporting": 4,
"results_and_discussion": 3,
"suggestion_and_solution": 0,
"total": 12
}
| 1.666667
| 1.650884
| 0.015782
| 1.703793
| 0.346886
| 0.037126
| 0.083333
| 0.083333
| 0.083333
| 0.666667
| 0.166667
| 0.333333
| 0.25
| 0
|
{
"criticism": 0.08333333333333333,
"example": 0.08333333333333333,
"importance_and_relevance": 0.08333333333333333,
"materials_and_methods": 0.6666666666666666,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0.3333333333333333,
"results_and_discussion": 0.25,
"suggestion_and_solution": 0
}
| 1.666667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
msGKsXQXNiCBk
|
Learning New Facts From Knowledge Bases With Neural Tensor Networks and
Semantic Word Vectors
|
Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.
|
arXiv:1301.3618v2 [cs.CL] 16 Mar 2013
Learning New Facts From Knowledge Bases With
Neural T ensor Networks and Semantic W ord V ectors
Danqi Chen, Richard Socher , Christopher D. Manning, Andrew Y . Ng
Computer Science Department, Stanford University, Stanford, CA 94305, USA
{danqi,manning,ang}@stanford.edu, richard@socher.org
Abstract
Knowledge bases provide applications with the benefit of eas ily accessible, sys-
tematic relational knowledge but often suffer in practice from their incompleteness
and lack of knowledge of new entities and relations. Much wor k has focused on
building or extending them by finding patterns in large unann otated text corpora.
In contrast, here we mainly aim to complete a knowledge base by predicting addi-
tional true relationships between entities, based on generalizations that can be dis-
cerned in the given knowledgebase. We introduce a neural tensor network (NTN)
model which predicts new relationship entries that can be ad ded to the database.
This model can be improved by initializing entity represent ations with word vec-
tors learned in an unsupervised fashion from text, and when d oing this, existing
relations can even be queried for entities that were not pres ent in the database.
Our model generalizes and outperforms existing models for this problem, and can
classify unseen relationships in WordNet with an accuracy of 75.8%.
1 Introduction
Ontologies and knowledge bases such as WordNet [1] or Yago [2 ] are extremely useful resources
for query expansion [3], coreference resolution [4], question answering (Siri), information retrieval
(Google Knowledge Graph), or generally providing inferenc e over structured knowledge to users.
Much work has focused on extending existing knowledge bases[5, 6, 2] using patterns or classifiers
applied to large corpora.
We introduce a model that can accurately learn to add additional facts to a database using only that
database. This is achieved by representing each entity (i.e., each object or individual) in the database
by a vector that can capture facts and their certainty about t hat entity. Each relation is defined by
the parameters of a novel neural tensor network which can explicitly relate two entity vectors and is
more powerful than a standard neural network layer.
Furthermore, our model allows us to ask whether even entitie s that were not in the database are
in certain relationships by simply using distributional wo rd vectors. These vectors are learned by a
neural network model [7] using unsupervised text corpora such as Wikipedia. They capture syntactic
and semantic information and allow us to extend the database without any manually designed rules
or additional parsing of other textual resources.
The model outperforms previously introduced related model s such as that of Bordes et al. [8]. We
evaluate on a heldout set of relationships in WordNet. The accuracy for predicting unseen relations
is 75.8%. We also evaluate in terms of ranking. For WordNet, t here are 38,696 different entities
and we use 11 relationship types. On average for each left ent ity there are 100 correct entities in a
specific relationship. For instance, dog has many hundreds of hyponyms such as puppy, barker or
dachshund. In 20.9% of the relationship triplets, the model ranks the c orrect test entity in the top
100 out of 38,696 possible entities.
1
2 Related W ork
There is a vast amount of work extending knowledge bases usin g external corpora [5, 6, 2], among
many others. In contrast, little work has been done in extens ions based purely on the knowledge
base itself. The work closest to ours is that by Bordes et al. [ 9]. We implement their approach and
compare to it directly. Our model outperforms it by a signific ant margin in terms of both accuracy
and ranking. Both models can benefit from initialization with unsupervised word vectors.
Another related approach is that by Sutskever et al. [10] who use tensor factorization and Bayesian
clustering for learning relational structures. Instead of clustering the entities in a nonparametric
Bayesian framework we rely purely on learned entity vectors . Their computation of the truth of a
relation can be seen as a special case of our proposed model. Instead of using MCMC for inference,
we use standard backpropagation which is modified for the Neu ral Tensor Network. Lastly, we do
not require multiple embeddings for each entity. Instead, we consider the subunits (space separated
words) of entity names. This allows more statistical strength to be shared among entities.
Many methods that use knowledge bases as features such as [3, 4] could benefit from a method
that maps the provided information into vector representat ions. We learn to modify unsupervised
word representations via grounding in world knowledge. This essentially allows us to analyze word
embeddings and query them for specific relations. Furthermo re, the resulting vectors could be used
in other tasks such as NER [7] or relation classification in natural language [11].
Lastly, Ranzato et al. [12] introduced a factored 3-way Restricted Boltzmann Machine which is also
parameterized by a tensor.
3 Neural T ensor Networks
In this section we describe the full neural tensor network. We begin by describing the representation
of entities and continue with the model that learns entity relationships.
We compare using both randomly initialized word vectors and pre-trained 100-dimensional word
vectors from the unsupervised model of Collobert and Weston [13, 7]. Using free Wikipedia text,
this model learns word vectors by predicting how likely it is for each word to occur in its context.
The model uses both local context in the window around each wo rd and global document context.
Similar to other local co-occurrence based vector space mod els, the resulting word vectors cap-
ture distributional syntactic and semantic information. F or further details and evaluations of these
embeddings, see [14, 13, 15].
For cases where the entity name has multiple words, we simply average the word vectors.
The Neural Tensor Network (NTN) replaces the standard linea r layer with a bilinear layer that di-
rectly relates the two entity vectors. Lete1, e2 ∈ Rd be the vector representations of the two entities.
We can compute a score of how plausible they are in a certain relationship R by the following NTN-
based function:
g(e1, R, e2) =UT f
(
eT
1 W [1:k]
R e2 + VR
[
e1
e2
]
+ bR
)
, (1)
where f = tanhis a standard nonlinearity. We define W [1:k] ∈ Rd× d× k as a tensor and the bilinear
tensor product results in a vector h ∈ Rk, where each entry is computed by one slice of the tensor:
hi = eT
1 W [i]e2. (2)
The remaining parameters for relation R are the standard form of a neural network: VR ∈ Rk× 2d
and U ∈ Rk, bR ∈ Rk.
The main advantage of this model is that it can directly relate the two inputs instead of only implicitly
through the nonlinearity. The bilinear model for truth valu es in [10] becomes a special case of this
model with VR = 0, bR = 0, k= 1, f= identity.
In order to train the parameters W, U, V, E, b, we minimize the following contrastive max-margin
objective:
J(W, U, V, E, b) =
N∑
i=1
C∑
c=1
max(0,1 − g(e(i)
1 , R(i), e(i)
2 ) +g(e(i)
1 , R(i), ec)), (3)
2
where N is the number of training triplets and we score the correct re lation triplets higher than a
corrupted one in which one of the entities was replaced with arandom entity. For each correct triplet
we sample C random corrupted entities.
The model is trained by taking gradients with respect to the fi ve sets of parameters and using mini-
batched L-BFGS.
4 Experiments
In our experiments, we follow the data settings of WordNet in [9]. There are a total of 38,696
different entities and 11 relations. We use 112,581 triplet s for training, 2,609 for the development
set and 10,544 for final testing.
The WordNet relationships we consider are has instance, type of, member meronym, member
holonym, part of, has part, subordinate instance of, domain region, synset domain region, similar
to, domain topic.
We compare our model with two models in Bordes et al. [9, 8], wh ich have the same goal as ours.
The model of [9] has the following scoring function:
g(e1, R, e2) =∥WR,lefte1 − WR,righte2∥1, (4)
where WR,left, WR,right ∈ Rd× d. The model of [8] also maps each relation type to an embedding
eR ∈ Rd and scores the relationships by:
g(e1, R, e2) =−(W1e1 ⊗ Wrel,1eR + b1) · (W2e2 ⊗ Wrel,2eR + b2), (5)
where W1, Wrel,1, W2, Wrel,2 ∈ Rd× d, b1, b2 ∈ Rd× 1. In the comparisons below, we call these
two models the similarity model and the Hadamard model respectively. While our function scores
correct triplets highly, these two models score correct tri plets lower. All models are trained in a
contrastive max-margin objective functions.
Our goal is to predict “correct” relations (e1, R, e2) in the testing data. We can compute a score for
each triplet (e1, R, e2). We can consider either just a classification accuracy result as to whether the
relation holds, or look at a ranking of e2, for considering relative confidence in particular relatio ns
holding. We use a different evaluation set from Bordes et al. [9] because it has became apparent to
us and them that there were issues of overlap between their training and testing sets which impacted
the quality and interpretability of their evaluation.
Ranking
For each triplet (e1, R, e2), we compute the score g(e1, R, e) for all other entities in the knowledge
base e ∈ E. We then sort values by decreasing order and report the rank of the correct entity e2.
For WordNet the total number of entities is|E| = 38,696. Some of the questions relating to triplets
are of the form “A is a type of ?” or “A has instance ?” Since thes e have multiple correct answers,
we report the percentage of times that e2 is ranked in the top 100 of the list (recall @ 100). The
higher this number, the more often the specific correct test entity has likely been correctly estimated.
After cross-validation of the hyperparameters of both mode ls on the development fold, our neural
tensor net obtains a ranking recall score of 20.9% while the similarity model achieves 10.6%, and the
Hadamard model achieves only 7.4%. The best performance of the NTN with random initialization
instead of the semantic vectors drops to 16.9% and the simila rity model and the Hadamard model
only achieve 5.7% and 7.1%.
Classification
In this experiment, we ask the model whether any arbitrary triplet of entities and relations is true or
not. With the help of the large vocabulary of semantic word ve ctors, we can query whether certain
WordNet relationships hold or not even for entities that were not originally in WordNet.
We use the development fold to find a thresholdTR for each relation such that if f(e1, R, e2) ≥ TR,
the relation (e1, R, e2) holds, otherwise it is considered false. In order to create n egative examples,
3
we randomly switch entities and relations from correct test ing triplets, resulting in a total of 2 ×
10,544 triplets. The final accuracy is based on how many of of triplets are classified correctly.
The Neural Tensor Network achieves an accuracy of 75.8% withsemantically initialized entity vec-
tors and 70.0% with randomly initialized ones. In compariso n, the similarity based model only
achieve 66.7% and 51.6%, the Hadamard model achieve 71.9% and 68.2% with the same setup. All
models improve in performance if entities are represented a s an average of their word vectors but
we will leave experimentation with this setup to future work.
5 Conclusion
We introduced a new model based on Neural Tensor Networks. Unlike previous models for predict-
ing relationships purely using entity representations in k nowledge bases, our model allows direct
interaction of entity vectors via a tensor. This architectu re allows for much better performance in
terms of both ranking correct answers out of tens of thousands of possible ones and predicting unseen
relationships between entities. It enables the extension o f databases even without external textual
resources but can also benefit from unsupervised large corpo ra even without manually designed
extraction rules.
References
[1] G.A. Miller. WordNet: A Lexical Database for English. Communications of the ACM, 1995.
[2] F. M. Suchanek, G. Kasneci, and G. Weikum. Yago: a core of semantic knowledge. In Proceedings of the
16th international conference on W orld Wide W eb, 2007.
[3] J. Graupmann, R. Schenkel, and G. Weikum. The SphereSear ch engine for unified ranked retrieval of
heterogeneous XML and web documents. In Proceedings of the 31st international conference on V ery
large data bases, VLDB, 2005.
[4] V . Ng and C. Cardie. Improving machine learning approaches to coreference resolution. In ACL, 2002.
[5] R. Snow, D. Jurafsky, and A. Y . Ng. Learning syntactic pat terns for automatic hypernym discovery. In
NIPS, 2005.
[6] A. Fader, S. Soderland, and O. Etzioni. Identifying rela tions for open information extraction. In EMNLP,
2011.
[7] J. Turian, L. Ratinov, and Y . Bengio. Word representatio ns: a simple and general method for semi-
supervised learning. In Proceedings of ACL, pages 384–394, 2010.
[8] A. Bordes, X. Glorot, J. Weston, and Y . Bengio. Joint Lear ning of Words and Meaning Representations
for Open-Text Semantic Parsing. AISTATS, 2012.
[9] A. Bordes, J. Weston, R. Collobert, and Y . Bengio. Learning structured embeddings of knowledge bases.
In AAAI, 2011.
[10] I. Sutskever, R. Salakhutdinov, and J. B. Tenenbaum. Mo delling relational data using Bayesian clustered
tensor factorization. In NIPS, 2009.
[11] R. Socher, B. Huval, C. D. Manning, and A. Y . Ng. Semantic Compositionality Through Recursive
Matrix-Vector Spaces. In EMNLP, 2012.
[12] M. Ranzato and A. Krizhevsky G. E. Hinton. Factored 3-Wa y Restricted Boltzmann Machines For Mod-
eling Natural Images. AISTATS, 2010.
[13] R. Collobert and J. Weston. A unified architecture for na tural language processing: deep neural networks
with multitask learning. In ICML, 2008.
[14] Y . Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neur al probabilistic language model. J. Mach.
Learn. Res., 3, March 2003.
[15] E. H. Huang, R. Socher, C. D. Manning, and A. Y . Ng. Improv ing Word Representations via Global
Context and Multiple Word Prototypes. In ACL, 2012.
4
|
Danqi Chen, Richard Socher, Christopher Manning, Andrew Y. Ng
|
Unknown
| 2,013
|
{"id": "msGKsXQXNiCBk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358425800000, "tmdate": 1358425800000, "ddate": null, "number": 67, "content": {"title": "Learning New Facts From Knowledge Bases With Neural Tensor Networks and\r\n Semantic Word Vectors", "decision": "conferencePoster-iclr2013-workshop", "abstract": "Knowledge bases provide applications with the benefit of easily accessible, systematic relational knowledge but often suffer in practice from their incompleteness and lack of knowledge of new entities and relations. Much work has focused on building or extending them by finding patterns in large unannotated text corpora. In contrast, here we mainly aim to complete a knowledge base by predicting additional true relationships between entities, based on generalizations that can be discerned in the given knowledgebase. We introduce a neural tensor network (NTN) model which predicts new relationship entries that can be added to the database. This model can be improved by initializing entity representations with word vectors learned in an unsupervised fashion from text, and when doing this, existing relations can even be queried for entities that were not present in the database. Our model generalizes and outperforms existing models for this problem, and can classify unseen relationships in WordNet with an accuracy of 82.8%.", "pdf": "https://arxiv.org/abs/1301.3618", "paperhash": "chen|learning_new_facts_from_knowledge_bases_with_neural_tensor_networks_and_semantic_word_vectors", "keywords": [], "conflicts": [], "authors": ["Danqi Chen", "Richard Socher", "Christopher Manning", "Andrew Y. Ng"], "authorids": ["danqi@stanford.edu", "richard@socher.org", "manning@stanford.edu", "ang@stanford.edu"]}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["danqi@stanford.edu"], "writers": []}
|
[Review]:
We thank the reviewers for their comments and agree with most of them.
- We've updated our paper on arxiv, and added the important experimental comparison to the model in 'Joint Learning of Words and Meaning Representations for Open-Text Semantic Parsing' (AISTATS 2012).
Experimental results show that our model also outperforms this model in terms of ranking & classification.
- We didn't report the results on the original data because of the issues of overlap between training and testing set.
80.23% of the examples in the testing set appear exactly in the training set.
99.23% of the examples have e1 and e2 'connected' via some relation in the training set. Some relationships such as 'is similar to' are symmetric.
Furthermore, we can reach 92.8% of top 10 accuracy (instead of 76.7% in the original paper) using their model.
- The classification task can help us predict whether a relationship is correct or not, thus we report both the results of classification and ranking.
- To use the pre-trained word vectors, we ignore the senses of the entities in Wordnet in this paper.
- The experiments section is short because we tried to keep the paper's length close to the recommended length. From the ICLR website: 'Papers submitted to this track are ideally 2-3 pages long'.
|
Danqi Chen, Richard Socher, Christopher D. Manning, Andrew Y. Ng
| null | null |
{"id": "7jyp7wrwSzagb", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363419120000, "tmdate": 1363419120000, "ddate": null, "number": 4, "content": {"title": "", "review": "We thank the reviewers for their comments and agree with most of them.\r\n\r\n- We've updated our paper on arxiv, and added the important experimental comparison to the model in 'Joint Learning of Words and Meaning Representations for Open-Text Semantic Parsing' (AISTATS 2012). \r\n Experimental results show that our model also outperforms this model in terms of ranking & classification.\r\n\r\n- We didn't report the results on the original data because of the issues of overlap between training and testing set. \r\n 80.23% of the examples in the testing set appear exactly in the training set.\r\n 99.23% of the examples have e1 and e2 'connected' via some relation in the training set. Some relationships such as 'is similar to' are symmetric. \r\n Furthermore, we can reach 92.8% of top 10 accuracy (instead of 76.7% in the original paper) using their model.\r\n\r\n- The classification task can help us predict whether a relationship is correct or not, thus we report both the results of classification and ranking. \r\n\r\n- To use the pre-trained word vectors, we ignore the senses of the entities in Wordnet in this paper. \r\n\r\n- The experiments section is short because we tried to keep the paper's length close to the recommended length. From the ICLR website: 'Papers submitted to this track are ideally 2-3 pages long'."}, "forum": "msGKsXQXNiCBk", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "msGKsXQXNiCBk", "readers": ["everyone"], "nonreaders": [], "signatures": ["Danqi Chen, Richard Socher, Christopher D. Manning, Andrew Y. Ng"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 1,
"importance_and_relevance": 1,
"materials_and_methods": 8,
"praise": 2,
"presentation_and_reporting": 4,
"results_and_discussion": 3,
"suggestion_and_solution": 0,
"total": 12
}
| 1.666667
| 1.650884
| 0.015782
| 1.703793
| 0.346886
| 0.037126
| 0.083333
| 0.083333
| 0.083333
| 0.666667
| 0.166667
| 0.333333
| 0.25
| 0
|
{
"criticism": 0.08333333333333333,
"example": 0.08333333333333333,
"importance_and_relevance": 0.08333333333333333,
"materials_and_methods": 0.6666666666666666,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0.3333333333333333,
"results_and_discussion": 0.25,
"suggestion_and_solution": 0
}
| 1.666667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
mLr3In-nbamNu
|
Local Component Analysis
|
Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.
|
arXiv:1109.0093v4 [cs.LG] 10 Dec 2012
Local Component Analysis
Nicolas Le Roux
nicolas@le-roux.name
Francis Bach
francis.bach@ens.fr
INRIA - SIERRA Project - Team
Laboratoire d’Informatique de l’ ´Ecole Normale Sup´ erieure
Paris, France
Abstract
Kernel density estimation, a.k.a. Parzen windows, is
a popular density estimation method, which can be
used for outlier detection or clustering. With mul-
tivariate data, its performance is heavily reliant on
the metric used within the kernel. Most earlier work
has focused on learning only the bandwidth of the
kernel (i.e., a scalar multiplicative factor). In this
paper, we propose to learn a full Euclidean metric
through an expectation-minimisation (EM) procedure,
which can be seen as an unsupervised counterpart to
neighbourhood component analysis (NCA). In order
to avoid overfitting with a fully nonparametric den-
sity estimator in high dimensions, we also consider
a semi-parametric Gaussian-Parzen density model,
where some of the variables are modelled through a
jointly Gaussian density, while others are modelled
through Parzen windows. For these two models, EM
leads to simple closed-form updates based on matrix
inversions and eigenvalue decompositions. We show
empirically that our method leads to density estima-
tors with higher test-likelihoods than natural compet-
ing methods, and that the metrics may be used within
most unsupervised learning techniques that rely on lo-
cal distances, such as spectral clustering or manifold
learning methods. Finally, we present a stochastic ap-
proximation scheme which allows for the use of this
method in a large-scale setting.
1 Introduction
Most unsupervised learning methods rely on a metric
on the space of observations. The quality of the met-
ric directly impacts the performance of such techniques
and a significant amount of work has been dedicated to
learning this metric from data when some supervised
information is available [27, 16, 2]. However, in a fully
unsupervised scenario, most practitioners use the Ma-
halanobis distance obtained from principal component
analysis (PCA). This is an unsatisfactory solution as
PCA is essentially a global linear dimension reduction
method, while most unsupervised learning techniques,
such as spectral clustering or manifold learning, are
local.
In this paper, we cast the unsupervised metric learning
as a density estimation problem with a Parzen win-
dows estimator based on a Euclidean metric. Using
the maximum likelihood framework, we derive in Sec-
tion 3 an expectation-minimisation (EM) procedure
that maximizes the leave-one-out log-likelihood, which
may be considered as an unsupervised counterpart to
neighbourhood component analysis (NCA) [16]. As
opposed to PCA, which performs a whitening of the
data based on global information, our new algorithm
globally performs a whitening of the data using only
local information, hence the denomination local com-
ponent analysis (LCA).
Like all non-parametric density estimators, Parzen
windows density estimation is known to overfit in high
dimensions [25], and thus LCA should also overfit. In
order to keep the modelling flexibility of our density es-
timator while avoiding overfitting, we propose a semi-
parametric Parzen-Gaussian model; following [4], we
linearly transform then split our variables in two parts,
one which is modelled through a Parzen windows es-
timator (where we assume the interesting part of the
data lies), and one which is modelled as a multivari-
ate Gaussian (where we assume the noise lies). Again,
in Section 4, an EM procedure for estimating the lin-
ear transform may be naturally derived and leads to
simple closed-form updates based on matrix inversions
and eigenvalue decompositions. This procedure con-
tains no hyperparameters, all the parameters being
learnt from data.
Since the EM formulation of LCA scales quadratically
in the number of datapoints, making it impractical
for large datasets, we introduce in Section 5 both a
stochastic approximation and a subsampling technique
1
allowing us to achieve a linear cost and thus to scale
LCA to much larger datasets.
Finally, in Section 6, we show empirically that our
method leads to density estimators with higher test-
likelihoods than natural competing methods, and that
the metrics may be used within unsupervised learn-
ing techniques that rely on such metrics, like spectral
clustering.
2 Previous work
Many authors aimed at learning a Mahalanobis dis-
tance suited for local learning. While some techniques
required the presence of labelled data [16, 27, 2], oth-
ers proposed ways to learn the metric in a purely un-
supervised way, e.g., [28] who used the distance to the
k-th nearest neighbour as the local scaling around each
datapoint. Most of the other attempts at unsuper-
vised metric learning were developed in the context
of kernel density estimation, a.k.a. Parzen windows.
The Parzen windows estimator [21] is a nonparametric
density estimation model which, given n datapoints
{x1, . . . , xn}in Rd, defines a mixture model of the
form p(x) = 1
n
∑ n
j=1 K(x, xj , θ ) where K is a kernel
with compact support and parameters θ. We relax the
compact support assumption and choose K to be the
normal kernel, that is
p(x) = 1
n
n∑
j=1
N(x, xj , Σ)
∝ 1
n
√
|Σ |
n∑
j=1
exp
[
−1
2(x −xj )⊤Σ −1(x −xj )
]
,
where Σ is the covariance matrix of each Gaussian.
As the performance of the Parzen windows estimator
is more reliant on the covariance matrix than on the
kernel, there has been a large body of work, originating
from the statistics literature, attempting to learn this
matrix. However, almost all attempts are focused on
the asymptotic optimality of the estimators obtained
with little consideration for the practicality in high
dimensions. Thus, the vast majority of the work is
limited to isotropic matrices, reducing the problem to
finding a single scalar h [22, 13, 23, 9, 7, 20, 24], the
bandwidth, and the few extensions to the non-isotropic
cases are numerically expensive [14, 18].
An exception is the approach proposed in [26], which
is very similar to our method, as the authors learn the
covariance matrix of the Parzen windows estimator us-
ing local neighbourhoods. However, their algorithm
does not minimize a well-defined cost function, mak-
ing it unsuitable for kernels other than the Gaussian
one, and the locality used to compute the covariance
matrix depends on parameters which must be hand-
tuned or cross-validated. Also, the modelling of all
the dimensions using the Parzen windows estimator
makes the algorithm unsuitable when the data lie on
a high-dimensional manifold. In an extension to [26],
[3] uses a neural network to compute the leading eigen-
vectors of the local covariance matrix at every point
in the space, then uses these matrices to do density
estimation and classification. Despite the algorithm’s
impressive performance, it does not correspond to a
linear reparametrisation of the space and thus cannot
be used as a preprocessing step.
3 Local Component Analysis
Seeing the density as a mixture of Gaussians, one can
easily optimize the covariances using the EM algo-
rithm [12]. However, maximizing the standard log-
likelihood of the data would trivially lead to the degen-
erate solution where Σ goes to 0 to yield a sum of Dirac
distributions. One solution to that problem is to pe-
nalize some norm of the precision matrix to prevent it
from going to infinity. Another, more compelling, way
is to optimize the leave-one-out log-likelihood, where
the probability of each datapoint xi is computed un-
der the distribution obtained when xi has been re-
moved from the training set. This technique is not
new and has already been explored both in the su-
pervised [16, 15] and in the unsupervised setting [13].
However, in the latter case, the cross-validation was
then done by hand, which explains why only one band-
width parameter could be optimized 1. We will thus
use the following criterion:
L(Σ) = −
n∑
i=1
log
[ 1
n −1
∑
j̸=i
N(xi, x j , Σ)
]
(1)
≤cst −
n∑
i=1
∑
j̸=i
λij log N(xi, x j , Σ)
+
n∑
i=1
∑
j̸=i
λij log λij , (2)
with the constraints ∀i , ∑
j̸=i λij = 1. This varia-
tional bound is obtained using Jensen’s inequality.
The EM algorithm optimizes the right-hand side of
Eq. (2) by alternating between the optimisations of λ
and Σ in turn. The algorithm is guaranteed to con-
verge, and does so to a stationary point of the true
1Most of the literature on estimating the covariance matrix
discards the log-likelihood cost because of its sensitivit y to out-
liers and prefers AMISE (see, e.g., [14]). However, in all ou r
experiments, the number of datapoints was large enough so th at
LCA did not suffer from the presence of outliers.
2
function over Σ defined in Eq. (1). At each step, the
optimal solutions are:
λ∗
ij = N(xi, x j , Σ)
∑
k̸=i N(xi, x k, Σ) if j ̸= i (3)
λ∗
ii = 0 (4)
Σ ∗ =
∑
ij λij (xi −xj )(xi −xj )T
n . (5)
The “responsibilities” λ∗
ij define the relative proximity
of xj to xi (compared to the proximity of all the xk’s
to xi) and Σ ∗ is the average of all the local covariance
matrices.
This algorithm, which we coin LCA, for local compo-
nent analysis, transforms the data to make it locally
isotropic, as opposed to PCA which makes it glob-
ally isotropic. Fig. (1) shows a comparison of PCA
and LCA on the word sequence “To be or not to be”.
Whereas PCA is highly sensitive to the length of the
text, LCA is only affected by the local shapes, thus
providing a much less distorted result. 2
First, one may note at this point that Manifold Parzen
Windows [26] is equivalent to LCA with only one step
of EM. This makes Manifold Parzen Windows more
sensitive to the choice of the original covariance ma-
trix whose parameters must be carefully chosen. As we
shall see later in the experiments, running EM to con-
vergence is important to get good accuracy when using
spectral clustering on the transformed data. Second, it
is also worth noting that, similarly to Manifold Parzen
Windows, LCA can straightforwardly be extended to
the cases where each datapoint uses its own local co-
variance matrix (possibly with a smoothing term), or
where the covariance Σ ∗ is the sum of a low-rank ma-
trix and some scalar multiplied by the identity matrix.
Not only may LCA be used to learn a linear trans-
formation of the space, but it also defines a density
model. However, there are two potential negative as-
pects associated with this method. First, in high di-
mensions, Parzen windows is prone to overfitting and
must be regularized [25]. Second, if there are some
directions containing a small Gaussian noise, the local
isotropy will blow them up, swamping the data with
clutter. This is common to all the techniques which
renormalise the data by the inverse of some variance.
A solution to both of these issues is to consider a prod-
uct of two densities: one is a low-dimensional Parzen
windows estimator, which will model the interesting
signal, and the other is a Gaussian, which will model
the noise.
2Since both methods are insensitive to any linear
reparametrisation of the data, we do not include the origina l
data in the figure.
4 LCA with a multiplicative
Gaussian component
We now assume that there are irrelevant dimensions
in our data which can be modelled by a Gaussian. In
other words, we consider an invertible linear transfor-
mation ( BG, B L)⊤x of the data, modelling B⊤
G x as a
multivariate Gaussian and B⊤
L x through kernel density
estimation, the two parts being independent, leading
to p(x) ∝p(B⊤
G x, B ⊤
L x) = pG(B⊤
G x)pL(B⊤
L x), where
pG is a Gaussian and pL is the Parzen windows esti-
mator, i.e.,
p(xi) ∝
⏐
⏐BGB⊤
G + BLB⊤
L
⏐
⏐
1
2
n −1
×exp
[
−1
2(xi −µ)⊤BGB⊤
G (xi −µ)
]
×
∑
j̸=i
exp
[
−1
2(xi −xj )⊤BLB⊤
L (xi −xj )
]
,
with ( BG, B L) a full-rank square matrix. Using EM,
we can upper-bound the negative log-likelihood:
−2
∑
i
log p(xi) ≤tr(B⊤
G CGBG) + tr( B⊤
L CLBL)
−log |BGB⊤
G + BLB⊤
L |, (6)
with
CG = 1
n
∑
i
(xi −µ)(xi −µ)⊤ ,
CL = 1
n
∑
ij
λij (xi −xj )(xi −xj )⊤ .
The matrices BG and BL minimizing the right-hand
side of Eq. (6) may be found using the following propo-
sition (see proof in the appendix):
Proposition 1 Let BG ∈ Rd×d1 and BL ∈ Rd×d2 ,
with d = d1 + d2 and B = ( BG, B L) ∈Rd×d invertible.
Consider two symmetric positive matrices M1 and M2
in Rd×d. The problem
min
BG,B L
tr B⊤
G M1BG+tr B⊤
L M2BL−log det(BGB⊤
G +BLB⊤
L )
(7)
has a finite solution only if M1 and M2 are invertible
and, if these conditions are met, reaches its optimum
at
BG = M−1/ 2
1 U+ , B L = M−1/ 2
1 U−D−1/ 2
− ,
where U+ are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 as-
sociated with eigenvalues greater than or equal to 1,
U− are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 associated
3
Figure 1: Results obtained when transforming “To be or not to be” u sing PCA (left) and LCA (right). Left:
To make the data globally isotropic, PCA awkwardly compresses the le tters horizontally. Right: Since LCA is
insensitive to the spacing between letters and to the length of the t ext, there is no horizontal compression.
with eigenvalues smaller than 1 and D− is the diagonal
matrix containing the eigenvalues of M−1/ 2
1 M2M−1/ 2
1
smaller than 1.
The resulting procedure is described in Algorithm 1,
where all dimensions are initially modelled by the
Parzen windows estimator, which empirically yielded
the best results.
Algorithm 1 LCA - Gauss
Input: X (dataset), iterMax (maximum number of
iterations), ν (regularisation)
Output: BG (Gaussian part transformation), BL
(Parzen windows transformation)
CG ← cov(X) + νId {Initialize C to the global
covariance}
IG ←C
− 1
2
G
BG = 0 , B L = chol( C−1
G ) {Assign all dimensions to
the Parzen windows estimator }
for iter = 1:iterMax do
Mij ←exp
[
−(xi−xj )⊤B⊤
L BL(xi−xj )
2
]
, Mii ←0
λij ← Mij∑
k Mik
CL ←
∑
ij λ ij (xi−xj )(xi−xj )⊤
n + νId
[V, D ] ← eig(IGCLIG) {Eigendecomposition of
IGCLIG}
t1 = max z D(z, z ) ≤1 {Cut-off between eigenval-
ues smaller and larger than 1 }
t+ = {t|t1 ≤t ≤d}, t− = {t|1 ≤t < t 1}
V+ ← V (:, t +), V− ← V (:, t −), D− =
D(t−, t −)
BL = IGV−D−1/ 2
− , BG = IGV+
end for
Relationship with ICA. Independent component
analysis (ICA) can be seen as a density model where
x = As and s has independent components (see,
e.g., [17]). In the Parzen windows framework, this cor-
responds to modelling the density of s by a product of
univariate kernel density estimators [6]. This however
causes two problems: first, while this assumption is
appropriate in settings such as source separation, it is
violated in most settings, and having a multivariate
kernel density estimation is preferable. Second, most
algorithms are dedicated to finding independent com-
ponents which are non-Gaussian. In the presence of
more than one Gaussian dimension, most ICA frame-
works become unidentifiable, while our explicit mod-
elling of such Gaussian components allows us to tackle
this situation (a detailed analysis of the identifiability
of our Parzen/Gaussian model is out of the scope of
this paper).
Relationship with NGCA. NGCA [4] makes an
assumption similar to ours (they rather assume an
additive Gaussian noise on top of a low-dimensional
non-Gaussian signal) but uses a projection pursuit
algorithm to iteratively find the directions of non-
Gaussianity. Unlike in FastICA, the contrast functions
used to find the interesting directions can be different
for each direction. However, like all projection pur-
suit algorithms, the identification of interesting direc-
tions gets much harder in higher dimensions, as most
of them will be almost Gaussian. Our use of a non-
parametric density estimator with a log-likelihood cost
allows us to globally optimize all directions simultane-
ously and does not rely on the model being correct.
Finally, LCA estimates all its parameters from data
as opposed to NGCA which requires the number of
non-Gaussian directions to be set.
Escaping local optima. Though our model allows
for the modification of the number of dimensions mod-
elled by the Gaussian through the analysis of the spec-
trum of C−1/ 2
G CLC−1/ 2
G , it is sensitive to local optima.
It is for instance rare that a dimension modelled by
a Gaussian is switched to the Parzen windows estima-
tor. Even though the algorithm will more easily switch
from the Parzen windows estimator to the Gaussian
model, it will typically stop too early, that is model
many dimensions using the Parzen windows estimator
rather than the better Gaussian. To solve these issues,
we propose an alternate algorithm, LCA-Gauss-Red,
which explores the space of dimensions modelled by a
Gaussian more aggressively using a search algorithm,
namely:
1. We run the algorithm LCA - Gauss for a few it-
erations (40 in our experiments);
2. We then “transfer” some columns from BL (the
Parzen windows model) to BG (the Gaussian
4
model), and rerun LCA - Gauss using these new
matrices as initialisations;
3. We iterate step 2 using a dichotomic search of the
optimal number of dimensions modelled by the
Gaussian, until a local optimum is found;
4. Once we have a locally optimum number of di-
mensions modelled by the Gaussian model, we run
LCA - Gauss to convergence.
5 Speeding up LCA
Computing the local covariance matrix of the points
using Eq. (3), (4) and (5) has a complexity in O(dn2 +
d2n + d3), with d the dimensionality of the data and
n the number of training points. Since this is imprac-
tical for large datasets, we can resort to sampling to
keep the cost linear in the number of datapoints. We
may further use low-rank or diagonal approximation to
achieve a complexity which grows quadratically with
d instead of cubically.
5.1 Averaging a subset of the local co-
variance matrices
Instead of averaging the local covariances over all dat-
apoints, we may only average them over a subset of
datapoints. This estimator is unbiased and, if the lo-
cal covariance matrices are not too dissimilar, which
is the assumption underlying LCA, then its variance
should remain small. This is equivalent to using a
minibatch procedure: every time we have a new mini-
batch of size B, we compute its local covariance ˆCL,
which is then averaged with the previously computed
CL using
CL ←γ
B
n CL + (1 −γ
B
n ) ˆCL (8)
to yield the updated CL. The exponent B/n is so
that γ, the discount factor, determines the weight of
the old covariance matrix after an entire pass through
the data, which makes it insensitive to the particular
choice of batch size. As opposed to many such al-
gorithms where the choice of γ is critical as it helps
retaining the information of previous batches, the lo-
cality of the EM estimate makes it less so. However, if
the number of datapoints used to estimate CL is not
much larger than the dimension of the data, we need
to set a higher γ to avoid degenerate covariance ma-
trices. In simulations, we found that using a value of
γ = . 6 worked well. Similarly, the size of the mini-
batch influences only marginally the final result and
we found a value of 100 to be large enough.
5.2 Computing the local covariance
matrices using a subset of the dat-
apoints
Rather than using only a subset of local covariance ma-
trices, one may also wonder if using the entire dataset
to compute these matrices is necessary. Also, as the
number of datapoints grows, the chances of overfitting
increase. Thus, one may choose to use only a sub-
set of the datapoints to compute these matrices. This
will increase the local covariances, yielding a biased
estimate of the final result, but may also act as a reg-
ulariser. In practice, for very large datasets, one will
want the largest neighbourhood size while keeping the
computational cost tractable.
Denoting ni the number of locations at which we esti-
mate the local covariance and nj the number of neigh-
bours used to estimate this covariance, the cost per
update is now O(d2[ni + nj] + dninj + d3). Since only
nj should grow with n, this is linear in the total num-
ber of datapoints.
Though they may appear similar, these are not “land-
mark” techniques (see, e.g., [11]) as there is still one
Gaussian component per datapoint, and the ni data-
points around which we compute the local covariances
are randomly sampled at every iteration.
6 Experiments
LCA has three main properties: first, it transforms the
data to make it locally isotropic, thus being well-suited
for preprocessing the data before using a clustering
algorithm like spectral clustering; second, it extracts
relevant, non-Gaussian components in the data; third,
it provides us with a good density model through the
use of the Parzen windows estimator.
In the experiments, we will assess the performance of
the following algorithms: LCA, the original algorithm;
LCA-Gauss, using a multiplicative Gaussian compo-
nent, as described in Section 4; LCA-Gauss-Red, the
variant of LCA-Gauss using the more aggressive search
to find a better number of dimensions to be modelled
by the Gaussian component. The MATLAB code for
LCA, LCA-Gauss and LCA-Gauss-Red is available at
http://nicolas.le-roux.name/code.html.
6.1 Improving clustering methods
We first try to solve three clustering problems: one
for which the clusters are convex and the direc-
tion of interest does not have a Gaussian marginal
(Fig. (2), left), one for which the clusters are not con-
vex (Fig. (2), middle), and one for which the directions
5
of interest have almost Gaussian marginals (Fig. (2),
right). Following [1, 2], the data is progressively cor-
rupted by adding dimensions of white Gaussian noise,
then whitened. We compare here the clustering ac-
curacy, which is defined as 100
n minP tr(EP ) where E
is the confusion matrix and P is the set of permuta-
tions over cluster labels, obtained with the following
five techniques:
1. Spectral clustering (SC) [19] on the whitened data
(using the code of [8]);
2. SC on the projection on the first two components
found by FastICA using the best contrast function
and the correct number of components;
3. SC on the data transformed using the metric
learnt with LCA;
4. SC on the data transformed using the metric
learnt with the product of LCA and a Gaussian;
5. SC on the projection of the data found using
NGCA [4] with the correct number of compo-
nents.
Our choice of spectral clustering stems from its higher
clustering performance compared to K-means. Re-
sults are reported in Fig. (3). Because of the whiten-
ing, the Gaussian components in the first dataset are
shrunk along the direction containing information. As
a result, even with little noise added, the information
gets swamped and spectral clustering fails completely.
On the other hand, LCA and its variants are much
more robust to the presence of irrelevant dimensions.
Though NGCA works very well on the first dataset,
where there is only one relevant component, its per-
formance drops quickly when there are two relevant
components (note that, for all datasets, we provided
the true number of relevant dimensions as input to
NGCA). This is possibly due to the deflation proce-
dure which is not adapted when no single component
can be clearly identified in isolation. This is in contrast
with LCA and its variants which circumvent this issue,
thanks to their global optimisation procedure. Note
also that LCA-Gauss allows us to perform unsuper-
vised dimensionality reduction with the same perfor-
mance as previously proposed supervised algorithms
(e.g., [2]).
Figure (4) shows the clustering accuracy on the
three datasets for various numbers of EM iterations,
one iteration corresponding to Manifold Parzen Win-
dows [26] with a Gaussian kernel whose covariance ma-
trix is the data covariance kernel. As one can see, run-
ning the EM algorithm to convergence yields a signifi-
cant improvement in clustering accuracy. The perfor-
mance of Manifold Parzen Windows could likely have
been improved with a careful initialisation of the orig-
inal kernel, but this would have been at the expense
of the simplicity of the algorithm.
6.2 LCA as a density model
We now assess the quality of LCA as a density model.
We build a density model of the USPS digits dataset,
a 256-dimensional dataset of handwritten digits. We
compared several algorithms:
•An isotropic Parzen windows estimator with the
bandwidth estimated using LCA (replacing Σ ∗ of
Eq. (5) by λI so that the two matrices have the
same trace);
•A Parzen windows estimator with diagonal metric
(equal to the diagonal of Σ ∗ in Eq. (5);
•A Parzen windows estimator with the full metric
as obtained using LCA;
•A single Gaussian model;
•A product of a Gaussian and a Parzen windows
estimator (as described in Section 4).
The models were trained on a set of 2000 datapoints
and regularized by penalizing the trace of Σ −1 (in the
case of the last model, both covariance matrices, local
and global, were penalized). The regularisation pa-
rameter was optimized on a validation set of 1000 dat-
apoints. For the last model, the regularisation param-
eter of the global covariance was set to the one yielding
the best performance for the full Gaussian model on
the validation set. Thus, we only had to optimize the
regularisation parameter for the local covariance.
The final performance was then evaluated on a set of
3000 datapoints which had not been used for training
nor validation. We ran the experiment 20 times, ran-
domly selecting the training, validation and test set
each time.
Fig. (5) shows the mean and the standard error of the
negative log-likelihood on the test set. As one can see,
modelling all dimensions using the Parzen windows es-
timator leads to poor performance in high dimensions,
despite the regulariser and the leave-one-out criterion.
On the other hand, LCA-Gauss and LCA-Gauss-Red
clearly outperform all the other models, justifying our
choice of modelling some dimensions using a Gaussian.
Also, as opposed to the previous experiments, there is
no performance gain induced by the use of LCA-Gauss-
Red as opposed to LCA-Gauss, which we believe stems
from the fact that the switch from one model to the
other is easier to make when there are plenty of di-
mensions to choose from. The poor performance of
6
Figure 2: Noise-free data used to assess the robustness of K-means to noise. Left: mixture of two isotropic
Gaussians of unit variance and means [ −3, 0]⊤ and [3 , 0]⊤. Centre: two concentric circles with radii 1 and 2,
with added isotropic Gaussian noise of standard deviation . 1. Right: mixture of five Gaussians. The centre
cluster contains four times as many datapoints as the other ones.
0 20 40 6050
60
70
80
90
100
Noise dimensions
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Figure 3: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added. The error bars represent one
standard error. Left: mixture of isotropic Gaussians presented in Fig. (2) (left). Centre: two concentric circles
presented in Fig. (2) (centre). Right: mixture of five Gaussians pr esented in Fig. (2) (right).
0 20 40 6050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
Figure 4: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added and varying number of EM
iterations in the LCA algorithm (MPW = one iteration). The error bars represent one standard error. Left:
mixture of isotropic Gaussians presented in Fig. (2) (left). Centre : two concentric circles presented in Fig. (2)
(centre). Right: mixture of five Gaussians presented in Fig. (2) (r ight).
LCA-Full is a clear indication of the problems suffered
by Parzen windows in high dimensions.
6.3 Subsampling
We now evaluate the loss in performance incurred
by the use the subsampling procedure described in
Section 5, both on the train and test negative log-
7
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 6.43 ± 0.10 2.70 ± 0.06 − 0.10 ± 0.03 6.43 ± 0.10 2.80 ± 0.06 − 0.17 ± 0.02
B = 3000 6.58 ± 0.07 2.73 ± 0.05 − 0.06 ± 0.03 6.54 ± 0.07 2.80 ± 0.06 − 0.11 ± 0.02
B = 6000 6.22 ± 0.08 2.21 ± 0.03 0.00 ± 0.01 6.18 ± 0.07 1.98 ± 0.03 0.02 ± 0.02
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 2.12 ± 0.16 0.20 ± 0.08 0.65 ± 0.05 2.01 ± 0.17 0.07 ± 0.09 0.15 ± 0.03
B = 3000 2.11 ± 0.16 0.30 ± 0.07 0.46 ± 0.04 2.01 ± 0.17 0.16 ± 0.09 0.09 ± 0.03
B = 6000 1.54 ± 0.16 − 0.75 ± 0.07 − 0.01 ± 0.01 1.43 ± 0.15 − 1.07 ± 0.08 0.01 ± 0.02
Figure 6: Train (top) and test (bottom) negative log-likelihood differ ences induced by the use of smaller batch
and neighbourhood sizes compared to the original model ( γ = 0, B = 6000, N = 6000) for γ = 0 . 3 (left) and
γ = 0 . 6 (right). A negative value means better performance.
LCA - Isotropic 269. 78 ±0. 18
LCA - Diagonal 109. 59 ±0. 56
LCA - Full 32. 98 ±0. 35
Gaussian 32. 27 ±0. 36
LCA - Gauss 19. 09 ±0. 39
LCA - Gauss - Red 19. 09 ±0. 39
Figure 5: Test negative log-likelihood on the USPS
digits dataset, averaged over 20 runs.
likelihoods. For that purpose, we used the USPS digit
recognition dataset, which contains 8298 datapoints in
dimension 256, which we randomly split into a train-
ing set of n = 6000 datapoints, using the rest as the
test set. We tested the following hyperparameters:
•Discount factor γ = 0 . 3, 0. 6, 0. 9 ,
•Batch size B = 1000 , 3000, 6000 ,
•Neighbourhood size N = 1000 , 3000, 6000 .
Fig. (6) show the log-likelihood differences induced
by the use of smaller batch sizes and neighbourhood
sizes. For each set of hyperparameters, 20 experiments
were run using different training and test sets, and the
means and standard errors are reported. The results
for γ = 0 . 9 were very similar and are not included due
to space constraints.
Three observations may be made. First, reducing the
batchsize has little effect, except when γ is small. Sec-
ond, reducing the neighbourhood size has a regular-
izing effect at first but drastically hurts the perfor-
mance if reduced too much. Third, the value of γ, the
discount factor, has little influence, but larger values
proved to yield more consistent test performance, at
the expense of slower convergence. The consistency of
these results shows that it is safe to use subsampling
(with values of γ = 0 . 6, B = 100 and N = 3000, for
instance) especially if the training set is very large.
7 Conclusion
Despite its importance, the learning of local or global
metrics is usually an overseen step in many practical
algorithms. We have proposed an extension of the gen-
eral bandwidth selection problem to the multidimen-
sional case, with a generalisation to the case where sev-
eral components are Gaussian. Additionally, we pro-
posed an approximate scheme suited to large datasets
which allows to find a local optimum in linear time.
We believe LCA can be an important preprocessing
tool for algorithms relying on local distances, such as
manifold learning methods or many semi-supervised
algorithms. Another use would be to cast LCA within
the mean-shift algorithm, which finds the modes of the
Parzen windows estimator, in the context of image seg-
mentation [10]. In the future, we would like to extend
this model to the case where the metric is allowed to
vary with the position in space, to account for more
complex geometries in the dataset.
Acknowledgements
Nicolas Le Roux and Francis Bach are supported in
part by the European Research Council (SIERRA-
ERC-239993). We would also like to thank Warith
Harchaoui for its valuable input.
8
References
[1] F. Bach and Z. Harchaoui. Diffrac: a discrimi-
native and flexible framework for clustering. In
Advances in Neural Information Processing Sys-
tems 20 , 2007.
[2] F. Bach and M. I. Jordan. Learning spectral clus-
tering. In Advances in Neural Information Pro-
cessing Systems 16 , 2004.
[3] Y. Bengio, H. Larochelle, and P. Vincent. Non-
local manifold Parzen windows. In Advances in
Neural Information Processing Systems 18 , pages
115–122. MIT Press, 2006.
[4] G. Blanchard, M. Kawanabe, M. Sugiyama,
V. Spokoiny, and K.-R. M¨ uller. In search of non-
Gaussian components of a high-dimensional dis-
tribution. J. Mach. Learn. Res. , 7:247–282, De-
cember 2006.
[5] J.M. Borwein and A.S. Lewis. Convex analysis
and nonlinear optimization, theory and examples,
2000.
[6] R. Boscolo, H. Pan, and V.P. Roychowdhury.
Independent component analysis based on non-
parametric density estimation. Neural Networks,
IEEE Transactions on , 15(1):55–65, 2004.
[7] A. Bowman. An alternative method of cross-
validation for the smoothing of density estimates.
Biometrika, 71(2):pp. 353–360, 1984.
[8] W.-Y. Chen, Y. Song, H. Bai, C.-J. Lin, and E. Y.
Chang. Parallel spectral clustering in distributed
systems. IEEE Transactions on Pattern Analysis
and Machine Intelligence , 33(3):568–586, 2011.
[9] Y.-S. Chow, S. Geman, and L.-D. Wu. Consistent
cross-validated density estimation. The Annals of
Statistics, 11(1):pp. 25–38, 1983.
[10] D. Comaniciu and P. Meer. Mean shift: A robust
approach toward feature space analysis. IEEE
Transactions on Pattern Analysis and Machine
Intelligence, 24:603–619, 2002.
[11] V. De Silva and J.B. Tenenbaum. Sparse multi-
dimensional scaling using landmark points. Tech-
nology, pages 1–41, 2004.
[12] A. P. Dempster, N. M. Laird, and D. B. Rubin.
Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical
Society. Series B (Methodological) , 39(1):pp. 1–
38, 1977.
[13] R.P.W. Duin. On the choice of smoothing param-
eters for Parzen estimators of probability density
functions. Computers, IEEE Transactions on , C-
25(11):1175 –1179, 1976.
[14] T. Duong and M. Hazelton. Cross-validation
bandwidth matrices for multivariate kernel den-
sity estimation. Scandinavian Journal of Statis-
tics, 32(3):pp. 485–506, 2005.
[15] A. Globerson and S. Roweis. Metric learning
by collapsing classes. In Advances in Neural In-
formation Processing Systems , volume 18, pages
451–458. MIT Press, 2006.
[16] J. Goldberger, S. Roweis, G.E. Hinton, and
R. Salakhutdinov. Neighbourhood components
analysis. In Advances in Neural Information Pro-
cessing Systems 17 , 2004.
[17] A. Hyv¨ arinen, J. Karhunen, and E. Oja. Inde-
pendent component analysis . Wiley, New York,
2001.
[18] M. C. Jones and D. A. Henderson. Maximum
likelihood kernel density estimation: On the po-
tential of convolution sieves. Comput. Stat. Data
Anal., 53:3726–3733, August 2009.
[19] A. Ng, M. I. Jordan, and Y. Weiss. On spectral
clustering: Analysis and an algorithm. In Ad-
vances in Neural Information Processing Systems
14, 2001.
[20] B. Park and J. S. Marron. Comparison of data-
driven bandwidth selectors. Journal of the Amer-
ican Statistical Association , 85(409):pp. 66–72,
1990.
[21] E. Parzen. On estimation of a probability density
function and mode. The Annals of Mathematical
Statistics, 33(3):pp. 1065–1076, 1962.
[22] M. Rosenblatt. Remarks on some nonparametric
estimates of a density function. The Annals of
Mathematical Statistics , 27(3):pp. 832–837, 1956.
[23] M. Rudemo. Empirical choice of histograms and
kernel density estimators. Scandinavian Journal
of Statistics , 9(2):pp. 65–78, 1982.
[24] S. J. Sheather and M. C. Jones. A reliable data-
based bandwidth selection method for kernel den-
sity estimation. Journal of the Royal Statistical
Society. Series B (Methodological) , 53(3):pp. 683–
690, 1991.
[25] B. W. Silverman. Density estimation for statistics
and data analysis. 1986.
9
[26] P. Vincent and Y. Bengio. Manifold Parzen win-
dows. In Advances in Neural Information Pro-
cessing Systems 15 , pages 825–832. MIT Press,
2002.
[27] E. Xing, A. Ng, M. I. Jordan, and S. Russell. Dis-
tance metric learning with application to cluster-
ing with side-information. In Advances in Neural
Information Processing Systems 14 , 2002.
[28] L. Zelnik-Manor and P. Perona. Self-tuning spec-
tral clustering. In Advances in Neural Informa-
tion Processing Systems 17 , 2004.
Appendix
We prove here Proposition 1.
Proof If M1 is singular, then the minimum value is
−∞, because we can have B⊤
G M1BG bounded while
BGB⊤
G tends to + ∞(for example, if d1 = 1, and u1 is
such that M1u1 = 0, select BG = λu1 with λ →+∞).
The reasoning is similar for M2.
We thus assume that M1 and M2 are invert-
ible. We consider the eigendecomposition of
M−1/ 2
1 M2M−1/ 2
1 = U Diag(e)U⊤, which corresponds
to the generalized eigendecomposition of the pair
(M1, M 2).
Denoting A2 = U⊤M1/ 2
1 BL and A1 = U⊤M1/ 2
1 BG,
we have:
tr B⊤
G M1BG + tr B⊤
L M2BL −log det(BGB⊤
G + BLB⊤
L )
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2
−log det(A1A⊤
1 + A2A⊤
2 ) + log det M1
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2)
−log det(A⊤
1 (I −A2(A⊤
2 A2)−1A⊤
2 )A1) + log det M1 .
By taking derivatives with respect to A1, we get
A1 = ( I −Π 2)A1(A⊤
1 (I −Π 2)A1)−1 , (9)
with Π 2 = A2(A⊤
2 A2)−1A⊤
2 . By left-multiplying both
sides of Eq. (9) by A⊤
2 , we obtain
A⊤
2 A1 = 0 .
By left-multiplying by A⊤
1 , we get
A⊤
1 A1 = I .
Thus, we now need to minimize with respect to A2 the
following cost function
d1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2) + log det M1
Let s be the vector of singular values of A2, ordered in
decreasing order and let the ei be ordered in increasing
order. We have:
tr Diag(e)A2A⊤
2 = −tr(−Diag(e)A2A⊤
2 ) ⩾
∑
i
eis2
i ,
with equality if and only if the eigenvectors of A2A⊤
2
are aligned with the ones of Diag( e) (the −ei being
also in decreasing order) (Theorem 1.2.1, [5]).
Thus, we have A2A⊤
2 = diag( s)2 with only d2 non-
zero elements in s. Let J2 be the index of non zero-
elements. We thus need to minimize
d1 + log det M1 +
∑
j∈J2
(ej s2
j −log s2
j ) ,
with optimum s2
j = e−1
j and value:
d1 + d2 + log det M1 +
∑
j∈J2
log ej .
Thus, we need to take J2 corresponding to the
smallest eigenvalues ej. If we also optimize with
respect to d2, then J2 must only contain the elements
smaller than 1.
10
|
Nicolas Le Roux, Francis Bach
|
Unknown
| 2,013
|
{"id": "mLr3In-nbamNu", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1357918200000, "tmdate": 1357918200000, "ddate": null, "number": 64, "content": {"title": "Local Component Analysis", "decision": "conferencePoster-iclr2013-conference", "abstract": "Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.", "pdf": "https://arxiv.org/abs/1109.0093", "paperhash": "roux|local_component_analysis", "keywords": [], "conflicts": [], "authors": ["Nicolas Le Roux", "Francis Bach"], "authorids": ["nicolas.le.roux@gmail.com", "francis.bach@gmail.com"]}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["nicolas.le.roux@gmail.com"], "writers": []}
|
[Review]:
Summary of contributions:
The paper presents a robust algorithm for density estimation. The main idea is to model the density into a product of two independent distributions: one from a Parzen windows estimation (for modeling a low dimensional manifold) and the other from a Gaussian distribution (for modeling noise). Specifically, leave-one-out log-likelihood is used as the objective function of Parzen window estimator, and the joint model can be optimized using Expectation Maximization algorithm. In addition, the paper presents an analytical solution for M-step using eigen-decomposition. The authors also propose several heuristics to address local optima problems and to improve computational efficiency. The experimental results on synthetic data show that the proposed algorithm is indeed robust to noise.
Assessment on novelty and quality:
Novelty:
This paper seems to be novel. The main ideas (using leave-one-out log-likelihood and decomposing the density as a product of Parzen windows estimator and a Gaussian distribution) are very interesting.
Quality:
The paper is clearly written. The method is well motivated, and the technical solutions are quite elegant and clearly described. The paper also presents important practical tips on addressing local optima problems and speeding up the algorithm.
In experiments, the proposed algorithm works well when noise dimensions increase in the data. The experiments are reasonably convincing, but they are limited to very low-dimensional, toy data. Evaluation on more real-world datasets would have been much more compelling. Without such evaluation, it’s unclear how the proposed method will perform on real data.
Although interesting, the assumption about modeling the data density as a product of two independent distributions can be too strong and unrealistic. For example, how can this model handle the cases when noise are added to the low-dimensional manifold, not as orthogonal “noise dimension”?
Other comments:
- Figure 1 is not very interesting since even NCA will learn near-isotropic covariance, and the baseline method seems to be PCA whitening, not PCA.
Pros and cons:
pros:
- The paper seems sufficiently novel.
- The main approach and solution are technically interesting.
- The experiments show proof-of-concept (albeit limited) demonstration that the proposed method is robust to noise dimensions (or irrelevant features).
cons:
- The experiments are limited to very low-dimensional, toy datasets. Evaluation on more real-world datasets would have been much more compelling. Without such evaluation, it’s unclear how the proposed method will perform on real data.
- The assumption about modeling the data density as a product of two independent distributions can be too strong and unrealistic (see comments above).
|
anonymous reviewer 61c0
| null | null |
{"id": "pRFvp6BDvn46c", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362491220000, "tmdate": 1362491220000, "ddate": null, "number": 4, "content": {"title": "review of Local Component Analysis", "review": "Summary of contributions:\r\nThe paper presents a robust algorithm for density estimation. The main idea is to model the density into a product of two independent distributions: one from a Parzen windows estimation (for modeling a low dimensional manifold) and the other from a Gaussian distribution (for modeling noise). Specifically, leave-one-out log-likelihood is used as the objective function of Parzen window estimator, and the joint model can be optimized using Expectation Maximization algorithm. In addition, the paper presents an analytical solution for M-step using eigen-decomposition. The authors also propose several heuristics to address local optima problems and to improve computational efficiency. The experimental results on synthetic data show that the proposed algorithm is indeed robust to noise.\r\n\r\n\r\nAssessment on novelty and quality:\r\n\r\nNovelty: \r\nThis paper seems to be novel. The main ideas (using leave-one-out log-likelihood and decomposing the density as a product of Parzen windows estimator and a Gaussian distribution) are very interesting.\r\n\r\nQuality: \r\nThe paper is clearly written. The method is well motivated, and the technical solutions are quite elegant and clearly described. The paper also presents important practical tips on addressing local optima problems and speeding up the algorithm. \r\n\r\nIn experiments, the proposed algorithm works well when noise dimensions increase in the data. The experiments are reasonably convincing, but they are limited to very low-dimensional, toy data. Evaluation on more real-world datasets would have been much more compelling. Without such evaluation, it\u2019s unclear how the proposed method will perform on real data.\r\n\r\nAlthough interesting, the assumption about modeling the data density as a product of two independent distributions can be too strong and unrealistic. For example, how can this model handle the cases when noise are added to the low-dimensional manifold, not as orthogonal \u201cnoise dimension\u201d?\r\n\r\n\r\nOther comments:\r\n- Figure 1 is not very interesting since even NCA will learn near-isotropic covariance, and the baseline method seems to be PCA whitening, not PCA.\r\n\r\n\r\nPros and cons:\r\npros:\r\n- The paper seems sufficiently novel. \r\n- The main approach and solution are technically interesting.\r\n- The experiments show proof-of-concept (albeit limited) demonstration that the proposed method is robust to noise dimensions (or irrelevant features).\r\n\r\ncons:\r\n- The experiments are limited to very low-dimensional, toy datasets. Evaluation on more real-world datasets would have been much more compelling. Without such evaluation, it\u2019s unclear how the proposed method will perform on real data.\r\n- The assumption about modeling the data density as a product of two independent distributions can be too strong and unrealistic (see comments above)."}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "mLr3In-nbamNu", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 61c0"], "writers": ["anonymous"]}
|
{
"criticism": 6,
"example": 1,
"importance_and_relevance": 5,
"materials_and_methods": 22,
"praise": 10,
"presentation_and_reporting": 2,
"results_and_discussion": 6,
"suggestion_and_solution": 2,
"total": 25
}
| 2.16
| -0.11267
| 2.27267
| 2.189337
| 0.307952
| 0.029337
| 0.24
| 0.04
| 0.2
| 0.88
| 0.4
| 0.08
| 0.24
| 0.08
|
{
"criticism": 0.24,
"example": 0.04,
"importance_and_relevance": 0.2,
"materials_and_methods": 0.88,
"praise": 0.4,
"presentation_and_reporting": 0.08,
"results_and_discussion": 0.24,
"suggestion_and_solution": 0.08
}
| 2.16
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
mLr3In-nbamNu
|
Local Component Analysis
|
Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.
|
arXiv:1109.0093v4 [cs.LG] 10 Dec 2012
Local Component Analysis
Nicolas Le Roux
nicolas@le-roux.name
Francis Bach
francis.bach@ens.fr
INRIA - SIERRA Project - Team
Laboratoire d’Informatique de l’ ´Ecole Normale Sup´ erieure
Paris, France
Abstract
Kernel density estimation, a.k.a. Parzen windows, is
a popular density estimation method, which can be
used for outlier detection or clustering. With mul-
tivariate data, its performance is heavily reliant on
the metric used within the kernel. Most earlier work
has focused on learning only the bandwidth of the
kernel (i.e., a scalar multiplicative factor). In this
paper, we propose to learn a full Euclidean metric
through an expectation-minimisation (EM) procedure,
which can be seen as an unsupervised counterpart to
neighbourhood component analysis (NCA). In order
to avoid overfitting with a fully nonparametric den-
sity estimator in high dimensions, we also consider
a semi-parametric Gaussian-Parzen density model,
where some of the variables are modelled through a
jointly Gaussian density, while others are modelled
through Parzen windows. For these two models, EM
leads to simple closed-form updates based on matrix
inversions and eigenvalue decompositions. We show
empirically that our method leads to density estima-
tors with higher test-likelihoods than natural compet-
ing methods, and that the metrics may be used within
most unsupervised learning techniques that rely on lo-
cal distances, such as spectral clustering or manifold
learning methods. Finally, we present a stochastic ap-
proximation scheme which allows for the use of this
method in a large-scale setting.
1 Introduction
Most unsupervised learning methods rely on a metric
on the space of observations. The quality of the met-
ric directly impacts the performance of such techniques
and a significant amount of work has been dedicated to
learning this metric from data when some supervised
information is available [27, 16, 2]. However, in a fully
unsupervised scenario, most practitioners use the Ma-
halanobis distance obtained from principal component
analysis (PCA). This is an unsatisfactory solution as
PCA is essentially a global linear dimension reduction
method, while most unsupervised learning techniques,
such as spectral clustering or manifold learning, are
local.
In this paper, we cast the unsupervised metric learning
as a density estimation problem with a Parzen win-
dows estimator based on a Euclidean metric. Using
the maximum likelihood framework, we derive in Sec-
tion 3 an expectation-minimisation (EM) procedure
that maximizes the leave-one-out log-likelihood, which
may be considered as an unsupervised counterpart to
neighbourhood component analysis (NCA) [16]. As
opposed to PCA, which performs a whitening of the
data based on global information, our new algorithm
globally performs a whitening of the data using only
local information, hence the denomination local com-
ponent analysis (LCA).
Like all non-parametric density estimators, Parzen
windows density estimation is known to overfit in high
dimensions [25], and thus LCA should also overfit. In
order to keep the modelling flexibility of our density es-
timator while avoiding overfitting, we propose a semi-
parametric Parzen-Gaussian model; following [4], we
linearly transform then split our variables in two parts,
one which is modelled through a Parzen windows es-
timator (where we assume the interesting part of the
data lies), and one which is modelled as a multivari-
ate Gaussian (where we assume the noise lies). Again,
in Section 4, an EM procedure for estimating the lin-
ear transform may be naturally derived and leads to
simple closed-form updates based on matrix inversions
and eigenvalue decompositions. This procedure con-
tains no hyperparameters, all the parameters being
learnt from data.
Since the EM formulation of LCA scales quadratically
in the number of datapoints, making it impractical
for large datasets, we introduce in Section 5 both a
stochastic approximation and a subsampling technique
1
allowing us to achieve a linear cost and thus to scale
LCA to much larger datasets.
Finally, in Section 6, we show empirically that our
method leads to density estimators with higher test-
likelihoods than natural competing methods, and that
the metrics may be used within unsupervised learn-
ing techniques that rely on such metrics, like spectral
clustering.
2 Previous work
Many authors aimed at learning a Mahalanobis dis-
tance suited for local learning. While some techniques
required the presence of labelled data [16, 27, 2], oth-
ers proposed ways to learn the metric in a purely un-
supervised way, e.g., [28] who used the distance to the
k-th nearest neighbour as the local scaling around each
datapoint. Most of the other attempts at unsuper-
vised metric learning were developed in the context
of kernel density estimation, a.k.a. Parzen windows.
The Parzen windows estimator [21] is a nonparametric
density estimation model which, given n datapoints
{x1, . . . , xn}in Rd, defines a mixture model of the
form p(x) = 1
n
∑ n
j=1 K(x, xj , θ ) where K is a kernel
with compact support and parameters θ. We relax the
compact support assumption and choose K to be the
normal kernel, that is
p(x) = 1
n
n∑
j=1
N(x, xj , Σ)
∝ 1
n
√
|Σ |
n∑
j=1
exp
[
−1
2(x −xj )⊤Σ −1(x −xj )
]
,
where Σ is the covariance matrix of each Gaussian.
As the performance of the Parzen windows estimator
is more reliant on the covariance matrix than on the
kernel, there has been a large body of work, originating
from the statistics literature, attempting to learn this
matrix. However, almost all attempts are focused on
the asymptotic optimality of the estimators obtained
with little consideration for the practicality in high
dimensions. Thus, the vast majority of the work is
limited to isotropic matrices, reducing the problem to
finding a single scalar h [22, 13, 23, 9, 7, 20, 24], the
bandwidth, and the few extensions to the non-isotropic
cases are numerically expensive [14, 18].
An exception is the approach proposed in [26], which
is very similar to our method, as the authors learn the
covariance matrix of the Parzen windows estimator us-
ing local neighbourhoods. However, their algorithm
does not minimize a well-defined cost function, mak-
ing it unsuitable for kernels other than the Gaussian
one, and the locality used to compute the covariance
matrix depends on parameters which must be hand-
tuned or cross-validated. Also, the modelling of all
the dimensions using the Parzen windows estimator
makes the algorithm unsuitable when the data lie on
a high-dimensional manifold. In an extension to [26],
[3] uses a neural network to compute the leading eigen-
vectors of the local covariance matrix at every point
in the space, then uses these matrices to do density
estimation and classification. Despite the algorithm’s
impressive performance, it does not correspond to a
linear reparametrisation of the space and thus cannot
be used as a preprocessing step.
3 Local Component Analysis
Seeing the density as a mixture of Gaussians, one can
easily optimize the covariances using the EM algo-
rithm [12]. However, maximizing the standard log-
likelihood of the data would trivially lead to the degen-
erate solution where Σ goes to 0 to yield a sum of Dirac
distributions. One solution to that problem is to pe-
nalize some norm of the precision matrix to prevent it
from going to infinity. Another, more compelling, way
is to optimize the leave-one-out log-likelihood, where
the probability of each datapoint xi is computed un-
der the distribution obtained when xi has been re-
moved from the training set. This technique is not
new and has already been explored both in the su-
pervised [16, 15] and in the unsupervised setting [13].
However, in the latter case, the cross-validation was
then done by hand, which explains why only one band-
width parameter could be optimized 1. We will thus
use the following criterion:
L(Σ) = −
n∑
i=1
log
[ 1
n −1
∑
j̸=i
N(xi, x j , Σ)
]
(1)
≤cst −
n∑
i=1
∑
j̸=i
λij log N(xi, x j , Σ)
+
n∑
i=1
∑
j̸=i
λij log λij , (2)
with the constraints ∀i , ∑
j̸=i λij = 1. This varia-
tional bound is obtained using Jensen’s inequality.
The EM algorithm optimizes the right-hand side of
Eq. (2) by alternating between the optimisations of λ
and Σ in turn. The algorithm is guaranteed to con-
verge, and does so to a stationary point of the true
1Most of the literature on estimating the covariance matrix
discards the log-likelihood cost because of its sensitivit y to out-
liers and prefers AMISE (see, e.g., [14]). However, in all ou r
experiments, the number of datapoints was large enough so th at
LCA did not suffer from the presence of outliers.
2
function over Σ defined in Eq. (1). At each step, the
optimal solutions are:
λ∗
ij = N(xi, x j , Σ)
∑
k̸=i N(xi, x k, Σ) if j ̸= i (3)
λ∗
ii = 0 (4)
Σ ∗ =
∑
ij λij (xi −xj )(xi −xj )T
n . (5)
The “responsibilities” λ∗
ij define the relative proximity
of xj to xi (compared to the proximity of all the xk’s
to xi) and Σ ∗ is the average of all the local covariance
matrices.
This algorithm, which we coin LCA, for local compo-
nent analysis, transforms the data to make it locally
isotropic, as opposed to PCA which makes it glob-
ally isotropic. Fig. (1) shows a comparison of PCA
and LCA on the word sequence “To be or not to be”.
Whereas PCA is highly sensitive to the length of the
text, LCA is only affected by the local shapes, thus
providing a much less distorted result. 2
First, one may note at this point that Manifold Parzen
Windows [26] is equivalent to LCA with only one step
of EM. This makes Manifold Parzen Windows more
sensitive to the choice of the original covariance ma-
trix whose parameters must be carefully chosen. As we
shall see later in the experiments, running EM to con-
vergence is important to get good accuracy when using
spectral clustering on the transformed data. Second, it
is also worth noting that, similarly to Manifold Parzen
Windows, LCA can straightforwardly be extended to
the cases where each datapoint uses its own local co-
variance matrix (possibly with a smoothing term), or
where the covariance Σ ∗ is the sum of a low-rank ma-
trix and some scalar multiplied by the identity matrix.
Not only may LCA be used to learn a linear trans-
formation of the space, but it also defines a density
model. However, there are two potential negative as-
pects associated with this method. First, in high di-
mensions, Parzen windows is prone to overfitting and
must be regularized [25]. Second, if there are some
directions containing a small Gaussian noise, the local
isotropy will blow them up, swamping the data with
clutter. This is common to all the techniques which
renormalise the data by the inverse of some variance.
A solution to both of these issues is to consider a prod-
uct of two densities: one is a low-dimensional Parzen
windows estimator, which will model the interesting
signal, and the other is a Gaussian, which will model
the noise.
2Since both methods are insensitive to any linear
reparametrisation of the data, we do not include the origina l
data in the figure.
4 LCA with a multiplicative
Gaussian component
We now assume that there are irrelevant dimensions
in our data which can be modelled by a Gaussian. In
other words, we consider an invertible linear transfor-
mation ( BG, B L)⊤x of the data, modelling B⊤
G x as a
multivariate Gaussian and B⊤
L x through kernel density
estimation, the two parts being independent, leading
to p(x) ∝p(B⊤
G x, B ⊤
L x) = pG(B⊤
G x)pL(B⊤
L x), where
pG is a Gaussian and pL is the Parzen windows esti-
mator, i.e.,
p(xi) ∝
⏐
⏐BGB⊤
G + BLB⊤
L
⏐
⏐
1
2
n −1
×exp
[
−1
2(xi −µ)⊤BGB⊤
G (xi −µ)
]
×
∑
j̸=i
exp
[
−1
2(xi −xj )⊤BLB⊤
L (xi −xj )
]
,
with ( BG, B L) a full-rank square matrix. Using EM,
we can upper-bound the negative log-likelihood:
−2
∑
i
log p(xi) ≤tr(B⊤
G CGBG) + tr( B⊤
L CLBL)
−log |BGB⊤
G + BLB⊤
L |, (6)
with
CG = 1
n
∑
i
(xi −µ)(xi −µ)⊤ ,
CL = 1
n
∑
ij
λij (xi −xj )(xi −xj )⊤ .
The matrices BG and BL minimizing the right-hand
side of Eq. (6) may be found using the following propo-
sition (see proof in the appendix):
Proposition 1 Let BG ∈ Rd×d1 and BL ∈ Rd×d2 ,
with d = d1 + d2 and B = ( BG, B L) ∈Rd×d invertible.
Consider two symmetric positive matrices M1 and M2
in Rd×d. The problem
min
BG,B L
tr B⊤
G M1BG+tr B⊤
L M2BL−log det(BGB⊤
G +BLB⊤
L )
(7)
has a finite solution only if M1 and M2 are invertible
and, if these conditions are met, reaches its optimum
at
BG = M−1/ 2
1 U+ , B L = M−1/ 2
1 U−D−1/ 2
− ,
where U+ are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 as-
sociated with eigenvalues greater than or equal to 1,
U− are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 associated
3
Figure 1: Results obtained when transforming “To be or not to be” u sing PCA (left) and LCA (right). Left:
To make the data globally isotropic, PCA awkwardly compresses the le tters horizontally. Right: Since LCA is
insensitive to the spacing between letters and to the length of the t ext, there is no horizontal compression.
with eigenvalues smaller than 1 and D− is the diagonal
matrix containing the eigenvalues of M−1/ 2
1 M2M−1/ 2
1
smaller than 1.
The resulting procedure is described in Algorithm 1,
where all dimensions are initially modelled by the
Parzen windows estimator, which empirically yielded
the best results.
Algorithm 1 LCA - Gauss
Input: X (dataset), iterMax (maximum number of
iterations), ν (regularisation)
Output: BG (Gaussian part transformation), BL
(Parzen windows transformation)
CG ← cov(X) + νId {Initialize C to the global
covariance}
IG ←C
− 1
2
G
BG = 0 , B L = chol( C−1
G ) {Assign all dimensions to
the Parzen windows estimator }
for iter = 1:iterMax do
Mij ←exp
[
−(xi−xj )⊤B⊤
L BL(xi−xj )
2
]
, Mii ←0
λij ← Mij∑
k Mik
CL ←
∑
ij λ ij (xi−xj )(xi−xj )⊤
n + νId
[V, D ] ← eig(IGCLIG) {Eigendecomposition of
IGCLIG}
t1 = max z D(z, z ) ≤1 {Cut-off between eigenval-
ues smaller and larger than 1 }
t+ = {t|t1 ≤t ≤d}, t− = {t|1 ≤t < t 1}
V+ ← V (:, t +), V− ← V (:, t −), D− =
D(t−, t −)
BL = IGV−D−1/ 2
− , BG = IGV+
end for
Relationship with ICA. Independent component
analysis (ICA) can be seen as a density model where
x = As and s has independent components (see,
e.g., [17]). In the Parzen windows framework, this cor-
responds to modelling the density of s by a product of
univariate kernel density estimators [6]. This however
causes two problems: first, while this assumption is
appropriate in settings such as source separation, it is
violated in most settings, and having a multivariate
kernel density estimation is preferable. Second, most
algorithms are dedicated to finding independent com-
ponents which are non-Gaussian. In the presence of
more than one Gaussian dimension, most ICA frame-
works become unidentifiable, while our explicit mod-
elling of such Gaussian components allows us to tackle
this situation (a detailed analysis of the identifiability
of our Parzen/Gaussian model is out of the scope of
this paper).
Relationship with NGCA. NGCA [4] makes an
assumption similar to ours (they rather assume an
additive Gaussian noise on top of a low-dimensional
non-Gaussian signal) but uses a projection pursuit
algorithm to iteratively find the directions of non-
Gaussianity. Unlike in FastICA, the contrast functions
used to find the interesting directions can be different
for each direction. However, like all projection pur-
suit algorithms, the identification of interesting direc-
tions gets much harder in higher dimensions, as most
of them will be almost Gaussian. Our use of a non-
parametric density estimator with a log-likelihood cost
allows us to globally optimize all directions simultane-
ously and does not rely on the model being correct.
Finally, LCA estimates all its parameters from data
as opposed to NGCA which requires the number of
non-Gaussian directions to be set.
Escaping local optima. Though our model allows
for the modification of the number of dimensions mod-
elled by the Gaussian through the analysis of the spec-
trum of C−1/ 2
G CLC−1/ 2
G , it is sensitive to local optima.
It is for instance rare that a dimension modelled by
a Gaussian is switched to the Parzen windows estima-
tor. Even though the algorithm will more easily switch
from the Parzen windows estimator to the Gaussian
model, it will typically stop too early, that is model
many dimensions using the Parzen windows estimator
rather than the better Gaussian. To solve these issues,
we propose an alternate algorithm, LCA-Gauss-Red,
which explores the space of dimensions modelled by a
Gaussian more aggressively using a search algorithm,
namely:
1. We run the algorithm LCA - Gauss for a few it-
erations (40 in our experiments);
2. We then “transfer” some columns from BL (the
Parzen windows model) to BG (the Gaussian
4
model), and rerun LCA - Gauss using these new
matrices as initialisations;
3. We iterate step 2 using a dichotomic search of the
optimal number of dimensions modelled by the
Gaussian, until a local optimum is found;
4. Once we have a locally optimum number of di-
mensions modelled by the Gaussian model, we run
LCA - Gauss to convergence.
5 Speeding up LCA
Computing the local covariance matrix of the points
using Eq. (3), (4) and (5) has a complexity in O(dn2 +
d2n + d3), with d the dimensionality of the data and
n the number of training points. Since this is imprac-
tical for large datasets, we can resort to sampling to
keep the cost linear in the number of datapoints. We
may further use low-rank or diagonal approximation to
achieve a complexity which grows quadratically with
d instead of cubically.
5.1 Averaging a subset of the local co-
variance matrices
Instead of averaging the local covariances over all dat-
apoints, we may only average them over a subset of
datapoints. This estimator is unbiased and, if the lo-
cal covariance matrices are not too dissimilar, which
is the assumption underlying LCA, then its variance
should remain small. This is equivalent to using a
minibatch procedure: every time we have a new mini-
batch of size B, we compute its local covariance ˆCL,
which is then averaged with the previously computed
CL using
CL ←γ
B
n CL + (1 −γ
B
n ) ˆCL (8)
to yield the updated CL. The exponent B/n is so
that γ, the discount factor, determines the weight of
the old covariance matrix after an entire pass through
the data, which makes it insensitive to the particular
choice of batch size. As opposed to many such al-
gorithms where the choice of γ is critical as it helps
retaining the information of previous batches, the lo-
cality of the EM estimate makes it less so. However, if
the number of datapoints used to estimate CL is not
much larger than the dimension of the data, we need
to set a higher γ to avoid degenerate covariance ma-
trices. In simulations, we found that using a value of
γ = . 6 worked well. Similarly, the size of the mini-
batch influences only marginally the final result and
we found a value of 100 to be large enough.
5.2 Computing the local covariance
matrices using a subset of the dat-
apoints
Rather than using only a subset of local covariance ma-
trices, one may also wonder if using the entire dataset
to compute these matrices is necessary. Also, as the
number of datapoints grows, the chances of overfitting
increase. Thus, one may choose to use only a sub-
set of the datapoints to compute these matrices. This
will increase the local covariances, yielding a biased
estimate of the final result, but may also act as a reg-
ulariser. In practice, for very large datasets, one will
want the largest neighbourhood size while keeping the
computational cost tractable.
Denoting ni the number of locations at which we esti-
mate the local covariance and nj the number of neigh-
bours used to estimate this covariance, the cost per
update is now O(d2[ni + nj] + dninj + d3). Since only
nj should grow with n, this is linear in the total num-
ber of datapoints.
Though they may appear similar, these are not “land-
mark” techniques (see, e.g., [11]) as there is still one
Gaussian component per datapoint, and the ni data-
points around which we compute the local covariances
are randomly sampled at every iteration.
6 Experiments
LCA has three main properties: first, it transforms the
data to make it locally isotropic, thus being well-suited
for preprocessing the data before using a clustering
algorithm like spectral clustering; second, it extracts
relevant, non-Gaussian components in the data; third,
it provides us with a good density model through the
use of the Parzen windows estimator.
In the experiments, we will assess the performance of
the following algorithms: LCA, the original algorithm;
LCA-Gauss, using a multiplicative Gaussian compo-
nent, as described in Section 4; LCA-Gauss-Red, the
variant of LCA-Gauss using the more aggressive search
to find a better number of dimensions to be modelled
by the Gaussian component. The MATLAB code for
LCA, LCA-Gauss and LCA-Gauss-Red is available at
http://nicolas.le-roux.name/code.html.
6.1 Improving clustering methods
We first try to solve three clustering problems: one
for which the clusters are convex and the direc-
tion of interest does not have a Gaussian marginal
(Fig. (2), left), one for which the clusters are not con-
vex (Fig. (2), middle), and one for which the directions
5
of interest have almost Gaussian marginals (Fig. (2),
right). Following [1, 2], the data is progressively cor-
rupted by adding dimensions of white Gaussian noise,
then whitened. We compare here the clustering ac-
curacy, which is defined as 100
n minP tr(EP ) where E
is the confusion matrix and P is the set of permuta-
tions over cluster labels, obtained with the following
five techniques:
1. Spectral clustering (SC) [19] on the whitened data
(using the code of [8]);
2. SC on the projection on the first two components
found by FastICA using the best contrast function
and the correct number of components;
3. SC on the data transformed using the metric
learnt with LCA;
4. SC on the data transformed using the metric
learnt with the product of LCA and a Gaussian;
5. SC on the projection of the data found using
NGCA [4] with the correct number of compo-
nents.
Our choice of spectral clustering stems from its higher
clustering performance compared to K-means. Re-
sults are reported in Fig. (3). Because of the whiten-
ing, the Gaussian components in the first dataset are
shrunk along the direction containing information. As
a result, even with little noise added, the information
gets swamped and spectral clustering fails completely.
On the other hand, LCA and its variants are much
more robust to the presence of irrelevant dimensions.
Though NGCA works very well on the first dataset,
where there is only one relevant component, its per-
formance drops quickly when there are two relevant
components (note that, for all datasets, we provided
the true number of relevant dimensions as input to
NGCA). This is possibly due to the deflation proce-
dure which is not adapted when no single component
can be clearly identified in isolation. This is in contrast
with LCA and its variants which circumvent this issue,
thanks to their global optimisation procedure. Note
also that LCA-Gauss allows us to perform unsuper-
vised dimensionality reduction with the same perfor-
mance as previously proposed supervised algorithms
(e.g., [2]).
Figure (4) shows the clustering accuracy on the
three datasets for various numbers of EM iterations,
one iteration corresponding to Manifold Parzen Win-
dows [26] with a Gaussian kernel whose covariance ma-
trix is the data covariance kernel. As one can see, run-
ning the EM algorithm to convergence yields a signifi-
cant improvement in clustering accuracy. The perfor-
mance of Manifold Parzen Windows could likely have
been improved with a careful initialisation of the orig-
inal kernel, but this would have been at the expense
of the simplicity of the algorithm.
6.2 LCA as a density model
We now assess the quality of LCA as a density model.
We build a density model of the USPS digits dataset,
a 256-dimensional dataset of handwritten digits. We
compared several algorithms:
•An isotropic Parzen windows estimator with the
bandwidth estimated using LCA (replacing Σ ∗ of
Eq. (5) by λI so that the two matrices have the
same trace);
•A Parzen windows estimator with diagonal metric
(equal to the diagonal of Σ ∗ in Eq. (5);
•A Parzen windows estimator with the full metric
as obtained using LCA;
•A single Gaussian model;
•A product of a Gaussian and a Parzen windows
estimator (as described in Section 4).
The models were trained on a set of 2000 datapoints
and regularized by penalizing the trace of Σ −1 (in the
case of the last model, both covariance matrices, local
and global, were penalized). The regularisation pa-
rameter was optimized on a validation set of 1000 dat-
apoints. For the last model, the regularisation param-
eter of the global covariance was set to the one yielding
the best performance for the full Gaussian model on
the validation set. Thus, we only had to optimize the
regularisation parameter for the local covariance.
The final performance was then evaluated on a set of
3000 datapoints which had not been used for training
nor validation. We ran the experiment 20 times, ran-
domly selecting the training, validation and test set
each time.
Fig. (5) shows the mean and the standard error of the
negative log-likelihood on the test set. As one can see,
modelling all dimensions using the Parzen windows es-
timator leads to poor performance in high dimensions,
despite the regulariser and the leave-one-out criterion.
On the other hand, LCA-Gauss and LCA-Gauss-Red
clearly outperform all the other models, justifying our
choice of modelling some dimensions using a Gaussian.
Also, as opposed to the previous experiments, there is
no performance gain induced by the use of LCA-Gauss-
Red as opposed to LCA-Gauss, which we believe stems
from the fact that the switch from one model to the
other is easier to make when there are plenty of di-
mensions to choose from. The poor performance of
6
Figure 2: Noise-free data used to assess the robustness of K-means to noise. Left: mixture of two isotropic
Gaussians of unit variance and means [ −3, 0]⊤ and [3 , 0]⊤. Centre: two concentric circles with radii 1 and 2,
with added isotropic Gaussian noise of standard deviation . 1. Right: mixture of five Gaussians. The centre
cluster contains four times as many datapoints as the other ones.
0 20 40 6050
60
70
80
90
100
Noise dimensions
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Figure 3: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added. The error bars represent one
standard error. Left: mixture of isotropic Gaussians presented in Fig. (2) (left). Centre: two concentric circles
presented in Fig. (2) (centre). Right: mixture of five Gaussians pr esented in Fig. (2) (right).
0 20 40 6050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
Figure 4: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added and varying number of EM
iterations in the LCA algorithm (MPW = one iteration). The error bars represent one standard error. Left:
mixture of isotropic Gaussians presented in Fig. (2) (left). Centre : two concentric circles presented in Fig. (2)
(centre). Right: mixture of five Gaussians presented in Fig. (2) (r ight).
LCA-Full is a clear indication of the problems suffered
by Parzen windows in high dimensions.
6.3 Subsampling
We now evaluate the loss in performance incurred
by the use the subsampling procedure described in
Section 5, both on the train and test negative log-
7
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 6.43 ± 0.10 2.70 ± 0.06 − 0.10 ± 0.03 6.43 ± 0.10 2.80 ± 0.06 − 0.17 ± 0.02
B = 3000 6.58 ± 0.07 2.73 ± 0.05 − 0.06 ± 0.03 6.54 ± 0.07 2.80 ± 0.06 − 0.11 ± 0.02
B = 6000 6.22 ± 0.08 2.21 ± 0.03 0.00 ± 0.01 6.18 ± 0.07 1.98 ± 0.03 0.02 ± 0.02
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 2.12 ± 0.16 0.20 ± 0.08 0.65 ± 0.05 2.01 ± 0.17 0.07 ± 0.09 0.15 ± 0.03
B = 3000 2.11 ± 0.16 0.30 ± 0.07 0.46 ± 0.04 2.01 ± 0.17 0.16 ± 0.09 0.09 ± 0.03
B = 6000 1.54 ± 0.16 − 0.75 ± 0.07 − 0.01 ± 0.01 1.43 ± 0.15 − 1.07 ± 0.08 0.01 ± 0.02
Figure 6: Train (top) and test (bottom) negative log-likelihood differ ences induced by the use of smaller batch
and neighbourhood sizes compared to the original model ( γ = 0, B = 6000, N = 6000) for γ = 0 . 3 (left) and
γ = 0 . 6 (right). A negative value means better performance.
LCA - Isotropic 269. 78 ±0. 18
LCA - Diagonal 109. 59 ±0. 56
LCA - Full 32. 98 ±0. 35
Gaussian 32. 27 ±0. 36
LCA - Gauss 19. 09 ±0. 39
LCA - Gauss - Red 19. 09 ±0. 39
Figure 5: Test negative log-likelihood on the USPS
digits dataset, averaged over 20 runs.
likelihoods. For that purpose, we used the USPS digit
recognition dataset, which contains 8298 datapoints in
dimension 256, which we randomly split into a train-
ing set of n = 6000 datapoints, using the rest as the
test set. We tested the following hyperparameters:
•Discount factor γ = 0 . 3, 0. 6, 0. 9 ,
•Batch size B = 1000 , 3000, 6000 ,
•Neighbourhood size N = 1000 , 3000, 6000 .
Fig. (6) show the log-likelihood differences induced
by the use of smaller batch sizes and neighbourhood
sizes. For each set of hyperparameters, 20 experiments
were run using different training and test sets, and the
means and standard errors are reported. The results
for γ = 0 . 9 were very similar and are not included due
to space constraints.
Three observations may be made. First, reducing the
batchsize has little effect, except when γ is small. Sec-
ond, reducing the neighbourhood size has a regular-
izing effect at first but drastically hurts the perfor-
mance if reduced too much. Third, the value of γ, the
discount factor, has little influence, but larger values
proved to yield more consistent test performance, at
the expense of slower convergence. The consistency of
these results shows that it is safe to use subsampling
(with values of γ = 0 . 6, B = 100 and N = 3000, for
instance) especially if the training set is very large.
7 Conclusion
Despite its importance, the learning of local or global
metrics is usually an overseen step in many practical
algorithms. We have proposed an extension of the gen-
eral bandwidth selection problem to the multidimen-
sional case, with a generalisation to the case where sev-
eral components are Gaussian. Additionally, we pro-
posed an approximate scheme suited to large datasets
which allows to find a local optimum in linear time.
We believe LCA can be an important preprocessing
tool for algorithms relying on local distances, such as
manifold learning methods or many semi-supervised
algorithms. Another use would be to cast LCA within
the mean-shift algorithm, which finds the modes of the
Parzen windows estimator, in the context of image seg-
mentation [10]. In the future, we would like to extend
this model to the case where the metric is allowed to
vary with the position in space, to account for more
complex geometries in the dataset.
Acknowledgements
Nicolas Le Roux and Francis Bach are supported in
part by the European Research Council (SIERRA-
ERC-239993). We would also like to thank Warith
Harchaoui for its valuable input.
8
References
[1] F. Bach and Z. Harchaoui. Diffrac: a discrimi-
native and flexible framework for clustering. In
Advances in Neural Information Processing Sys-
tems 20 , 2007.
[2] F. Bach and M. I. Jordan. Learning spectral clus-
tering. In Advances in Neural Information Pro-
cessing Systems 16 , 2004.
[3] Y. Bengio, H. Larochelle, and P. Vincent. Non-
local manifold Parzen windows. In Advances in
Neural Information Processing Systems 18 , pages
115–122. MIT Press, 2006.
[4] G. Blanchard, M. Kawanabe, M. Sugiyama,
V. Spokoiny, and K.-R. M¨ uller. In search of non-
Gaussian components of a high-dimensional dis-
tribution. J. Mach. Learn. Res. , 7:247–282, De-
cember 2006.
[5] J.M. Borwein and A.S. Lewis. Convex analysis
and nonlinear optimization, theory and examples,
2000.
[6] R. Boscolo, H. Pan, and V.P. Roychowdhury.
Independent component analysis based on non-
parametric density estimation. Neural Networks,
IEEE Transactions on , 15(1):55–65, 2004.
[7] A. Bowman. An alternative method of cross-
validation for the smoothing of density estimates.
Biometrika, 71(2):pp. 353–360, 1984.
[8] W.-Y. Chen, Y. Song, H. Bai, C.-J. Lin, and E. Y.
Chang. Parallel spectral clustering in distributed
systems. IEEE Transactions on Pattern Analysis
and Machine Intelligence , 33(3):568–586, 2011.
[9] Y.-S. Chow, S. Geman, and L.-D. Wu. Consistent
cross-validated density estimation. The Annals of
Statistics, 11(1):pp. 25–38, 1983.
[10] D. Comaniciu and P. Meer. Mean shift: A robust
approach toward feature space analysis. IEEE
Transactions on Pattern Analysis and Machine
Intelligence, 24:603–619, 2002.
[11] V. De Silva and J.B. Tenenbaum. Sparse multi-
dimensional scaling using landmark points. Tech-
nology, pages 1–41, 2004.
[12] A. P. Dempster, N. M. Laird, and D. B. Rubin.
Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical
Society. Series B (Methodological) , 39(1):pp. 1–
38, 1977.
[13] R.P.W. Duin. On the choice of smoothing param-
eters for Parzen estimators of probability density
functions. Computers, IEEE Transactions on , C-
25(11):1175 –1179, 1976.
[14] T. Duong and M. Hazelton. Cross-validation
bandwidth matrices for multivariate kernel den-
sity estimation. Scandinavian Journal of Statis-
tics, 32(3):pp. 485–506, 2005.
[15] A. Globerson and S. Roweis. Metric learning
by collapsing classes. In Advances in Neural In-
formation Processing Systems , volume 18, pages
451–458. MIT Press, 2006.
[16] J. Goldberger, S. Roweis, G.E. Hinton, and
R. Salakhutdinov. Neighbourhood components
analysis. In Advances in Neural Information Pro-
cessing Systems 17 , 2004.
[17] A. Hyv¨ arinen, J. Karhunen, and E. Oja. Inde-
pendent component analysis . Wiley, New York,
2001.
[18] M. C. Jones and D. A. Henderson. Maximum
likelihood kernel density estimation: On the po-
tential of convolution sieves. Comput. Stat. Data
Anal., 53:3726–3733, August 2009.
[19] A. Ng, M. I. Jordan, and Y. Weiss. On spectral
clustering: Analysis and an algorithm. In Ad-
vances in Neural Information Processing Systems
14, 2001.
[20] B. Park and J. S. Marron. Comparison of data-
driven bandwidth selectors. Journal of the Amer-
ican Statistical Association , 85(409):pp. 66–72,
1990.
[21] E. Parzen. On estimation of a probability density
function and mode. The Annals of Mathematical
Statistics, 33(3):pp. 1065–1076, 1962.
[22] M. Rosenblatt. Remarks on some nonparametric
estimates of a density function. The Annals of
Mathematical Statistics , 27(3):pp. 832–837, 1956.
[23] M. Rudemo. Empirical choice of histograms and
kernel density estimators. Scandinavian Journal
of Statistics , 9(2):pp. 65–78, 1982.
[24] S. J. Sheather and M. C. Jones. A reliable data-
based bandwidth selection method for kernel den-
sity estimation. Journal of the Royal Statistical
Society. Series B (Methodological) , 53(3):pp. 683–
690, 1991.
[25] B. W. Silverman. Density estimation for statistics
and data analysis. 1986.
9
[26] P. Vincent and Y. Bengio. Manifold Parzen win-
dows. In Advances in Neural Information Pro-
cessing Systems 15 , pages 825–832. MIT Press,
2002.
[27] E. Xing, A. Ng, M. I. Jordan, and S. Russell. Dis-
tance metric learning with application to cluster-
ing with side-information. In Advances in Neural
Information Processing Systems 14 , 2002.
[28] L. Zelnik-Manor and P. Perona. Self-tuning spec-
tral clustering. In Advances in Neural Informa-
tion Processing Systems 17 , 2004.
Appendix
We prove here Proposition 1.
Proof If M1 is singular, then the minimum value is
−∞, because we can have B⊤
G M1BG bounded while
BGB⊤
G tends to + ∞(for example, if d1 = 1, and u1 is
such that M1u1 = 0, select BG = λu1 with λ →+∞).
The reasoning is similar for M2.
We thus assume that M1 and M2 are invert-
ible. We consider the eigendecomposition of
M−1/ 2
1 M2M−1/ 2
1 = U Diag(e)U⊤, which corresponds
to the generalized eigendecomposition of the pair
(M1, M 2).
Denoting A2 = U⊤M1/ 2
1 BL and A1 = U⊤M1/ 2
1 BG,
we have:
tr B⊤
G M1BG + tr B⊤
L M2BL −log det(BGB⊤
G + BLB⊤
L )
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2
−log det(A1A⊤
1 + A2A⊤
2 ) + log det M1
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2)
−log det(A⊤
1 (I −A2(A⊤
2 A2)−1A⊤
2 )A1) + log det M1 .
By taking derivatives with respect to A1, we get
A1 = ( I −Π 2)A1(A⊤
1 (I −Π 2)A1)−1 , (9)
with Π 2 = A2(A⊤
2 A2)−1A⊤
2 . By left-multiplying both
sides of Eq. (9) by A⊤
2 , we obtain
A⊤
2 A1 = 0 .
By left-multiplying by A⊤
1 , we get
A⊤
1 A1 = I .
Thus, we now need to minimize with respect to A2 the
following cost function
d1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2) + log det M1
Let s be the vector of singular values of A2, ordered in
decreasing order and let the ei be ordered in increasing
order. We have:
tr Diag(e)A2A⊤
2 = −tr(−Diag(e)A2A⊤
2 ) ⩾
∑
i
eis2
i ,
with equality if and only if the eigenvectors of A2A⊤
2
are aligned with the ones of Diag( e) (the −ei being
also in decreasing order) (Theorem 1.2.1, [5]).
Thus, we have A2A⊤
2 = diag( s)2 with only d2 non-
zero elements in s. Let J2 be the index of non zero-
elements. We thus need to minimize
d1 + log det M1 +
∑
j∈J2
(ej s2
j −log s2
j ) ,
with optimum s2
j = e−1
j and value:
d1 + d2 + log det M1 +
∑
j∈J2
log ej .
Thus, we need to take J2 corresponding to the
smallest eigenvalues ej. If we also optimize with
respect to d2, then J2 must only contain the elements
smaller than 1.
10
|
Nicolas Le Roux, Francis Bach
|
Unknown
| 2,013
|
{"id": "mLr3In-nbamNu", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1357918200000, "tmdate": 1357918200000, "ddate": null, "number": 64, "content": {"title": "Local Component Analysis", "decision": "conferencePoster-iclr2013-conference", "abstract": "Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.", "pdf": "https://arxiv.org/abs/1109.0093", "paperhash": "roux|local_component_analysis", "keywords": [], "conflicts": [], "authors": ["Nicolas Le Roux", "Francis Bach"], "authorids": ["nicolas.le.roux@gmail.com", "francis.bach@gmail.com"]}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["nicolas.le.roux@gmail.com"], "writers": []}
|
[Review]:
Summary of contributions:
1. The paper proposed an unsupervised local component analysis (LCA) framework that estimates the Parzen window covariance via maximizing the leave-one-out density. The basic algorithm is an EM procedure with closed form updates.
2. One further extension of LCA was introduced, which assumes two multiplicative densities, one is Parzen window (non Gaussian) and the other is a global Gaussian distribution.
3. Algorithms was designed to scale up the algorithms to large data sets.
Assessment of novelty and quality:
The work looks quite reasonable. But the approach seems to be a bit straightforward. The work is perhaps not very deep or inspiring.
My major concern is, other than the described problem setting being tackled, mostly toy problems, I don't see the significance of the work for addressing major machine learning challenges. For example, the authors argued the approach might be a good preprocessing step, but in the experiments, there is nothing like improving machine learning (e.g. classification) via such a pre-processing of data.
It's disappointing to see that the authors didn't study the identifiability of the Parzen/Gaussian model. Addressing this issue should have been a good chance to show some depth of the research.
|
anonymous reviewer 18ca
| null | null |
{"id": "iGfW_jMjFAoZQ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362428640000, "tmdate": 1362428640000, "ddate": null, "number": 3, "content": {"title": "review of Local Component Analysis", "review": "Summary of contributions:\r\n1. The paper proposed an unsupervised local component analysis (LCA) framework that estimates the Parzen window covariance via maximizing the leave-one-out density. The basic algorithm is an EM procedure with closed form updates. \r\n\r\n2. One further extension of LCA was introduced, which assumes two multiplicative densities, one is Parzen window (non Gaussian) and the other is a global Gaussian distribution. \r\n\r\n3. Algorithms was designed to scale up the algorithms to large data sets. \r\n\r\nAssessment of novelty and quality:\r\nThe work looks quite reasonable. But the approach seems to be a bit straightforward. The work is perhaps not very deep or inspiring. \r\n\r\nMy major concern is, other than the described problem setting being tackled, mostly toy problems, I don't see the significance of the work for addressing major machine learning challenges. For example, the authors argued the approach might be a good preprocessing step, but in the experiments, there is nothing like improving machine learning (e.g. classification) via such a pre-processing of data. \r\n\r\nIt's disappointing to see that the authors didn't study the identifiability of the Parzen/Gaussian model. Addressing this issue should have been a good chance to show some depth of the research."}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "mLr3In-nbamNu", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 18ca"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 0,
"importance_and_relevance": 3,
"materials_and_methods": 7,
"praise": 4,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 1,
"total": 15
}
| 1.266667
| 1.203537
| 0.06313
| 1.280802
| 0.165221
| 0.014135
| 0.266667
| 0
| 0.2
| 0.466667
| 0.266667
| 0
| 0
| 0.066667
|
{
"criticism": 0.26666666666666666,
"example": 0,
"importance_and_relevance": 0.2,
"materials_and_methods": 0.4666666666666667,
"praise": 0.26666666666666666,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.06666666666666667
}
| 1.266667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
mLr3In-nbamNu
|
Local Component Analysis
|
Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.
|
arXiv:1109.0093v4 [cs.LG] 10 Dec 2012
Local Component Analysis
Nicolas Le Roux
nicolas@le-roux.name
Francis Bach
francis.bach@ens.fr
INRIA - SIERRA Project - Team
Laboratoire d’Informatique de l’ ´Ecole Normale Sup´ erieure
Paris, France
Abstract
Kernel density estimation, a.k.a. Parzen windows, is
a popular density estimation method, which can be
used for outlier detection or clustering. With mul-
tivariate data, its performance is heavily reliant on
the metric used within the kernel. Most earlier work
has focused on learning only the bandwidth of the
kernel (i.e., a scalar multiplicative factor). In this
paper, we propose to learn a full Euclidean metric
through an expectation-minimisation (EM) procedure,
which can be seen as an unsupervised counterpart to
neighbourhood component analysis (NCA). In order
to avoid overfitting with a fully nonparametric den-
sity estimator in high dimensions, we also consider
a semi-parametric Gaussian-Parzen density model,
where some of the variables are modelled through a
jointly Gaussian density, while others are modelled
through Parzen windows. For these two models, EM
leads to simple closed-form updates based on matrix
inversions and eigenvalue decompositions. We show
empirically that our method leads to density estima-
tors with higher test-likelihoods than natural compet-
ing methods, and that the metrics may be used within
most unsupervised learning techniques that rely on lo-
cal distances, such as spectral clustering or manifold
learning methods. Finally, we present a stochastic ap-
proximation scheme which allows for the use of this
method in a large-scale setting.
1 Introduction
Most unsupervised learning methods rely on a metric
on the space of observations. The quality of the met-
ric directly impacts the performance of such techniques
and a significant amount of work has been dedicated to
learning this metric from data when some supervised
information is available [27, 16, 2]. However, in a fully
unsupervised scenario, most practitioners use the Ma-
halanobis distance obtained from principal component
analysis (PCA). This is an unsatisfactory solution as
PCA is essentially a global linear dimension reduction
method, while most unsupervised learning techniques,
such as spectral clustering or manifold learning, are
local.
In this paper, we cast the unsupervised metric learning
as a density estimation problem with a Parzen win-
dows estimator based on a Euclidean metric. Using
the maximum likelihood framework, we derive in Sec-
tion 3 an expectation-minimisation (EM) procedure
that maximizes the leave-one-out log-likelihood, which
may be considered as an unsupervised counterpart to
neighbourhood component analysis (NCA) [16]. As
opposed to PCA, which performs a whitening of the
data based on global information, our new algorithm
globally performs a whitening of the data using only
local information, hence the denomination local com-
ponent analysis (LCA).
Like all non-parametric density estimators, Parzen
windows density estimation is known to overfit in high
dimensions [25], and thus LCA should also overfit. In
order to keep the modelling flexibility of our density es-
timator while avoiding overfitting, we propose a semi-
parametric Parzen-Gaussian model; following [4], we
linearly transform then split our variables in two parts,
one which is modelled through a Parzen windows es-
timator (where we assume the interesting part of the
data lies), and one which is modelled as a multivari-
ate Gaussian (where we assume the noise lies). Again,
in Section 4, an EM procedure for estimating the lin-
ear transform may be naturally derived and leads to
simple closed-form updates based on matrix inversions
and eigenvalue decompositions. This procedure con-
tains no hyperparameters, all the parameters being
learnt from data.
Since the EM formulation of LCA scales quadratically
in the number of datapoints, making it impractical
for large datasets, we introduce in Section 5 both a
stochastic approximation and a subsampling technique
1
allowing us to achieve a linear cost and thus to scale
LCA to much larger datasets.
Finally, in Section 6, we show empirically that our
method leads to density estimators with higher test-
likelihoods than natural competing methods, and that
the metrics may be used within unsupervised learn-
ing techniques that rely on such metrics, like spectral
clustering.
2 Previous work
Many authors aimed at learning a Mahalanobis dis-
tance suited for local learning. While some techniques
required the presence of labelled data [16, 27, 2], oth-
ers proposed ways to learn the metric in a purely un-
supervised way, e.g., [28] who used the distance to the
k-th nearest neighbour as the local scaling around each
datapoint. Most of the other attempts at unsuper-
vised metric learning were developed in the context
of kernel density estimation, a.k.a. Parzen windows.
The Parzen windows estimator [21] is a nonparametric
density estimation model which, given n datapoints
{x1, . . . , xn}in Rd, defines a mixture model of the
form p(x) = 1
n
∑ n
j=1 K(x, xj , θ ) where K is a kernel
with compact support and parameters θ. We relax the
compact support assumption and choose K to be the
normal kernel, that is
p(x) = 1
n
n∑
j=1
N(x, xj , Σ)
∝ 1
n
√
|Σ |
n∑
j=1
exp
[
−1
2(x −xj )⊤Σ −1(x −xj )
]
,
where Σ is the covariance matrix of each Gaussian.
As the performance of the Parzen windows estimator
is more reliant on the covariance matrix than on the
kernel, there has been a large body of work, originating
from the statistics literature, attempting to learn this
matrix. However, almost all attempts are focused on
the asymptotic optimality of the estimators obtained
with little consideration for the practicality in high
dimensions. Thus, the vast majority of the work is
limited to isotropic matrices, reducing the problem to
finding a single scalar h [22, 13, 23, 9, 7, 20, 24], the
bandwidth, and the few extensions to the non-isotropic
cases are numerically expensive [14, 18].
An exception is the approach proposed in [26], which
is very similar to our method, as the authors learn the
covariance matrix of the Parzen windows estimator us-
ing local neighbourhoods. However, their algorithm
does not minimize a well-defined cost function, mak-
ing it unsuitable for kernels other than the Gaussian
one, and the locality used to compute the covariance
matrix depends on parameters which must be hand-
tuned or cross-validated. Also, the modelling of all
the dimensions using the Parzen windows estimator
makes the algorithm unsuitable when the data lie on
a high-dimensional manifold. In an extension to [26],
[3] uses a neural network to compute the leading eigen-
vectors of the local covariance matrix at every point
in the space, then uses these matrices to do density
estimation and classification. Despite the algorithm’s
impressive performance, it does not correspond to a
linear reparametrisation of the space and thus cannot
be used as a preprocessing step.
3 Local Component Analysis
Seeing the density as a mixture of Gaussians, one can
easily optimize the covariances using the EM algo-
rithm [12]. However, maximizing the standard log-
likelihood of the data would trivially lead to the degen-
erate solution where Σ goes to 0 to yield a sum of Dirac
distributions. One solution to that problem is to pe-
nalize some norm of the precision matrix to prevent it
from going to infinity. Another, more compelling, way
is to optimize the leave-one-out log-likelihood, where
the probability of each datapoint xi is computed un-
der the distribution obtained when xi has been re-
moved from the training set. This technique is not
new and has already been explored both in the su-
pervised [16, 15] and in the unsupervised setting [13].
However, in the latter case, the cross-validation was
then done by hand, which explains why only one band-
width parameter could be optimized 1. We will thus
use the following criterion:
L(Σ) = −
n∑
i=1
log
[ 1
n −1
∑
j̸=i
N(xi, x j , Σ)
]
(1)
≤cst −
n∑
i=1
∑
j̸=i
λij log N(xi, x j , Σ)
+
n∑
i=1
∑
j̸=i
λij log λij , (2)
with the constraints ∀i , ∑
j̸=i λij = 1. This varia-
tional bound is obtained using Jensen’s inequality.
The EM algorithm optimizes the right-hand side of
Eq. (2) by alternating between the optimisations of λ
and Σ in turn. The algorithm is guaranteed to con-
verge, and does so to a stationary point of the true
1Most of the literature on estimating the covariance matrix
discards the log-likelihood cost because of its sensitivit y to out-
liers and prefers AMISE (see, e.g., [14]). However, in all ou r
experiments, the number of datapoints was large enough so th at
LCA did not suffer from the presence of outliers.
2
function over Σ defined in Eq. (1). At each step, the
optimal solutions are:
λ∗
ij = N(xi, x j , Σ)
∑
k̸=i N(xi, x k, Σ) if j ̸= i (3)
λ∗
ii = 0 (4)
Σ ∗ =
∑
ij λij (xi −xj )(xi −xj )T
n . (5)
The “responsibilities” λ∗
ij define the relative proximity
of xj to xi (compared to the proximity of all the xk’s
to xi) and Σ ∗ is the average of all the local covariance
matrices.
This algorithm, which we coin LCA, for local compo-
nent analysis, transforms the data to make it locally
isotropic, as opposed to PCA which makes it glob-
ally isotropic. Fig. (1) shows a comparison of PCA
and LCA on the word sequence “To be or not to be”.
Whereas PCA is highly sensitive to the length of the
text, LCA is only affected by the local shapes, thus
providing a much less distorted result. 2
First, one may note at this point that Manifold Parzen
Windows [26] is equivalent to LCA with only one step
of EM. This makes Manifold Parzen Windows more
sensitive to the choice of the original covariance ma-
trix whose parameters must be carefully chosen. As we
shall see later in the experiments, running EM to con-
vergence is important to get good accuracy when using
spectral clustering on the transformed data. Second, it
is also worth noting that, similarly to Manifold Parzen
Windows, LCA can straightforwardly be extended to
the cases where each datapoint uses its own local co-
variance matrix (possibly with a smoothing term), or
where the covariance Σ ∗ is the sum of a low-rank ma-
trix and some scalar multiplied by the identity matrix.
Not only may LCA be used to learn a linear trans-
formation of the space, but it also defines a density
model. However, there are two potential negative as-
pects associated with this method. First, in high di-
mensions, Parzen windows is prone to overfitting and
must be regularized [25]. Second, if there are some
directions containing a small Gaussian noise, the local
isotropy will blow them up, swamping the data with
clutter. This is common to all the techniques which
renormalise the data by the inverse of some variance.
A solution to both of these issues is to consider a prod-
uct of two densities: one is a low-dimensional Parzen
windows estimator, which will model the interesting
signal, and the other is a Gaussian, which will model
the noise.
2Since both methods are insensitive to any linear
reparametrisation of the data, we do not include the origina l
data in the figure.
4 LCA with a multiplicative
Gaussian component
We now assume that there are irrelevant dimensions
in our data which can be modelled by a Gaussian. In
other words, we consider an invertible linear transfor-
mation ( BG, B L)⊤x of the data, modelling B⊤
G x as a
multivariate Gaussian and B⊤
L x through kernel density
estimation, the two parts being independent, leading
to p(x) ∝p(B⊤
G x, B ⊤
L x) = pG(B⊤
G x)pL(B⊤
L x), where
pG is a Gaussian and pL is the Parzen windows esti-
mator, i.e.,
p(xi) ∝
⏐
⏐BGB⊤
G + BLB⊤
L
⏐
⏐
1
2
n −1
×exp
[
−1
2(xi −µ)⊤BGB⊤
G (xi −µ)
]
×
∑
j̸=i
exp
[
−1
2(xi −xj )⊤BLB⊤
L (xi −xj )
]
,
with ( BG, B L) a full-rank square matrix. Using EM,
we can upper-bound the negative log-likelihood:
−2
∑
i
log p(xi) ≤tr(B⊤
G CGBG) + tr( B⊤
L CLBL)
−log |BGB⊤
G + BLB⊤
L |, (6)
with
CG = 1
n
∑
i
(xi −µ)(xi −µ)⊤ ,
CL = 1
n
∑
ij
λij (xi −xj )(xi −xj )⊤ .
The matrices BG and BL minimizing the right-hand
side of Eq. (6) may be found using the following propo-
sition (see proof in the appendix):
Proposition 1 Let BG ∈ Rd×d1 and BL ∈ Rd×d2 ,
with d = d1 + d2 and B = ( BG, B L) ∈Rd×d invertible.
Consider two symmetric positive matrices M1 and M2
in Rd×d. The problem
min
BG,B L
tr B⊤
G M1BG+tr B⊤
L M2BL−log det(BGB⊤
G +BLB⊤
L )
(7)
has a finite solution only if M1 and M2 are invertible
and, if these conditions are met, reaches its optimum
at
BG = M−1/ 2
1 U+ , B L = M−1/ 2
1 U−D−1/ 2
− ,
where U+ are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 as-
sociated with eigenvalues greater than or equal to 1,
U− are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 associated
3
Figure 1: Results obtained when transforming “To be or not to be” u sing PCA (left) and LCA (right). Left:
To make the data globally isotropic, PCA awkwardly compresses the le tters horizontally. Right: Since LCA is
insensitive to the spacing between letters and to the length of the t ext, there is no horizontal compression.
with eigenvalues smaller than 1 and D− is the diagonal
matrix containing the eigenvalues of M−1/ 2
1 M2M−1/ 2
1
smaller than 1.
The resulting procedure is described in Algorithm 1,
where all dimensions are initially modelled by the
Parzen windows estimator, which empirically yielded
the best results.
Algorithm 1 LCA - Gauss
Input: X (dataset), iterMax (maximum number of
iterations), ν (regularisation)
Output: BG (Gaussian part transformation), BL
(Parzen windows transformation)
CG ← cov(X) + νId {Initialize C to the global
covariance}
IG ←C
− 1
2
G
BG = 0 , B L = chol( C−1
G ) {Assign all dimensions to
the Parzen windows estimator }
for iter = 1:iterMax do
Mij ←exp
[
−(xi−xj )⊤B⊤
L BL(xi−xj )
2
]
, Mii ←0
λij ← Mij∑
k Mik
CL ←
∑
ij λ ij (xi−xj )(xi−xj )⊤
n + νId
[V, D ] ← eig(IGCLIG) {Eigendecomposition of
IGCLIG}
t1 = max z D(z, z ) ≤1 {Cut-off between eigenval-
ues smaller and larger than 1 }
t+ = {t|t1 ≤t ≤d}, t− = {t|1 ≤t < t 1}
V+ ← V (:, t +), V− ← V (:, t −), D− =
D(t−, t −)
BL = IGV−D−1/ 2
− , BG = IGV+
end for
Relationship with ICA. Independent component
analysis (ICA) can be seen as a density model where
x = As and s has independent components (see,
e.g., [17]). In the Parzen windows framework, this cor-
responds to modelling the density of s by a product of
univariate kernel density estimators [6]. This however
causes two problems: first, while this assumption is
appropriate in settings such as source separation, it is
violated in most settings, and having a multivariate
kernel density estimation is preferable. Second, most
algorithms are dedicated to finding independent com-
ponents which are non-Gaussian. In the presence of
more than one Gaussian dimension, most ICA frame-
works become unidentifiable, while our explicit mod-
elling of such Gaussian components allows us to tackle
this situation (a detailed analysis of the identifiability
of our Parzen/Gaussian model is out of the scope of
this paper).
Relationship with NGCA. NGCA [4] makes an
assumption similar to ours (they rather assume an
additive Gaussian noise on top of a low-dimensional
non-Gaussian signal) but uses a projection pursuit
algorithm to iteratively find the directions of non-
Gaussianity. Unlike in FastICA, the contrast functions
used to find the interesting directions can be different
for each direction. However, like all projection pur-
suit algorithms, the identification of interesting direc-
tions gets much harder in higher dimensions, as most
of them will be almost Gaussian. Our use of a non-
parametric density estimator with a log-likelihood cost
allows us to globally optimize all directions simultane-
ously and does not rely on the model being correct.
Finally, LCA estimates all its parameters from data
as opposed to NGCA which requires the number of
non-Gaussian directions to be set.
Escaping local optima. Though our model allows
for the modification of the number of dimensions mod-
elled by the Gaussian through the analysis of the spec-
trum of C−1/ 2
G CLC−1/ 2
G , it is sensitive to local optima.
It is for instance rare that a dimension modelled by
a Gaussian is switched to the Parzen windows estima-
tor. Even though the algorithm will more easily switch
from the Parzen windows estimator to the Gaussian
model, it will typically stop too early, that is model
many dimensions using the Parzen windows estimator
rather than the better Gaussian. To solve these issues,
we propose an alternate algorithm, LCA-Gauss-Red,
which explores the space of dimensions modelled by a
Gaussian more aggressively using a search algorithm,
namely:
1. We run the algorithm LCA - Gauss for a few it-
erations (40 in our experiments);
2. We then “transfer” some columns from BL (the
Parzen windows model) to BG (the Gaussian
4
model), and rerun LCA - Gauss using these new
matrices as initialisations;
3. We iterate step 2 using a dichotomic search of the
optimal number of dimensions modelled by the
Gaussian, until a local optimum is found;
4. Once we have a locally optimum number of di-
mensions modelled by the Gaussian model, we run
LCA - Gauss to convergence.
5 Speeding up LCA
Computing the local covariance matrix of the points
using Eq. (3), (4) and (5) has a complexity in O(dn2 +
d2n + d3), with d the dimensionality of the data and
n the number of training points. Since this is imprac-
tical for large datasets, we can resort to sampling to
keep the cost linear in the number of datapoints. We
may further use low-rank or diagonal approximation to
achieve a complexity which grows quadratically with
d instead of cubically.
5.1 Averaging a subset of the local co-
variance matrices
Instead of averaging the local covariances over all dat-
apoints, we may only average them over a subset of
datapoints. This estimator is unbiased and, if the lo-
cal covariance matrices are not too dissimilar, which
is the assumption underlying LCA, then its variance
should remain small. This is equivalent to using a
minibatch procedure: every time we have a new mini-
batch of size B, we compute its local covariance ˆCL,
which is then averaged with the previously computed
CL using
CL ←γ
B
n CL + (1 −γ
B
n ) ˆCL (8)
to yield the updated CL. The exponent B/n is so
that γ, the discount factor, determines the weight of
the old covariance matrix after an entire pass through
the data, which makes it insensitive to the particular
choice of batch size. As opposed to many such al-
gorithms where the choice of γ is critical as it helps
retaining the information of previous batches, the lo-
cality of the EM estimate makes it less so. However, if
the number of datapoints used to estimate CL is not
much larger than the dimension of the data, we need
to set a higher γ to avoid degenerate covariance ma-
trices. In simulations, we found that using a value of
γ = . 6 worked well. Similarly, the size of the mini-
batch influences only marginally the final result and
we found a value of 100 to be large enough.
5.2 Computing the local covariance
matrices using a subset of the dat-
apoints
Rather than using only a subset of local covariance ma-
trices, one may also wonder if using the entire dataset
to compute these matrices is necessary. Also, as the
number of datapoints grows, the chances of overfitting
increase. Thus, one may choose to use only a sub-
set of the datapoints to compute these matrices. This
will increase the local covariances, yielding a biased
estimate of the final result, but may also act as a reg-
ulariser. In practice, for very large datasets, one will
want the largest neighbourhood size while keeping the
computational cost tractable.
Denoting ni the number of locations at which we esti-
mate the local covariance and nj the number of neigh-
bours used to estimate this covariance, the cost per
update is now O(d2[ni + nj] + dninj + d3). Since only
nj should grow with n, this is linear in the total num-
ber of datapoints.
Though they may appear similar, these are not “land-
mark” techniques (see, e.g., [11]) as there is still one
Gaussian component per datapoint, and the ni data-
points around which we compute the local covariances
are randomly sampled at every iteration.
6 Experiments
LCA has three main properties: first, it transforms the
data to make it locally isotropic, thus being well-suited
for preprocessing the data before using a clustering
algorithm like spectral clustering; second, it extracts
relevant, non-Gaussian components in the data; third,
it provides us with a good density model through the
use of the Parzen windows estimator.
In the experiments, we will assess the performance of
the following algorithms: LCA, the original algorithm;
LCA-Gauss, using a multiplicative Gaussian compo-
nent, as described in Section 4; LCA-Gauss-Red, the
variant of LCA-Gauss using the more aggressive search
to find a better number of dimensions to be modelled
by the Gaussian component. The MATLAB code for
LCA, LCA-Gauss and LCA-Gauss-Red is available at
http://nicolas.le-roux.name/code.html.
6.1 Improving clustering methods
We first try to solve three clustering problems: one
for which the clusters are convex and the direc-
tion of interest does not have a Gaussian marginal
(Fig. (2), left), one for which the clusters are not con-
vex (Fig. (2), middle), and one for which the directions
5
of interest have almost Gaussian marginals (Fig. (2),
right). Following [1, 2], the data is progressively cor-
rupted by adding dimensions of white Gaussian noise,
then whitened. We compare here the clustering ac-
curacy, which is defined as 100
n minP tr(EP ) where E
is the confusion matrix and P is the set of permuta-
tions over cluster labels, obtained with the following
five techniques:
1. Spectral clustering (SC) [19] on the whitened data
(using the code of [8]);
2. SC on the projection on the first two components
found by FastICA using the best contrast function
and the correct number of components;
3. SC on the data transformed using the metric
learnt with LCA;
4. SC on the data transformed using the metric
learnt with the product of LCA and a Gaussian;
5. SC on the projection of the data found using
NGCA [4] with the correct number of compo-
nents.
Our choice of spectral clustering stems from its higher
clustering performance compared to K-means. Re-
sults are reported in Fig. (3). Because of the whiten-
ing, the Gaussian components in the first dataset are
shrunk along the direction containing information. As
a result, even with little noise added, the information
gets swamped and spectral clustering fails completely.
On the other hand, LCA and its variants are much
more robust to the presence of irrelevant dimensions.
Though NGCA works very well on the first dataset,
where there is only one relevant component, its per-
formance drops quickly when there are two relevant
components (note that, for all datasets, we provided
the true number of relevant dimensions as input to
NGCA). This is possibly due to the deflation proce-
dure which is not adapted when no single component
can be clearly identified in isolation. This is in contrast
with LCA and its variants which circumvent this issue,
thanks to their global optimisation procedure. Note
also that LCA-Gauss allows us to perform unsuper-
vised dimensionality reduction with the same perfor-
mance as previously proposed supervised algorithms
(e.g., [2]).
Figure (4) shows the clustering accuracy on the
three datasets for various numbers of EM iterations,
one iteration corresponding to Manifold Parzen Win-
dows [26] with a Gaussian kernel whose covariance ma-
trix is the data covariance kernel. As one can see, run-
ning the EM algorithm to convergence yields a signifi-
cant improvement in clustering accuracy. The perfor-
mance of Manifold Parzen Windows could likely have
been improved with a careful initialisation of the orig-
inal kernel, but this would have been at the expense
of the simplicity of the algorithm.
6.2 LCA as a density model
We now assess the quality of LCA as a density model.
We build a density model of the USPS digits dataset,
a 256-dimensional dataset of handwritten digits. We
compared several algorithms:
•An isotropic Parzen windows estimator with the
bandwidth estimated using LCA (replacing Σ ∗ of
Eq. (5) by λI so that the two matrices have the
same trace);
•A Parzen windows estimator with diagonal metric
(equal to the diagonal of Σ ∗ in Eq. (5);
•A Parzen windows estimator with the full metric
as obtained using LCA;
•A single Gaussian model;
•A product of a Gaussian and a Parzen windows
estimator (as described in Section 4).
The models were trained on a set of 2000 datapoints
and regularized by penalizing the trace of Σ −1 (in the
case of the last model, both covariance matrices, local
and global, were penalized). The regularisation pa-
rameter was optimized on a validation set of 1000 dat-
apoints. For the last model, the regularisation param-
eter of the global covariance was set to the one yielding
the best performance for the full Gaussian model on
the validation set. Thus, we only had to optimize the
regularisation parameter for the local covariance.
The final performance was then evaluated on a set of
3000 datapoints which had not been used for training
nor validation. We ran the experiment 20 times, ran-
domly selecting the training, validation and test set
each time.
Fig. (5) shows the mean and the standard error of the
negative log-likelihood on the test set. As one can see,
modelling all dimensions using the Parzen windows es-
timator leads to poor performance in high dimensions,
despite the regulariser and the leave-one-out criterion.
On the other hand, LCA-Gauss and LCA-Gauss-Red
clearly outperform all the other models, justifying our
choice of modelling some dimensions using a Gaussian.
Also, as opposed to the previous experiments, there is
no performance gain induced by the use of LCA-Gauss-
Red as opposed to LCA-Gauss, which we believe stems
from the fact that the switch from one model to the
other is easier to make when there are plenty of di-
mensions to choose from. The poor performance of
6
Figure 2: Noise-free data used to assess the robustness of K-means to noise. Left: mixture of two isotropic
Gaussians of unit variance and means [ −3, 0]⊤ and [3 , 0]⊤. Centre: two concentric circles with radii 1 and 2,
with added isotropic Gaussian noise of standard deviation . 1. Right: mixture of five Gaussians. The centre
cluster contains four times as many datapoints as the other ones.
0 20 40 6050
60
70
80
90
100
Noise dimensions
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Figure 3: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added. The error bars represent one
standard error. Left: mixture of isotropic Gaussians presented in Fig. (2) (left). Centre: two concentric circles
presented in Fig. (2) (centre). Right: mixture of five Gaussians pr esented in Fig. (2) (right).
0 20 40 6050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
Figure 4: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added and varying number of EM
iterations in the LCA algorithm (MPW = one iteration). The error bars represent one standard error. Left:
mixture of isotropic Gaussians presented in Fig. (2) (left). Centre : two concentric circles presented in Fig. (2)
(centre). Right: mixture of five Gaussians presented in Fig. (2) (r ight).
LCA-Full is a clear indication of the problems suffered
by Parzen windows in high dimensions.
6.3 Subsampling
We now evaluate the loss in performance incurred
by the use the subsampling procedure described in
Section 5, both on the train and test negative log-
7
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 6.43 ± 0.10 2.70 ± 0.06 − 0.10 ± 0.03 6.43 ± 0.10 2.80 ± 0.06 − 0.17 ± 0.02
B = 3000 6.58 ± 0.07 2.73 ± 0.05 − 0.06 ± 0.03 6.54 ± 0.07 2.80 ± 0.06 − 0.11 ± 0.02
B = 6000 6.22 ± 0.08 2.21 ± 0.03 0.00 ± 0.01 6.18 ± 0.07 1.98 ± 0.03 0.02 ± 0.02
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 2.12 ± 0.16 0.20 ± 0.08 0.65 ± 0.05 2.01 ± 0.17 0.07 ± 0.09 0.15 ± 0.03
B = 3000 2.11 ± 0.16 0.30 ± 0.07 0.46 ± 0.04 2.01 ± 0.17 0.16 ± 0.09 0.09 ± 0.03
B = 6000 1.54 ± 0.16 − 0.75 ± 0.07 − 0.01 ± 0.01 1.43 ± 0.15 − 1.07 ± 0.08 0.01 ± 0.02
Figure 6: Train (top) and test (bottom) negative log-likelihood differ ences induced by the use of smaller batch
and neighbourhood sizes compared to the original model ( γ = 0, B = 6000, N = 6000) for γ = 0 . 3 (left) and
γ = 0 . 6 (right). A negative value means better performance.
LCA - Isotropic 269. 78 ±0. 18
LCA - Diagonal 109. 59 ±0. 56
LCA - Full 32. 98 ±0. 35
Gaussian 32. 27 ±0. 36
LCA - Gauss 19. 09 ±0. 39
LCA - Gauss - Red 19. 09 ±0. 39
Figure 5: Test negative log-likelihood on the USPS
digits dataset, averaged over 20 runs.
likelihoods. For that purpose, we used the USPS digit
recognition dataset, which contains 8298 datapoints in
dimension 256, which we randomly split into a train-
ing set of n = 6000 datapoints, using the rest as the
test set. We tested the following hyperparameters:
•Discount factor γ = 0 . 3, 0. 6, 0. 9 ,
•Batch size B = 1000 , 3000, 6000 ,
•Neighbourhood size N = 1000 , 3000, 6000 .
Fig. (6) show the log-likelihood differences induced
by the use of smaller batch sizes and neighbourhood
sizes. For each set of hyperparameters, 20 experiments
were run using different training and test sets, and the
means and standard errors are reported. The results
for γ = 0 . 9 were very similar and are not included due
to space constraints.
Three observations may be made. First, reducing the
batchsize has little effect, except when γ is small. Sec-
ond, reducing the neighbourhood size has a regular-
izing effect at first but drastically hurts the perfor-
mance if reduced too much. Third, the value of γ, the
discount factor, has little influence, but larger values
proved to yield more consistent test performance, at
the expense of slower convergence. The consistency of
these results shows that it is safe to use subsampling
(with values of γ = 0 . 6, B = 100 and N = 3000, for
instance) especially if the training set is very large.
7 Conclusion
Despite its importance, the learning of local or global
metrics is usually an overseen step in many practical
algorithms. We have proposed an extension of the gen-
eral bandwidth selection problem to the multidimen-
sional case, with a generalisation to the case where sev-
eral components are Gaussian. Additionally, we pro-
posed an approximate scheme suited to large datasets
which allows to find a local optimum in linear time.
We believe LCA can be an important preprocessing
tool for algorithms relying on local distances, such as
manifold learning methods or many semi-supervised
algorithms. Another use would be to cast LCA within
the mean-shift algorithm, which finds the modes of the
Parzen windows estimator, in the context of image seg-
mentation [10]. In the future, we would like to extend
this model to the case where the metric is allowed to
vary with the position in space, to account for more
complex geometries in the dataset.
Acknowledgements
Nicolas Le Roux and Francis Bach are supported in
part by the European Research Council (SIERRA-
ERC-239993). We would also like to thank Warith
Harchaoui for its valuable input.
8
References
[1] F. Bach and Z. Harchaoui. Diffrac: a discrimi-
native and flexible framework for clustering. In
Advances in Neural Information Processing Sys-
tems 20 , 2007.
[2] F. Bach and M. I. Jordan. Learning spectral clus-
tering. In Advances in Neural Information Pro-
cessing Systems 16 , 2004.
[3] Y. Bengio, H. Larochelle, and P. Vincent. Non-
local manifold Parzen windows. In Advances in
Neural Information Processing Systems 18 , pages
115–122. MIT Press, 2006.
[4] G. Blanchard, M. Kawanabe, M. Sugiyama,
V. Spokoiny, and K.-R. M¨ uller. In search of non-
Gaussian components of a high-dimensional dis-
tribution. J. Mach. Learn. Res. , 7:247–282, De-
cember 2006.
[5] J.M. Borwein and A.S. Lewis. Convex analysis
and nonlinear optimization, theory and examples,
2000.
[6] R. Boscolo, H. Pan, and V.P. Roychowdhury.
Independent component analysis based on non-
parametric density estimation. Neural Networks,
IEEE Transactions on , 15(1):55–65, 2004.
[7] A. Bowman. An alternative method of cross-
validation for the smoothing of density estimates.
Biometrika, 71(2):pp. 353–360, 1984.
[8] W.-Y. Chen, Y. Song, H. Bai, C.-J. Lin, and E. Y.
Chang. Parallel spectral clustering in distributed
systems. IEEE Transactions on Pattern Analysis
and Machine Intelligence , 33(3):568–586, 2011.
[9] Y.-S. Chow, S. Geman, and L.-D. Wu. Consistent
cross-validated density estimation. The Annals of
Statistics, 11(1):pp. 25–38, 1983.
[10] D. Comaniciu and P. Meer. Mean shift: A robust
approach toward feature space analysis. IEEE
Transactions on Pattern Analysis and Machine
Intelligence, 24:603–619, 2002.
[11] V. De Silva and J.B. Tenenbaum. Sparse multi-
dimensional scaling using landmark points. Tech-
nology, pages 1–41, 2004.
[12] A. P. Dempster, N. M. Laird, and D. B. Rubin.
Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical
Society. Series B (Methodological) , 39(1):pp. 1–
38, 1977.
[13] R.P.W. Duin. On the choice of smoothing param-
eters for Parzen estimators of probability density
functions. Computers, IEEE Transactions on , C-
25(11):1175 –1179, 1976.
[14] T. Duong and M. Hazelton. Cross-validation
bandwidth matrices for multivariate kernel den-
sity estimation. Scandinavian Journal of Statis-
tics, 32(3):pp. 485–506, 2005.
[15] A. Globerson and S. Roweis. Metric learning
by collapsing classes. In Advances in Neural In-
formation Processing Systems , volume 18, pages
451–458. MIT Press, 2006.
[16] J. Goldberger, S. Roweis, G.E. Hinton, and
R. Salakhutdinov. Neighbourhood components
analysis. In Advances in Neural Information Pro-
cessing Systems 17 , 2004.
[17] A. Hyv¨ arinen, J. Karhunen, and E. Oja. Inde-
pendent component analysis . Wiley, New York,
2001.
[18] M. C. Jones and D. A. Henderson. Maximum
likelihood kernel density estimation: On the po-
tential of convolution sieves. Comput. Stat. Data
Anal., 53:3726–3733, August 2009.
[19] A. Ng, M. I. Jordan, and Y. Weiss. On spectral
clustering: Analysis and an algorithm. In Ad-
vances in Neural Information Processing Systems
14, 2001.
[20] B. Park and J. S. Marron. Comparison of data-
driven bandwidth selectors. Journal of the Amer-
ican Statistical Association , 85(409):pp. 66–72,
1990.
[21] E. Parzen. On estimation of a probability density
function and mode. The Annals of Mathematical
Statistics, 33(3):pp. 1065–1076, 1962.
[22] M. Rosenblatt. Remarks on some nonparametric
estimates of a density function. The Annals of
Mathematical Statistics , 27(3):pp. 832–837, 1956.
[23] M. Rudemo. Empirical choice of histograms and
kernel density estimators. Scandinavian Journal
of Statistics , 9(2):pp. 65–78, 1982.
[24] S. J. Sheather and M. C. Jones. A reliable data-
based bandwidth selection method for kernel den-
sity estimation. Journal of the Royal Statistical
Society. Series B (Methodological) , 53(3):pp. 683–
690, 1991.
[25] B. W. Silverman. Density estimation for statistics
and data analysis. 1986.
9
[26] P. Vincent and Y. Bengio. Manifold Parzen win-
dows. In Advances in Neural Information Pro-
cessing Systems 15 , pages 825–832. MIT Press,
2002.
[27] E. Xing, A. Ng, M. I. Jordan, and S. Russell. Dis-
tance metric learning with application to cluster-
ing with side-information. In Advances in Neural
Information Processing Systems 14 , 2002.
[28] L. Zelnik-Manor and P. Perona. Self-tuning spec-
tral clustering. In Advances in Neural Informa-
tion Processing Systems 17 , 2004.
Appendix
We prove here Proposition 1.
Proof If M1 is singular, then the minimum value is
−∞, because we can have B⊤
G M1BG bounded while
BGB⊤
G tends to + ∞(for example, if d1 = 1, and u1 is
such that M1u1 = 0, select BG = λu1 with λ →+∞).
The reasoning is similar for M2.
We thus assume that M1 and M2 are invert-
ible. We consider the eigendecomposition of
M−1/ 2
1 M2M−1/ 2
1 = U Diag(e)U⊤, which corresponds
to the generalized eigendecomposition of the pair
(M1, M 2).
Denoting A2 = U⊤M1/ 2
1 BL and A1 = U⊤M1/ 2
1 BG,
we have:
tr B⊤
G M1BG + tr B⊤
L M2BL −log det(BGB⊤
G + BLB⊤
L )
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2
−log det(A1A⊤
1 + A2A⊤
2 ) + log det M1
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2)
−log det(A⊤
1 (I −A2(A⊤
2 A2)−1A⊤
2 )A1) + log det M1 .
By taking derivatives with respect to A1, we get
A1 = ( I −Π 2)A1(A⊤
1 (I −Π 2)A1)−1 , (9)
with Π 2 = A2(A⊤
2 A2)−1A⊤
2 . By left-multiplying both
sides of Eq. (9) by A⊤
2 , we obtain
A⊤
2 A1 = 0 .
By left-multiplying by A⊤
1 , we get
A⊤
1 A1 = I .
Thus, we now need to minimize with respect to A2 the
following cost function
d1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2) + log det M1
Let s be the vector of singular values of A2, ordered in
decreasing order and let the ei be ordered in increasing
order. We have:
tr Diag(e)A2A⊤
2 = −tr(−Diag(e)A2A⊤
2 ) ⩾
∑
i
eis2
i ,
with equality if and only if the eigenvectors of A2A⊤
2
are aligned with the ones of Diag( e) (the −ei being
also in decreasing order) (Theorem 1.2.1, [5]).
Thus, we have A2A⊤
2 = diag( s)2 with only d2 non-
zero elements in s. Let J2 be the index of non zero-
elements. We thus need to minimize
d1 + log det M1 +
∑
j∈J2
(ej s2
j −log s2
j ) ,
with optimum s2
j = e−1
j and value:
d1 + d2 + log det M1 +
∑
j∈J2
log ej .
Thus, we need to take J2 corresponding to the
smallest eigenvalues ej. If we also optimize with
respect to d2, then J2 must only contain the elements
smaller than 1.
10
|
Nicolas Le Roux, Francis Bach
|
Unknown
| 2,013
|
{"id": "mLr3In-nbamNu", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1357918200000, "tmdate": 1357918200000, "ddate": null, "number": 64, "content": {"title": "Local Component Analysis", "decision": "conferencePoster-iclr2013-conference", "abstract": "Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.", "pdf": "https://arxiv.org/abs/1109.0093", "paperhash": "roux|local_component_analysis", "keywords": [], "conflicts": [], "authors": ["Nicolas Le Roux", "Francis Bach"], "authorids": ["nicolas.le.roux@gmail.com", "francis.bach@gmail.com"]}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["nicolas.le.roux@gmail.com"], "writers": []}
|
[Review]:
First, we would like to thank the reviewers for their comments.
The main complaint was that the experiments were limited to toy problems. Since it is always hard to evaluate unsupervised learning algorithms (what is the metric of performance), the experiments were designed as a proof of concept. Hence, we agree with the reviewers and would love to see LCA tried and evaluated on real problems.
For the comment about the required modifications to avoid overfitting, there is truly only one parameter to set, i.e., the lambda parameter. All the others can easily be set to default values.
|
Nicolas Le Roux, Francis Bach
| null | null |
{"id": "c2pVc0PtwzcEK", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1364253000000, "tmdate": 1364253000000, "ddate": null, "number": 1, "content": {"title": "", "review": "First, we would like to thank the reviewers for their comments.\r\n\r\nThe main complaint was that the experiments were limited to toy problems. Since it is always hard to evaluate unsupervised learning algorithms (what is the metric of performance), the experiments were designed as a proof of concept. Hence, we agree with the reviewers and would love to see LCA tried and evaluated on real problems.\r\n\r\nFor the comment about the required modifications to avoid overfitting, there is truly only one parameter to set, i.e., the lambda parameter. All the others can easily be set to default values."}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "mLr3In-nbamNu", "readers": ["everyone"], "nonreaders": [], "signatures": ["Nicolas Le Roux, Francis Bach"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 4,
"praise": 1,
"presentation_and_reporting": 1,
"results_and_discussion": 0,
"suggestion_and_solution": 2,
"total": 6
}
| 1.5
| 0.726661
| 0.773339
| 1.506837
| 0.124281
| 0.006837
| 0.166667
| 0
| 0
| 0.666667
| 0.166667
| 0.166667
| 0
| 0.333333
|
{
"criticism": 0.16666666666666666,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.6666666666666666,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0.16666666666666666,
"results_and_discussion": 0,
"suggestion_and_solution": 0.3333333333333333
}
| 1.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
mLr3In-nbamNu
|
Local Component Analysis
|
Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.
|
arXiv:1109.0093v4 [cs.LG] 10 Dec 2012
Local Component Analysis
Nicolas Le Roux
nicolas@le-roux.name
Francis Bach
francis.bach@ens.fr
INRIA - SIERRA Project - Team
Laboratoire d’Informatique de l’ ´Ecole Normale Sup´ erieure
Paris, France
Abstract
Kernel density estimation, a.k.a. Parzen windows, is
a popular density estimation method, which can be
used for outlier detection or clustering. With mul-
tivariate data, its performance is heavily reliant on
the metric used within the kernel. Most earlier work
has focused on learning only the bandwidth of the
kernel (i.e., a scalar multiplicative factor). In this
paper, we propose to learn a full Euclidean metric
through an expectation-minimisation (EM) procedure,
which can be seen as an unsupervised counterpart to
neighbourhood component analysis (NCA). In order
to avoid overfitting with a fully nonparametric den-
sity estimator in high dimensions, we also consider
a semi-parametric Gaussian-Parzen density model,
where some of the variables are modelled through a
jointly Gaussian density, while others are modelled
through Parzen windows. For these two models, EM
leads to simple closed-form updates based on matrix
inversions and eigenvalue decompositions. We show
empirically that our method leads to density estima-
tors with higher test-likelihoods than natural compet-
ing methods, and that the metrics may be used within
most unsupervised learning techniques that rely on lo-
cal distances, such as spectral clustering or manifold
learning methods. Finally, we present a stochastic ap-
proximation scheme which allows for the use of this
method in a large-scale setting.
1 Introduction
Most unsupervised learning methods rely on a metric
on the space of observations. The quality of the met-
ric directly impacts the performance of such techniques
and a significant amount of work has been dedicated to
learning this metric from data when some supervised
information is available [27, 16, 2]. However, in a fully
unsupervised scenario, most practitioners use the Ma-
halanobis distance obtained from principal component
analysis (PCA). This is an unsatisfactory solution as
PCA is essentially a global linear dimension reduction
method, while most unsupervised learning techniques,
such as spectral clustering or manifold learning, are
local.
In this paper, we cast the unsupervised metric learning
as a density estimation problem with a Parzen win-
dows estimator based on a Euclidean metric. Using
the maximum likelihood framework, we derive in Sec-
tion 3 an expectation-minimisation (EM) procedure
that maximizes the leave-one-out log-likelihood, which
may be considered as an unsupervised counterpart to
neighbourhood component analysis (NCA) [16]. As
opposed to PCA, which performs a whitening of the
data based on global information, our new algorithm
globally performs a whitening of the data using only
local information, hence the denomination local com-
ponent analysis (LCA).
Like all non-parametric density estimators, Parzen
windows density estimation is known to overfit in high
dimensions [25], and thus LCA should also overfit. In
order to keep the modelling flexibility of our density es-
timator while avoiding overfitting, we propose a semi-
parametric Parzen-Gaussian model; following [4], we
linearly transform then split our variables in two parts,
one which is modelled through a Parzen windows es-
timator (where we assume the interesting part of the
data lies), and one which is modelled as a multivari-
ate Gaussian (where we assume the noise lies). Again,
in Section 4, an EM procedure for estimating the lin-
ear transform may be naturally derived and leads to
simple closed-form updates based on matrix inversions
and eigenvalue decompositions. This procedure con-
tains no hyperparameters, all the parameters being
learnt from data.
Since the EM formulation of LCA scales quadratically
in the number of datapoints, making it impractical
for large datasets, we introduce in Section 5 both a
stochastic approximation and a subsampling technique
1
allowing us to achieve a linear cost and thus to scale
LCA to much larger datasets.
Finally, in Section 6, we show empirically that our
method leads to density estimators with higher test-
likelihoods than natural competing methods, and that
the metrics may be used within unsupervised learn-
ing techniques that rely on such metrics, like spectral
clustering.
2 Previous work
Many authors aimed at learning a Mahalanobis dis-
tance suited for local learning. While some techniques
required the presence of labelled data [16, 27, 2], oth-
ers proposed ways to learn the metric in a purely un-
supervised way, e.g., [28] who used the distance to the
k-th nearest neighbour as the local scaling around each
datapoint. Most of the other attempts at unsuper-
vised metric learning were developed in the context
of kernel density estimation, a.k.a. Parzen windows.
The Parzen windows estimator [21] is a nonparametric
density estimation model which, given n datapoints
{x1, . . . , xn}in Rd, defines a mixture model of the
form p(x) = 1
n
∑ n
j=1 K(x, xj , θ ) where K is a kernel
with compact support and parameters θ. We relax the
compact support assumption and choose K to be the
normal kernel, that is
p(x) = 1
n
n∑
j=1
N(x, xj , Σ)
∝ 1
n
√
|Σ |
n∑
j=1
exp
[
−1
2(x −xj )⊤Σ −1(x −xj )
]
,
where Σ is the covariance matrix of each Gaussian.
As the performance of the Parzen windows estimator
is more reliant on the covariance matrix than on the
kernel, there has been a large body of work, originating
from the statistics literature, attempting to learn this
matrix. However, almost all attempts are focused on
the asymptotic optimality of the estimators obtained
with little consideration for the practicality in high
dimensions. Thus, the vast majority of the work is
limited to isotropic matrices, reducing the problem to
finding a single scalar h [22, 13, 23, 9, 7, 20, 24], the
bandwidth, and the few extensions to the non-isotropic
cases are numerically expensive [14, 18].
An exception is the approach proposed in [26], which
is very similar to our method, as the authors learn the
covariance matrix of the Parzen windows estimator us-
ing local neighbourhoods. However, their algorithm
does not minimize a well-defined cost function, mak-
ing it unsuitable for kernels other than the Gaussian
one, and the locality used to compute the covariance
matrix depends on parameters which must be hand-
tuned or cross-validated. Also, the modelling of all
the dimensions using the Parzen windows estimator
makes the algorithm unsuitable when the data lie on
a high-dimensional manifold. In an extension to [26],
[3] uses a neural network to compute the leading eigen-
vectors of the local covariance matrix at every point
in the space, then uses these matrices to do density
estimation and classification. Despite the algorithm’s
impressive performance, it does not correspond to a
linear reparametrisation of the space and thus cannot
be used as a preprocessing step.
3 Local Component Analysis
Seeing the density as a mixture of Gaussians, one can
easily optimize the covariances using the EM algo-
rithm [12]. However, maximizing the standard log-
likelihood of the data would trivially lead to the degen-
erate solution where Σ goes to 0 to yield a sum of Dirac
distributions. One solution to that problem is to pe-
nalize some norm of the precision matrix to prevent it
from going to infinity. Another, more compelling, way
is to optimize the leave-one-out log-likelihood, where
the probability of each datapoint xi is computed un-
der the distribution obtained when xi has been re-
moved from the training set. This technique is not
new and has already been explored both in the su-
pervised [16, 15] and in the unsupervised setting [13].
However, in the latter case, the cross-validation was
then done by hand, which explains why only one band-
width parameter could be optimized 1. We will thus
use the following criterion:
L(Σ) = −
n∑
i=1
log
[ 1
n −1
∑
j̸=i
N(xi, x j , Σ)
]
(1)
≤cst −
n∑
i=1
∑
j̸=i
λij log N(xi, x j , Σ)
+
n∑
i=1
∑
j̸=i
λij log λij , (2)
with the constraints ∀i , ∑
j̸=i λij = 1. This varia-
tional bound is obtained using Jensen’s inequality.
The EM algorithm optimizes the right-hand side of
Eq. (2) by alternating between the optimisations of λ
and Σ in turn. The algorithm is guaranteed to con-
verge, and does so to a stationary point of the true
1Most of the literature on estimating the covariance matrix
discards the log-likelihood cost because of its sensitivit y to out-
liers and prefers AMISE (see, e.g., [14]). However, in all ou r
experiments, the number of datapoints was large enough so th at
LCA did not suffer from the presence of outliers.
2
function over Σ defined in Eq. (1). At each step, the
optimal solutions are:
λ∗
ij = N(xi, x j , Σ)
∑
k̸=i N(xi, x k, Σ) if j ̸= i (3)
λ∗
ii = 0 (4)
Σ ∗ =
∑
ij λij (xi −xj )(xi −xj )T
n . (5)
The “responsibilities” λ∗
ij define the relative proximity
of xj to xi (compared to the proximity of all the xk’s
to xi) and Σ ∗ is the average of all the local covariance
matrices.
This algorithm, which we coin LCA, for local compo-
nent analysis, transforms the data to make it locally
isotropic, as opposed to PCA which makes it glob-
ally isotropic. Fig. (1) shows a comparison of PCA
and LCA on the word sequence “To be or not to be”.
Whereas PCA is highly sensitive to the length of the
text, LCA is only affected by the local shapes, thus
providing a much less distorted result. 2
First, one may note at this point that Manifold Parzen
Windows [26] is equivalent to LCA with only one step
of EM. This makes Manifold Parzen Windows more
sensitive to the choice of the original covariance ma-
trix whose parameters must be carefully chosen. As we
shall see later in the experiments, running EM to con-
vergence is important to get good accuracy when using
spectral clustering on the transformed data. Second, it
is also worth noting that, similarly to Manifold Parzen
Windows, LCA can straightforwardly be extended to
the cases where each datapoint uses its own local co-
variance matrix (possibly with a smoothing term), or
where the covariance Σ ∗ is the sum of a low-rank ma-
trix and some scalar multiplied by the identity matrix.
Not only may LCA be used to learn a linear trans-
formation of the space, but it also defines a density
model. However, there are two potential negative as-
pects associated with this method. First, in high di-
mensions, Parzen windows is prone to overfitting and
must be regularized [25]. Second, if there are some
directions containing a small Gaussian noise, the local
isotropy will blow them up, swamping the data with
clutter. This is common to all the techniques which
renormalise the data by the inverse of some variance.
A solution to both of these issues is to consider a prod-
uct of two densities: one is a low-dimensional Parzen
windows estimator, which will model the interesting
signal, and the other is a Gaussian, which will model
the noise.
2Since both methods are insensitive to any linear
reparametrisation of the data, we do not include the origina l
data in the figure.
4 LCA with a multiplicative
Gaussian component
We now assume that there are irrelevant dimensions
in our data which can be modelled by a Gaussian. In
other words, we consider an invertible linear transfor-
mation ( BG, B L)⊤x of the data, modelling B⊤
G x as a
multivariate Gaussian and B⊤
L x through kernel density
estimation, the two parts being independent, leading
to p(x) ∝p(B⊤
G x, B ⊤
L x) = pG(B⊤
G x)pL(B⊤
L x), where
pG is a Gaussian and pL is the Parzen windows esti-
mator, i.e.,
p(xi) ∝
⏐
⏐BGB⊤
G + BLB⊤
L
⏐
⏐
1
2
n −1
×exp
[
−1
2(xi −µ)⊤BGB⊤
G (xi −µ)
]
×
∑
j̸=i
exp
[
−1
2(xi −xj )⊤BLB⊤
L (xi −xj )
]
,
with ( BG, B L) a full-rank square matrix. Using EM,
we can upper-bound the negative log-likelihood:
−2
∑
i
log p(xi) ≤tr(B⊤
G CGBG) + tr( B⊤
L CLBL)
−log |BGB⊤
G + BLB⊤
L |, (6)
with
CG = 1
n
∑
i
(xi −µ)(xi −µ)⊤ ,
CL = 1
n
∑
ij
λij (xi −xj )(xi −xj )⊤ .
The matrices BG and BL minimizing the right-hand
side of Eq. (6) may be found using the following propo-
sition (see proof in the appendix):
Proposition 1 Let BG ∈ Rd×d1 and BL ∈ Rd×d2 ,
with d = d1 + d2 and B = ( BG, B L) ∈Rd×d invertible.
Consider two symmetric positive matrices M1 and M2
in Rd×d. The problem
min
BG,B L
tr B⊤
G M1BG+tr B⊤
L M2BL−log det(BGB⊤
G +BLB⊤
L )
(7)
has a finite solution only if M1 and M2 are invertible
and, if these conditions are met, reaches its optimum
at
BG = M−1/ 2
1 U+ , B L = M−1/ 2
1 U−D−1/ 2
− ,
where U+ are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 as-
sociated with eigenvalues greater than or equal to 1,
U− are the eigenvectors of M−1/ 2
1 M2M−1/ 2
1 associated
3
Figure 1: Results obtained when transforming “To be or not to be” u sing PCA (left) and LCA (right). Left:
To make the data globally isotropic, PCA awkwardly compresses the le tters horizontally. Right: Since LCA is
insensitive to the spacing between letters and to the length of the t ext, there is no horizontal compression.
with eigenvalues smaller than 1 and D− is the diagonal
matrix containing the eigenvalues of M−1/ 2
1 M2M−1/ 2
1
smaller than 1.
The resulting procedure is described in Algorithm 1,
where all dimensions are initially modelled by the
Parzen windows estimator, which empirically yielded
the best results.
Algorithm 1 LCA - Gauss
Input: X (dataset), iterMax (maximum number of
iterations), ν (regularisation)
Output: BG (Gaussian part transformation), BL
(Parzen windows transformation)
CG ← cov(X) + νId {Initialize C to the global
covariance}
IG ←C
− 1
2
G
BG = 0 , B L = chol( C−1
G ) {Assign all dimensions to
the Parzen windows estimator }
for iter = 1:iterMax do
Mij ←exp
[
−(xi−xj )⊤B⊤
L BL(xi−xj )
2
]
, Mii ←0
λij ← Mij∑
k Mik
CL ←
∑
ij λ ij (xi−xj )(xi−xj )⊤
n + νId
[V, D ] ← eig(IGCLIG) {Eigendecomposition of
IGCLIG}
t1 = max z D(z, z ) ≤1 {Cut-off between eigenval-
ues smaller and larger than 1 }
t+ = {t|t1 ≤t ≤d}, t− = {t|1 ≤t < t 1}
V+ ← V (:, t +), V− ← V (:, t −), D− =
D(t−, t −)
BL = IGV−D−1/ 2
− , BG = IGV+
end for
Relationship with ICA. Independent component
analysis (ICA) can be seen as a density model where
x = As and s has independent components (see,
e.g., [17]). In the Parzen windows framework, this cor-
responds to modelling the density of s by a product of
univariate kernel density estimators [6]. This however
causes two problems: first, while this assumption is
appropriate in settings such as source separation, it is
violated in most settings, and having a multivariate
kernel density estimation is preferable. Second, most
algorithms are dedicated to finding independent com-
ponents which are non-Gaussian. In the presence of
more than one Gaussian dimension, most ICA frame-
works become unidentifiable, while our explicit mod-
elling of such Gaussian components allows us to tackle
this situation (a detailed analysis of the identifiability
of our Parzen/Gaussian model is out of the scope of
this paper).
Relationship with NGCA. NGCA [4] makes an
assumption similar to ours (they rather assume an
additive Gaussian noise on top of a low-dimensional
non-Gaussian signal) but uses a projection pursuit
algorithm to iteratively find the directions of non-
Gaussianity. Unlike in FastICA, the contrast functions
used to find the interesting directions can be different
for each direction. However, like all projection pur-
suit algorithms, the identification of interesting direc-
tions gets much harder in higher dimensions, as most
of them will be almost Gaussian. Our use of a non-
parametric density estimator with a log-likelihood cost
allows us to globally optimize all directions simultane-
ously and does not rely on the model being correct.
Finally, LCA estimates all its parameters from data
as opposed to NGCA which requires the number of
non-Gaussian directions to be set.
Escaping local optima. Though our model allows
for the modification of the number of dimensions mod-
elled by the Gaussian through the analysis of the spec-
trum of C−1/ 2
G CLC−1/ 2
G , it is sensitive to local optima.
It is for instance rare that a dimension modelled by
a Gaussian is switched to the Parzen windows estima-
tor. Even though the algorithm will more easily switch
from the Parzen windows estimator to the Gaussian
model, it will typically stop too early, that is model
many dimensions using the Parzen windows estimator
rather than the better Gaussian. To solve these issues,
we propose an alternate algorithm, LCA-Gauss-Red,
which explores the space of dimensions modelled by a
Gaussian more aggressively using a search algorithm,
namely:
1. We run the algorithm LCA - Gauss for a few it-
erations (40 in our experiments);
2. We then “transfer” some columns from BL (the
Parzen windows model) to BG (the Gaussian
4
model), and rerun LCA - Gauss using these new
matrices as initialisations;
3. We iterate step 2 using a dichotomic search of the
optimal number of dimensions modelled by the
Gaussian, until a local optimum is found;
4. Once we have a locally optimum number of di-
mensions modelled by the Gaussian model, we run
LCA - Gauss to convergence.
5 Speeding up LCA
Computing the local covariance matrix of the points
using Eq. (3), (4) and (5) has a complexity in O(dn2 +
d2n + d3), with d the dimensionality of the data and
n the number of training points. Since this is imprac-
tical for large datasets, we can resort to sampling to
keep the cost linear in the number of datapoints. We
may further use low-rank or diagonal approximation to
achieve a complexity which grows quadratically with
d instead of cubically.
5.1 Averaging a subset of the local co-
variance matrices
Instead of averaging the local covariances over all dat-
apoints, we may only average them over a subset of
datapoints. This estimator is unbiased and, if the lo-
cal covariance matrices are not too dissimilar, which
is the assumption underlying LCA, then its variance
should remain small. This is equivalent to using a
minibatch procedure: every time we have a new mini-
batch of size B, we compute its local covariance ˆCL,
which is then averaged with the previously computed
CL using
CL ←γ
B
n CL + (1 −γ
B
n ) ˆCL (8)
to yield the updated CL. The exponent B/n is so
that γ, the discount factor, determines the weight of
the old covariance matrix after an entire pass through
the data, which makes it insensitive to the particular
choice of batch size. As opposed to many such al-
gorithms where the choice of γ is critical as it helps
retaining the information of previous batches, the lo-
cality of the EM estimate makes it less so. However, if
the number of datapoints used to estimate CL is not
much larger than the dimension of the data, we need
to set a higher γ to avoid degenerate covariance ma-
trices. In simulations, we found that using a value of
γ = . 6 worked well. Similarly, the size of the mini-
batch influences only marginally the final result and
we found a value of 100 to be large enough.
5.2 Computing the local covariance
matrices using a subset of the dat-
apoints
Rather than using only a subset of local covariance ma-
trices, one may also wonder if using the entire dataset
to compute these matrices is necessary. Also, as the
number of datapoints grows, the chances of overfitting
increase. Thus, one may choose to use only a sub-
set of the datapoints to compute these matrices. This
will increase the local covariances, yielding a biased
estimate of the final result, but may also act as a reg-
ulariser. In practice, for very large datasets, one will
want the largest neighbourhood size while keeping the
computational cost tractable.
Denoting ni the number of locations at which we esti-
mate the local covariance and nj the number of neigh-
bours used to estimate this covariance, the cost per
update is now O(d2[ni + nj] + dninj + d3). Since only
nj should grow with n, this is linear in the total num-
ber of datapoints.
Though they may appear similar, these are not “land-
mark” techniques (see, e.g., [11]) as there is still one
Gaussian component per datapoint, and the ni data-
points around which we compute the local covariances
are randomly sampled at every iteration.
6 Experiments
LCA has three main properties: first, it transforms the
data to make it locally isotropic, thus being well-suited
for preprocessing the data before using a clustering
algorithm like spectral clustering; second, it extracts
relevant, non-Gaussian components in the data; third,
it provides us with a good density model through the
use of the Parzen windows estimator.
In the experiments, we will assess the performance of
the following algorithms: LCA, the original algorithm;
LCA-Gauss, using a multiplicative Gaussian compo-
nent, as described in Section 4; LCA-Gauss-Red, the
variant of LCA-Gauss using the more aggressive search
to find a better number of dimensions to be modelled
by the Gaussian component. The MATLAB code for
LCA, LCA-Gauss and LCA-Gauss-Red is available at
http://nicolas.le-roux.name/code.html.
6.1 Improving clustering methods
We first try to solve three clustering problems: one
for which the clusters are convex and the direc-
tion of interest does not have a Gaussian marginal
(Fig. (2), left), one for which the clusters are not con-
vex (Fig. (2), middle), and one for which the directions
5
of interest have almost Gaussian marginals (Fig. (2),
right). Following [1, 2], the data is progressively cor-
rupted by adding dimensions of white Gaussian noise,
then whitened. We compare here the clustering ac-
curacy, which is defined as 100
n minP tr(EP ) where E
is the confusion matrix and P is the set of permuta-
tions over cluster labels, obtained with the following
five techniques:
1. Spectral clustering (SC) [19] on the whitened data
(using the code of [8]);
2. SC on the projection on the first two components
found by FastICA using the best contrast function
and the correct number of components;
3. SC on the data transformed using the metric
learnt with LCA;
4. SC on the data transformed using the metric
learnt with the product of LCA and a Gaussian;
5. SC on the projection of the data found using
NGCA [4] with the correct number of compo-
nents.
Our choice of spectral clustering stems from its higher
clustering performance compared to K-means. Re-
sults are reported in Fig. (3). Because of the whiten-
ing, the Gaussian components in the first dataset are
shrunk along the direction containing information. As
a result, even with little noise added, the information
gets swamped and spectral clustering fails completely.
On the other hand, LCA and its variants are much
more robust to the presence of irrelevant dimensions.
Though NGCA works very well on the first dataset,
where there is only one relevant component, its per-
formance drops quickly when there are two relevant
components (note that, for all datasets, we provided
the true number of relevant dimensions as input to
NGCA). This is possibly due to the deflation proce-
dure which is not adapted when no single component
can be clearly identified in isolation. This is in contrast
with LCA and its variants which circumvent this issue,
thanks to their global optimisation procedure. Note
also that LCA-Gauss allows us to perform unsuper-
vised dimensionality reduction with the same perfor-
mance as previously proposed supervised algorithms
(e.g., [2]).
Figure (4) shows the clustering accuracy on the
three datasets for various numbers of EM iterations,
one iteration corresponding to Manifold Parzen Win-
dows [26] with a Gaussian kernel whose covariance ma-
trix is the data covariance kernel. As one can see, run-
ning the EM algorithm to convergence yields a signifi-
cant improvement in clustering accuracy. The perfor-
mance of Manifold Parzen Windows could likely have
been improved with a careful initialisation of the orig-
inal kernel, but this would have been at the expense
of the simplicity of the algorithm.
6.2 LCA as a density model
We now assess the quality of LCA as a density model.
We build a density model of the USPS digits dataset,
a 256-dimensional dataset of handwritten digits. We
compared several algorithms:
•An isotropic Parzen windows estimator with the
bandwidth estimated using LCA (replacing Σ ∗ of
Eq. (5) by λI so that the two matrices have the
same trace);
•A Parzen windows estimator with diagonal metric
(equal to the diagonal of Σ ∗ in Eq. (5);
•A Parzen windows estimator with the full metric
as obtained using LCA;
•A single Gaussian model;
•A product of a Gaussian and a Parzen windows
estimator (as described in Section 4).
The models were trained on a set of 2000 datapoints
and regularized by penalizing the trace of Σ −1 (in the
case of the last model, both covariance matrices, local
and global, were penalized). The regularisation pa-
rameter was optimized on a validation set of 1000 dat-
apoints. For the last model, the regularisation param-
eter of the global covariance was set to the one yielding
the best performance for the full Gaussian model on
the validation set. Thus, we only had to optimize the
regularisation parameter for the local covariance.
The final performance was then evaluated on a set of
3000 datapoints which had not been used for training
nor validation. We ran the experiment 20 times, ran-
domly selecting the training, validation and test set
each time.
Fig. (5) shows the mean and the standard error of the
negative log-likelihood on the test set. As one can see,
modelling all dimensions using the Parzen windows es-
timator leads to poor performance in high dimensions,
despite the regulariser and the leave-one-out criterion.
On the other hand, LCA-Gauss and LCA-Gauss-Red
clearly outperform all the other models, justifying our
choice of modelling some dimensions using a Gaussian.
Also, as opposed to the previous experiments, there is
no performance gain induced by the use of LCA-Gauss-
Red as opposed to LCA-Gauss, which we believe stems
from the fact that the switch from one model to the
other is easier to make when there are plenty of di-
mensions to choose from. The poor performance of
6
Figure 2: Noise-free data used to assess the robustness of K-means to noise. Left: mixture of two isotropic
Gaussians of unit variance and means [ −3, 0]⊤ and [3 , 0]⊤. Centre: two concentric circles with radii 1 and 2,
with added isotropic Gaussian noise of standard deviation . 1. Right: mixture of five Gaussians. The centre
cluster contains four times as many datapoints as the other ones.
0 20 40 6050
60
70
80
90
100
Noise dimensions
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Figure 3: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added. The error bars represent one
standard error. Left: mixture of isotropic Gaussians presented in Fig. (2) (left). Centre: two concentric circles
presented in Fig. (2) (centre). Right: mixture of five Gaussians pr esented in Fig. (2) (right).
0 20 40 6050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 5 10 15 2050
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
0 20 40 60
30
40
50
60
70
80
90
100
Noise dimensions
Raw
MPW
LCA−10
LCA−50
LCA−200
Figure 4: Average clustering accuracy (100% = perfect clustering , chance is 50% for the first two datasets and
20% for the last one) on 100 runs for varying number of dimensions o f noise added and varying number of EM
iterations in the LCA algorithm (MPW = one iteration). The error bars represent one standard error. Left:
mixture of isotropic Gaussians presented in Fig. (2) (left). Centre : two concentric circles presented in Fig. (2)
(centre). Right: mixture of five Gaussians presented in Fig. (2) (r ight).
LCA-Full is a clear indication of the problems suffered
by Parzen windows in high dimensions.
6.3 Subsampling
We now evaluate the loss in performance incurred
by the use the subsampling procedure described in
Section 5, both on the train and test negative log-
7
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 6.43 ± 0.10 2.70 ± 0.06 − 0.10 ± 0.03 6.43 ± 0.10 2.80 ± 0.06 − 0.17 ± 0.02
B = 3000 6.58 ± 0.07 2.73 ± 0.05 − 0.06 ± 0.03 6.54 ± 0.07 2.80 ± 0.06 − 0.11 ± 0.02
B = 6000 6.22 ± 0.08 2.21 ± 0.03 0.00 ± 0.01 6.18 ± 0.07 1.98 ± 0.03 0.02 ± 0.02
N = 1000 N = 3000 N = 6000 N = 1000 N = 3000 N = 6000
B = 1000 2.12 ± 0.16 0.20 ± 0.08 0.65 ± 0.05 2.01 ± 0.17 0.07 ± 0.09 0.15 ± 0.03
B = 3000 2.11 ± 0.16 0.30 ± 0.07 0.46 ± 0.04 2.01 ± 0.17 0.16 ± 0.09 0.09 ± 0.03
B = 6000 1.54 ± 0.16 − 0.75 ± 0.07 − 0.01 ± 0.01 1.43 ± 0.15 − 1.07 ± 0.08 0.01 ± 0.02
Figure 6: Train (top) and test (bottom) negative log-likelihood differ ences induced by the use of smaller batch
and neighbourhood sizes compared to the original model ( γ = 0, B = 6000, N = 6000) for γ = 0 . 3 (left) and
γ = 0 . 6 (right). A negative value means better performance.
LCA - Isotropic 269. 78 ±0. 18
LCA - Diagonal 109. 59 ±0. 56
LCA - Full 32. 98 ±0. 35
Gaussian 32. 27 ±0. 36
LCA - Gauss 19. 09 ±0. 39
LCA - Gauss - Red 19. 09 ±0. 39
Figure 5: Test negative log-likelihood on the USPS
digits dataset, averaged over 20 runs.
likelihoods. For that purpose, we used the USPS digit
recognition dataset, which contains 8298 datapoints in
dimension 256, which we randomly split into a train-
ing set of n = 6000 datapoints, using the rest as the
test set. We tested the following hyperparameters:
•Discount factor γ = 0 . 3, 0. 6, 0. 9 ,
•Batch size B = 1000 , 3000, 6000 ,
•Neighbourhood size N = 1000 , 3000, 6000 .
Fig. (6) show the log-likelihood differences induced
by the use of smaller batch sizes and neighbourhood
sizes. For each set of hyperparameters, 20 experiments
were run using different training and test sets, and the
means and standard errors are reported. The results
for γ = 0 . 9 were very similar and are not included due
to space constraints.
Three observations may be made. First, reducing the
batchsize has little effect, except when γ is small. Sec-
ond, reducing the neighbourhood size has a regular-
izing effect at first but drastically hurts the perfor-
mance if reduced too much. Third, the value of γ, the
discount factor, has little influence, but larger values
proved to yield more consistent test performance, at
the expense of slower convergence. The consistency of
these results shows that it is safe to use subsampling
(with values of γ = 0 . 6, B = 100 and N = 3000, for
instance) especially if the training set is very large.
7 Conclusion
Despite its importance, the learning of local or global
metrics is usually an overseen step in many practical
algorithms. We have proposed an extension of the gen-
eral bandwidth selection problem to the multidimen-
sional case, with a generalisation to the case where sev-
eral components are Gaussian. Additionally, we pro-
posed an approximate scheme suited to large datasets
which allows to find a local optimum in linear time.
We believe LCA can be an important preprocessing
tool for algorithms relying on local distances, such as
manifold learning methods or many semi-supervised
algorithms. Another use would be to cast LCA within
the mean-shift algorithm, which finds the modes of the
Parzen windows estimator, in the context of image seg-
mentation [10]. In the future, we would like to extend
this model to the case where the metric is allowed to
vary with the position in space, to account for more
complex geometries in the dataset.
Acknowledgements
Nicolas Le Roux and Francis Bach are supported in
part by the European Research Council (SIERRA-
ERC-239993). We would also like to thank Warith
Harchaoui for its valuable input.
8
References
[1] F. Bach and Z. Harchaoui. Diffrac: a discrimi-
native and flexible framework for clustering. In
Advances in Neural Information Processing Sys-
tems 20 , 2007.
[2] F. Bach and M. I. Jordan. Learning spectral clus-
tering. In Advances in Neural Information Pro-
cessing Systems 16 , 2004.
[3] Y. Bengio, H. Larochelle, and P. Vincent. Non-
local manifold Parzen windows. In Advances in
Neural Information Processing Systems 18 , pages
115–122. MIT Press, 2006.
[4] G. Blanchard, M. Kawanabe, M. Sugiyama,
V. Spokoiny, and K.-R. M¨ uller. In search of non-
Gaussian components of a high-dimensional dis-
tribution. J. Mach. Learn. Res. , 7:247–282, De-
cember 2006.
[5] J.M. Borwein and A.S. Lewis. Convex analysis
and nonlinear optimization, theory and examples,
2000.
[6] R. Boscolo, H. Pan, and V.P. Roychowdhury.
Independent component analysis based on non-
parametric density estimation. Neural Networks,
IEEE Transactions on , 15(1):55–65, 2004.
[7] A. Bowman. An alternative method of cross-
validation for the smoothing of density estimates.
Biometrika, 71(2):pp. 353–360, 1984.
[8] W.-Y. Chen, Y. Song, H. Bai, C.-J. Lin, and E. Y.
Chang. Parallel spectral clustering in distributed
systems. IEEE Transactions on Pattern Analysis
and Machine Intelligence , 33(3):568–586, 2011.
[9] Y.-S. Chow, S. Geman, and L.-D. Wu. Consistent
cross-validated density estimation. The Annals of
Statistics, 11(1):pp. 25–38, 1983.
[10] D. Comaniciu and P. Meer. Mean shift: A robust
approach toward feature space analysis. IEEE
Transactions on Pattern Analysis and Machine
Intelligence, 24:603–619, 2002.
[11] V. De Silva and J.B. Tenenbaum. Sparse multi-
dimensional scaling using landmark points. Tech-
nology, pages 1–41, 2004.
[12] A. P. Dempster, N. M. Laird, and D. B. Rubin.
Maximum likelihood from incomplete data via the
EM algorithm. Journal of the Royal Statistical
Society. Series B (Methodological) , 39(1):pp. 1–
38, 1977.
[13] R.P.W. Duin. On the choice of smoothing param-
eters for Parzen estimators of probability density
functions. Computers, IEEE Transactions on , C-
25(11):1175 –1179, 1976.
[14] T. Duong and M. Hazelton. Cross-validation
bandwidth matrices for multivariate kernel den-
sity estimation. Scandinavian Journal of Statis-
tics, 32(3):pp. 485–506, 2005.
[15] A. Globerson and S. Roweis. Metric learning
by collapsing classes. In Advances in Neural In-
formation Processing Systems , volume 18, pages
451–458. MIT Press, 2006.
[16] J. Goldberger, S. Roweis, G.E. Hinton, and
R. Salakhutdinov. Neighbourhood components
analysis. In Advances in Neural Information Pro-
cessing Systems 17 , 2004.
[17] A. Hyv¨ arinen, J. Karhunen, and E. Oja. Inde-
pendent component analysis . Wiley, New York,
2001.
[18] M. C. Jones and D. A. Henderson. Maximum
likelihood kernel density estimation: On the po-
tential of convolution sieves. Comput. Stat. Data
Anal., 53:3726–3733, August 2009.
[19] A. Ng, M. I. Jordan, and Y. Weiss. On spectral
clustering: Analysis and an algorithm. In Ad-
vances in Neural Information Processing Systems
14, 2001.
[20] B. Park and J. S. Marron. Comparison of data-
driven bandwidth selectors. Journal of the Amer-
ican Statistical Association , 85(409):pp. 66–72,
1990.
[21] E. Parzen. On estimation of a probability density
function and mode. The Annals of Mathematical
Statistics, 33(3):pp. 1065–1076, 1962.
[22] M. Rosenblatt. Remarks on some nonparametric
estimates of a density function. The Annals of
Mathematical Statistics , 27(3):pp. 832–837, 1956.
[23] M. Rudemo. Empirical choice of histograms and
kernel density estimators. Scandinavian Journal
of Statistics , 9(2):pp. 65–78, 1982.
[24] S. J. Sheather and M. C. Jones. A reliable data-
based bandwidth selection method for kernel den-
sity estimation. Journal of the Royal Statistical
Society. Series B (Methodological) , 53(3):pp. 683–
690, 1991.
[25] B. W. Silverman. Density estimation for statistics
and data analysis. 1986.
9
[26] P. Vincent and Y. Bengio. Manifold Parzen win-
dows. In Advances in Neural Information Pro-
cessing Systems 15 , pages 825–832. MIT Press,
2002.
[27] E. Xing, A. Ng, M. I. Jordan, and S. Russell. Dis-
tance metric learning with application to cluster-
ing with side-information. In Advances in Neural
Information Processing Systems 14 , 2002.
[28] L. Zelnik-Manor and P. Perona. Self-tuning spec-
tral clustering. In Advances in Neural Informa-
tion Processing Systems 17 , 2004.
Appendix
We prove here Proposition 1.
Proof If M1 is singular, then the minimum value is
−∞, because we can have B⊤
G M1BG bounded while
BGB⊤
G tends to + ∞(for example, if d1 = 1, and u1 is
such that M1u1 = 0, select BG = λu1 with λ →+∞).
The reasoning is similar for M2.
We thus assume that M1 and M2 are invert-
ible. We consider the eigendecomposition of
M−1/ 2
1 M2M−1/ 2
1 = U Diag(e)U⊤, which corresponds
to the generalized eigendecomposition of the pair
(M1, M 2).
Denoting A2 = U⊤M1/ 2
1 BL and A1 = U⊤M1/ 2
1 BG,
we have:
tr B⊤
G M1BG + tr B⊤
L M2BL −log det(BGB⊤
G + BLB⊤
L )
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2
−log det(A1A⊤
1 + A2A⊤
2 ) + log det M1
= tr A⊤
1 A1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2)
−log det(A⊤
1 (I −A2(A⊤
2 A2)−1A⊤
2 )A1) + log det M1 .
By taking derivatives with respect to A1, we get
A1 = ( I −Π 2)A1(A⊤
1 (I −Π 2)A1)−1 , (9)
with Π 2 = A2(A⊤
2 A2)−1A⊤
2 . By left-multiplying both
sides of Eq. (9) by A⊤
2 , we obtain
A⊤
2 A1 = 0 .
By left-multiplying by A⊤
1 , we get
A⊤
1 A1 = I .
Thus, we now need to minimize with respect to A2 the
following cost function
d1 + tr A⊤
2 Diag(e)A2 −log det(A⊤
2 A2) + log det M1
Let s be the vector of singular values of A2, ordered in
decreasing order and let the ei be ordered in increasing
order. We have:
tr Diag(e)A2A⊤
2 = −tr(−Diag(e)A2A⊤
2 ) ⩾
∑
i
eis2
i ,
with equality if and only if the eigenvectors of A2A⊤
2
are aligned with the ones of Diag( e) (the −ei being
also in decreasing order) (Theorem 1.2.1, [5]).
Thus, we have A2A⊤
2 = diag( s)2 with only d2 non-
zero elements in s. Let J2 be the index of non zero-
elements. We thus need to minimize
d1 + log det M1 +
∑
j∈J2
(ej s2
j −log s2
j ) ,
with optimum s2
j = e−1
j and value:
d1 + d2 + log det M1 +
∑
j∈J2
log ej .
Thus, we need to take J2 corresponding to the
smallest eigenvalues ej. If we also optimize with
respect to d2, then J2 must only contain the elements
smaller than 1.
10
|
Nicolas Le Roux, Francis Bach
|
Unknown
| 2,013
|
{"id": "mLr3In-nbamNu", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1357918200000, "tmdate": 1357918200000, "ddate": null, "number": 64, "content": {"title": "Local Component Analysis", "decision": "conferencePoster-iclr2013-conference", "abstract": "Kernel density estimation, a.k.a. Parzen windows, is a popular density estimation method, which can be used for outlier detection or clustering. With multivariate data, its performance is heavily reliant on the metric used within the kernel. Most earlier work has focused on learning only the bandwidth of the kernel (i.e., a scalar multiplicative factor). In this paper, we propose to learn a full Euclidean metric through an expectation-minimization (EM) procedure, which can be seen as an unsupervised counterpart to neighbourhood component analysis (NCA). In order to avoid overfitting with a fully nonparametric density estimator in high dimensions, we also consider a semi-parametric Gaussian-Parzen density model, where some of the variables are modelled through a jointly Gaussian density, while others are modelled through Parzen windows. For these two models, EM leads to simple closed-form updates based on matrix inversions and eigenvalue decompositions. We show empirically that our method leads to density estimators with higher test-likelihoods than natural competing methods, and that the metrics may be used within most unsupervised learning techniques that rely on such metrics, such as spectral clustering or manifold learning methods. Finally, we present a stochastic approximation scheme which allows for the use of this method in a large-scale setting.", "pdf": "https://arxiv.org/abs/1109.0093", "paperhash": "roux|local_component_analysis", "keywords": [], "conflicts": [], "authors": ["Nicolas Le Roux", "Francis Bach"], "authorids": ["nicolas.le.roux@gmail.com", "francis.bach@gmail.com"]}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["nicolas.le.roux@gmail.com"], "writers": []}
|
[Review]:
In this paper, the authors consider unsupervised metric learning as a
density estimation problem with a Parzen windows estimator based on
Euclidean metric. They use maximum likelihood method and EM algorithm
for deriving a method that may be considered as an unsupervised counterpart to neighbourhood component analysis. Various versions of the method provide good results in the clustering problems considered.
+ Good and interesting conference paper.
+ Certainly novel enough.
- Modifications are needed to combat the problems of overfitting,
local minima, and computational load in the basic approach proposed.
Some of these improvements are heuristic or seem to require hand-tuning.
Specific comments:
- The authors should refer to the paper S. Kaski and J. Peltonen,
'Informative discriminant analysis', in T. Fawcett and N. Mishna (Eds.),
Proc. of the 20th Int. Conf. on Machine Learning (ICML 2003), pp. 329-336,
AAAI Press, Menlo Park, CA, 2003.
In this paper, essentially the same technique as Neighbourhood Component
Analysis is defined under the name Informative discriminant analysis
one year prior to the paper by Goldberger et al., your reference [16].
- In the beginning of page 6 the authors state: 'Following [1, 2], the data
is progressively corrupted by adding dimensions of white Gaussian noise,
then whitened.' In this case, whitening amplifies Gaussian noise, so that
it has the same power as the underlying data. Obviously this is the reason
why the experimental results approach to a random guess when the dimensions of the white noise increase sufficiently. The authors should mention that in real-world applications, one should not use whitening in this kind of situations, but rather compress the data using for example principal component analysis (PCA) without whitening for getting rid of the extra dimensions corresponding to white Gaussian noise. Or at least use the data as such without any whitening.
|
anonymous reviewer 71f4
| null | null |
{"id": "D1cO7TgVjPGT9", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361300640000, "tmdate": 1361300640000, "ddate": null, "number": 2, "content": {"title": "review of Local Component Analysis", "review": "In this paper, the authors consider unsupervised metric learning as a\r\ndensity estimation problem with a Parzen windows estimator based on \r\nEuclidean metric. They use maximum likelihood method and EM algorithm\r\nfor deriving a method that may be considered as an unsupervised counterpart to neighbourhood component analysis. Various versions of the method provide good results in the clustering problems considered.\r\n\r\n+ Good and interesting conference paper.\r\n+ Certainly novel enough.\r\n- Modifications are needed to combat the problems of overfitting,\r\nlocal minima, and computational load in the basic approach proposed.\r\nSome of these improvements are heuristic or seem to require hand-tuning.\r\n\r\n\r\nSpecific comments:\r\n\r\n- The authors should refer to the paper S. Kaski and J. Peltonen,\r\n'Informative discriminant analysis', in T. Fawcett and N. Mishna (Eds.),\r\nProc. of the 20th Int. Conf. on Machine Learning (ICML 2003), pp. 329-336,\r\nAAAI Press, Menlo Park, CA, 2003.\r\nIn this paper, essentially the same technique as Neighbourhood Component\r\nAnalysis is defined under the name Informative discriminant analysis\r\none year prior to the paper by Goldberger et al., your reference [16].\r\n\r\n- In the beginning of page 6 the authors state: 'Following [1, 2], the data\r\nis progressively corrupted by adding dimensions of white Gaussian noise,\r\nthen whitened.' In this case, whitening amplifies Gaussian noise, so that\r\nit has the same power as the underlying data. Obviously this is the reason\r\nwhy the experimental results approach to a random guess when the dimensions of the white noise increase sufficiently. The authors should mention that in real-world applications, one should not use whitening in this kind of situations, but rather compress the data using for example principal component analysis (PCA) without whitening for getting rid of the extra dimensions corresponding to white Gaussian noise. Or at least use the data as such without any whitening."}, "forum": "mLr3In-nbamNu", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "mLr3In-nbamNu", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 71f4"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 1,
"importance_and_relevance": 1,
"materials_and_methods": 12,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 3,
"suggestion_and_solution": 4,
"total": 19
}
| 1.315789
| 0.747622
| 0.568167
| 1.337187
| 0.235513
| 0.021397
| 0.052632
| 0.052632
| 0.052632
| 0.631579
| 0.105263
| 0.052632
| 0.157895
| 0.210526
|
{
"criticism": 0.05263157894736842,
"example": 0.05263157894736842,
"importance_and_relevance": 0.05263157894736842,
"materials_and_methods": 0.631578947368421,
"praise": 0.10526315789473684,
"presentation_and_reporting": 0.05263157894736842,
"results_and_discussion": 0.15789473684210525,
"suggestion_and_solution": 0.21052631578947367
}
| 1.315789
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
I apologize for the delay in my reply.
Verdict: weak accept.
|
anonymous reviewer f4a8
| null | null |
{"id": "w0XswsNFad7Qu", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1394470920000, "tmdate": 1394470920000, "ddate": null, "number": 7, "content": {"title": "", "review": "I apologize for the delay in my reply.\r\nVerdict: weak accept."}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f4a8"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 2
}
| 0.5
| -1.409674
| 1.909674
| 0.501183
| 0.015256
| 0.001183
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
{
"criticism": 0.5,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 0.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
Another minor comment related to the visualization method: since there is no iterative 'inference' step typical of deconv. nets (the features are already given by a direct forward pass) then this method is perhaps more similar to this old paper of mine:
M. Ranzato, F.J. Huang, Y. Boureau, Y. LeCun, 'Unsupervised Learning of Invariant Feature Hierarchies with Applications to Object Recognition'. Proc. of Computer Vision and Pattern Recognition Conference (CVPR 2007), Minneapolis, 2007.
http://www.cs.toronto.edu/~ranzato/publications/ranzato-cvpr07.pdf
The only difference being the new pooling instead of max-pooling, the use of ReLU instead of tanh and the tying of the weights (filters optimized for feature extraction but used also for reconstruction).
Overall, I think that even this visualization method constitutes a nice contribution of this paper.
|
Marc'Aurelio Ranzato
| null | null |
{"id": "obPcCcSvhKovH", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362369360000, "tmdate": 1362369360000, "ddate": null, "number": 3, "content": {"title": "", "review": "Another minor comment related to the visualization method: since there is no iterative 'inference' step typical of deconv. nets (the features are already given by a direct forward pass) then this method is perhaps more similar to this old paper of mine:\r\nM. Ranzato, F.J. Huang, Y. Boureau, Y. LeCun, 'Unsupervised Learning of Invariant Feature Hierarchies with Applications to Object Recognition'. Proc. of Computer Vision and Pattern Recognition Conference (CVPR 2007), Minneapolis, 2007.\r\nhttp://www.cs.toronto.edu/~ranzato/publications/ranzato-cvpr07.pdf\r\nThe only difference being the new pooling instead of max-pooling, the use of ReLU instead of tanh and the tying of the weights (filters optimized for feature extraction but used also for reconstruction).\r\n\r\nOverall, I think that even this visualization method constitutes a nice contribution of this paper."}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["Marc'Aurelio Ranzato"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 4,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 5
}
| 1.2
| 0.189924
| 1.010076
| 1.212771
| 0.142729
| 0.012771
| 0
| 0
| 0.2
| 0.8
| 0.2
| 0
| 0
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0.2,
"materials_and_methods": 0.8,
"praise": 0.2,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 1.2
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
The authors introduce a stochastic pooling method in the context of
convolutional neural networks, which replaces the traditionally used
average or max pooling operators. In the stochastic pooling a
multinomial distribution is created from input activations and used to
select the index of the activation to pass to the next layer of the
network. On first read, this method resembled that of 'probabilistic max
pooling' by Lee et. al in 'Convolutional Deep Belief Networks for
Scalable Unsupervised Learning of Hierarchical Representations',
however the context and execution are different.
During testing, the authors employ a separate pooling function that is a
weighted sum of the input activations and their corresponding
probabilities that would be used for index selection during training.
This pooling operator is speculated to work as a form of
regularization through model averaging. The authors substantiate this claim with results averaging multiple samples at each pool of the stochastic architectures and visualizations of images obtained from
reconstructions using deconvolutional networks.
Moreover, test set accuracies for this method are given for four
relevant datasets where it appears stochastic pooling CNNs are able to
achieve the best known performance on three. A good amount of detail
has been provided allowing the reader to reproduce the results.
As the sampling scheme proposed may be combined with other regularization techniques, it will be exciting to see how multiple forms of regularization can contribute or degrade test accuracies.
Some minor comments follow:
- Mini-batch size for training is not mentioned.
- Fig. 2 could be clearer on first read, e.g. if boxes were drawn
around (a,b,c), (e,f), and (g,h) to indicate they are operations on
the same dataset.
- In Section 4.2 it is noted that stochastic pooling avoids
over-fitting unlike averaging and max pooling, however in Fig. 3 it
certainly appears that the average and max techniques are not severely
over-fitting as in the typical network training case (with noticeable
degradation in test set performance). However, the network does train
to near zero error on the training set. It may be more accurate to state
that stochastic pooling promotes better generalization yet additional training epochs may make the over-fitting argument clearer.
- Fig. 3 also suggests that additional training may improve the final
reported test set error in the case of stochastic pooling. The
reference to state-of-the-art performance on CIFAR-10 is no longer
current.
- Section 4.8, sp 'proabilities'
|
anonymous reviewer cd07
| null | null |
{"id": "lWJdCuzGuRlGF", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362101820000, "tmdate": 1362101820000, "ddate": null, "number": 2, "content": {"title": "review of Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "review": "The authors introduce a stochastic pooling method in the context of\r\nconvolutional neural networks, which replaces the traditionally used\r\naverage or max pooling operators. In the stochastic pooling a\r\nmultinomial distribution is created from input activations and used to\r\nselect the index of the activation to pass to the next layer of the\r\nnetwork. On first read, this method resembled that of 'probabilistic max\r\npooling' by Lee et. al in 'Convolutional Deep Belief Networks for\r\nScalable Unsupervised Learning of Hierarchical Representations',\r\nhowever the context and execution are different.\r\n\r\nDuring testing, the authors employ a separate pooling function that is a\r\nweighted sum of the input activations and their corresponding\r\nprobabilities that would be used for index selection during training.\r\nThis pooling operator is speculated to work as a form of\r\nregularization through model averaging. The authors substantiate this claim with results averaging multiple samples at each pool of the stochastic architectures and visualizations of images obtained from\r\nreconstructions using deconvolutional networks.\r\n\r\nMoreover, test set accuracies for this method are given for four\r\nrelevant datasets where it appears stochastic pooling CNNs are able to\r\nachieve the best known performance on three. A good amount of detail\r\nhas been provided allowing the reader to reproduce the results.\r\n\r\nAs the sampling scheme proposed may be combined with other regularization techniques, it will be exciting to see how multiple forms of regularization can contribute or degrade test accuracies.\r\n\r\nSome minor comments follow:\r\n\r\n- Mini-batch size for training is not mentioned.\r\n\r\n- Fig. 2 could be clearer on first read, e.g. if boxes were drawn\r\naround (a,b,c), (e,f), and (g,h) to indicate they are operations on\r\nthe same dataset.\r\n\r\n- In Section 4.2 it is noted that stochastic pooling avoids\r\nover-fitting unlike averaging and max pooling, however in Fig. 3 it\r\ncertainly appears that the average and max techniques are not severely\r\nover-fitting as in the typical network training case (with noticeable\r\ndegradation in test set performance). However, the network does train\r\nto near zero error on the training set. It may be more accurate to state\r\nthat stochastic pooling promotes better generalization yet additional training epochs may make the over-fitting argument clearer.\r\n\r\n- Fig. 3 also suggests that additional training may improve the final\r\nreported test set error in the case of stochastic pooling. The\r\nreference to state-of-the-art performance on CIFAR-10 is no longer\r\ncurrent.\r\n\r\n- Section 4.8, sp 'proabilities'"}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer cd07"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 4,
"importance_and_relevance": 0,
"materials_and_methods": 13,
"praise": 1,
"presentation_and_reporting": 3,
"results_and_discussion": 3,
"suggestion_and_solution": 5,
"total": 22
}
| 1.454545
| 0.176169
| 1.278377
| 1.4945
| 0.395045
| 0.039955
| 0.136364
| 0.181818
| 0
| 0.590909
| 0.045455
| 0.136364
| 0.136364
| 0.227273
|
{
"criticism": 0.13636363636363635,
"example": 0.18181818181818182,
"importance_and_relevance": 0,
"materials_and_methods": 0.5909090909090909,
"praise": 0.045454545454545456,
"presentation_and_reporting": 0.13636363636363635,
"results_and_discussion": 0.13636363636363635,
"suggestion_and_solution": 0.22727272727272727
}
| 1.454545
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
Regularization methods are critical for the successful applications of
neural networks. This work introduces a new dropout-inspired
regularization method named stochastic pooling. The method is simple,
applicable applicable to convolutional neural networks with positive
nonlinearites, and achieves good performance on several tasks.
A potentially severe issue is that the results are no longer state of
the art, as maxout networks get better results. But this does not
strongly suggest that stochastic pooling is inferior to maxout, since
the methods are different and can therefore be combined, and, more
importantly, maxout networks may have used a more thorough
architecture and hyperparameter search, which would explain their
better performance.
The main problem with the paper is that the experiments are lacking in
that there is no proper comparison to dropout. While the results on
CIFAR-10 are compared to the original dropout paper and result in an
improvement, the paper does not report results for the remainder of
the datasets with dropout and with the same architecture (if the
architecture is not the same in all experiments, then performance
differences could be caused by architecture differences). It is thus
possible that dropout would achieve nearly identical performance on
these tasks if given the same architecture on MNIST, CIFAR-100, and
SVHN. What's more, when properly tweaked, dropout outperforms the
results reported here on CIFAR-10 as reported in Snoek et al. [A] (sub
15% test error); and it is conceivable that Bayesian-optimized
stochastic pooling would achieve worse results.
In addition to dropout, it is also interesting to compare to dropout
that occurs before max-pooling. This kind of dropout bears more
resemblance to stochastic pooling, and may achieve results that are
similar (or better -- it cannot be ruled out).
Finally, a minor point. The paper emphasizes the fact that stochastic
pooling averages 4^N models while dropout averages 2^N models, where N
is the number of units. While true, this is not relevant, since both
quantities are vast, and the performance differences between the two
methods will stem from other sources.
To conclude, the paper presented an interesting and elegant technique
for preventing overfitting that may become widely used. However, this
paper does not convincingly demonstrate its superiority over dropout.
References
----------
[A] Snoek, J. and Larochelle, H. and Adams, R.P., Practical Bayesian
Optimization of Machine Learning Algorithms, NIPS 2012
|
anonymous reviewer f4a8
| null | null |
{"id": "ZVb9LYU20iZhX", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362379980000, "tmdate": 1362379980000, "ddate": null, "number": 1, "content": {"title": "review of Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "review": "Regularization methods are critical for the successful applications of\r\nneural networks. This work introduces a new dropout-inspired\r\nregularization method named stochastic pooling. The method is simple,\r\napplicable applicable to convolutional neural networks with positive\r\nnonlinearites, and achieves good performance on several tasks.\r\n\r\nA potentially severe issue is that the results are no longer state of\r\nthe art, as maxout networks get better results. But this does not\r\nstrongly suggest that stochastic pooling is inferior to maxout, since\r\nthe methods are different and can therefore be combined, and, more\r\nimportantly, maxout networks may have used a more thorough\r\narchitecture and hyperparameter search, which would explain their\r\nbetter performance.\r\n\r\nThe main problem with the paper is that the experiments are lacking in\r\nthat there is no proper comparison to dropout. While the results on\r\nCIFAR-10 are compared to the original dropout paper and result in an\r\nimprovement, the paper does not report results for the remainder of\r\nthe datasets with dropout and with the same architecture (if the\r\narchitecture is not the same in all experiments, then performance\r\ndifferences could be caused by architecture differences). It is thus\r\npossible that dropout would achieve nearly identical performance on\r\nthese tasks if given the same architecture on MNIST, CIFAR-100, and\r\nSVHN. What's more, when properly tweaked, dropout outperforms the\r\nresults reported here on CIFAR-10 as reported in Snoek et al. [A] (sub\r\n15% test error); and it is conceivable that Bayesian-optimized\r\nstochastic pooling would achieve worse results.\r\n \r\nIn addition to dropout, it is also interesting to compare to dropout\r\nthat occurs before max-pooling. This kind of dropout bears more\r\nresemblance to stochastic pooling, and may achieve results that are\r\nsimilar (or better -- it cannot be ruled out).\r\n\r\nFinally, a minor point. The paper emphasizes the fact that stochastic\r\npooling averages 4^N models while dropout averages 2^N models, where N\r\nis the number of units. While true, this is not relevant, since both\r\nquantities are vast, and the performance differences between the two \r\nmethods will stem from other sources. \r\n\r\nTo conclude, the paper presented an interesting and elegant technique\r\nfor preventing overfitting that may become widely used. However, this\r\npaper does not convincingly demonstrate its superiority over dropout. \r\n\r\nReferences \r\n----------\r\n[A] Snoek, J. and Larochelle, H. and Adams, R.P., Practical Bayesian\r\nOptimization of Machine Learning Algorithms, NIPS 2012"}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f4a8"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 12,
"praise": 3,
"presentation_and_reporting": 0,
"results_and_discussion": 6,
"suggestion_and_solution": 1,
"total": 18
}
| 1.555556
| 1.160995
| 0.394561
| 1.592791
| 0.357829
| 0.037235
| 0.222222
| 0
| 0.111111
| 0.666667
| 0.166667
| 0
| 0.333333
| 0.055556
|
{
"criticism": 0.2222222222222222,
"example": 0,
"importance_and_relevance": 0.1111111111111111,
"materials_and_methods": 0.6666666666666666,
"praise": 0.16666666666666666,
"presentation_and_reporting": 0,
"results_and_discussion": 0.3333333333333333,
"suggestion_and_solution": 0.05555555555555555
}
| 1.555556
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
This paper introduces a new regularization technique based on inexpensive approximations to model averaging, similar to dropout. As with dropout, the training procedure involves stochasticity but the trained model uses a cheap approximation to the average over all possible models to make a prediction.
The paper includes empirical evidence that the model averaging effect is happening, and uses the method to improve on the state of the art for three datasets.
The method is simple and in principle, computationally inexpensive.
Two criticisms of this paper:
-The result on CIFAR-10 was not in fact state of the art at the time of submission; it was just slightly worse than Snoek et al's result using Bayesian hyperparameter optimization.
-I think it's worth mentioning that while this method is computationally inexpensive in principle, it is not necessarily easy to get a fast implementation in practice. i.e., people wishing to use this method must implement their own GPU kernel to do stochastic pooling, rather than using off-the-shelf implementations of convolution and basic tensor operations like indexing.
Otherwise, I think this is an excellent paper. My colleagues and I have made a slow implementation of the method and used it to reproduce the authors' MNIST results. The method works as advertised and is easy to use.
|
anonymous reviewer 2b4c
| null | null |
{"id": "WilRXfhv6jXxa", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361845800000, "tmdate": 1361845800000, "ddate": null, "number": 4, "content": {"title": "review of Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "review": "This paper introduces a new regularization technique based on inexpensive approximations to model averaging, similar to dropout. As with dropout, the training procedure involves stochasticity but the trained model uses a cheap approximation to the average over all possible models to make a prediction.\r\n\r\nThe paper includes empirical evidence that the model averaging effect is happening, and uses the method to improve on the state of the art for three datasets.\r\n\r\nThe method is simple and in principle, computationally inexpensive.\r\n\r\nTwo criticisms of this paper:\r\n-The result on CIFAR-10 was not in fact state of the art at the time of submission; it was just slightly worse than Snoek et al's result using Bayesian hyperparameter optimization.\r\n-I think it's worth mentioning that while this method is computationally inexpensive in principle, it is not necessarily easy to get a fast implementation in practice. i.e., people wishing to use this method must implement their own GPU kernel to do stochastic pooling, rather than using off-the-shelf implementations of convolution and basic tensor operations like indexing.\r\n\r\nOtherwise, I think this is an excellent paper. My colleagues and I have made a slow implementation of the method and used it to reproduce the authors' MNIST results. The method works as advertised and is easy to use."}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 2b4c"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 9,
"praise": 3,
"presentation_and_reporting": 0,
"results_and_discussion": 4,
"suggestion_and_solution": 1,
"total": 10
}
| 2.1
| 1.957958
| 0.142042
| 2.119427
| 0.214432
| 0.019427
| 0.3
| 0
| 0.1
| 0.9
| 0.3
| 0
| 0.4
| 0.1
|
{
"criticism": 0.3,
"example": 0,
"importance_and_relevance": 0.1,
"materials_and_methods": 0.9,
"praise": 0.3,
"presentation_and_reporting": 0,
"results_and_discussion": 0.4,
"suggestion_and_solution": 0.1
}
| 2.1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
I apologize for the delay in my reply.
Verdict: weak accept.
|
anonymous reviewer f4a8
| null | null |
{"id": "SPk0N0RlUTrqv", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1394470920000, "tmdate": 1394470920000, "ddate": null, "number": 9, "content": {"title": "", "review": "I apologize for the delay in my reply.\r\nVerdict: weak accept."}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f4a8"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 2
}
| 0.5
| -1.409674
| 1.909674
| 0.501183
| 0.015256
| 0.001183
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
{
"criticism": 0.5,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 0.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
I'm excited about this paper because it introduces another trick for cheap model averaging like dropout. It will be interesting to see if this kind of fast model averaging turns into a whole subfield.
I recently got some very good results ( http://arxiv.org/abs/1302.4389 ) by using a model that works well with the kinds of approximations to model averaging that dropout makes. Presumably there are models that get the same kind of synergy with stochastic pooling. I think this is a very promising prospect, since stochastic pooling works so well even with just vanilla rectifier networks as the base model.
|
Ian Goodfellow
| null | null |
{"id": "OOBjrzG_LdOEf", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362085800000, "tmdate": 1362085800000, "ddate": null, "number": 5, "content": {"title": "", "review": "I'm excited about this paper because it introduces another trick for cheap model averaging like dropout. It will be interesting to see if this kind of fast model averaging turns into a whole subfield.\r\n\r\nI recently got some very good results ( http://arxiv.org/abs/1302.4389 ) by using a model that works well with the kinds of approximations to model averaging that dropout makes. Presumably there are models that get the same kind of synergy with stochastic pooling. I think this is a very promising prospect, since stochastic pooling works so well even with just vanilla rectifier networks as the base model."}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["Ian Goodfellow"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 5,
"praise": 2,
"presentation_and_reporting": 0,
"results_and_discussion": 1,
"suggestion_and_solution": 1,
"total": 5
}
| 2
| 0.989924
| 1.010076
| 2.010319
| 0.159465
| 0.010319
| 0
| 0
| 0.2
| 1
| 0.4
| 0
| 0.2
| 0.2
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0.2,
"materials_and_methods": 1,
"praise": 0.4,
"presentation_and_reporting": 0,
"results_and_discussion": 0.2,
"suggestion_and_solution": 0.2
}
| 2
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
I really like this paper because:
- it is simple yet very effective and
- the empirical validation not only demonstrates the method but it also helps understanding where the gain comes from (tab. 5 was very useful to understand the regularization effect brought by the sampling noise).
I also found intriguing the visualization method: using deconv. nets to reverse a trained conv. net; that's clever! Maybe that can become a killer app for deconv nets. Videos are also very nice.
However, I was wondering how did you invert the normalization layer?
|
Marc'Aurelio Ranzato
| null | null |
{"id": "BBmMrdZA5UBaz", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362349140000, "tmdate": 1362349140000, "ddate": null, "number": 6, "content": {"title": "", "review": "I really like this paper because:\r\n- it is simple yet very effective and\r\n- the empirical validation not only demonstrates the method but it also helps understanding where the gain comes from (tab. 5 was very useful to understand the regularization effect brought by the sampling noise).\r\n\r\nI also found intriguing the visualization method: using deconv. nets to reverse a trained conv. net; that's clever! Maybe that can become a killer app for deconv nets. Videos are also very nice.\r\nHowever, I was wondering how did you invert the normalization layer?"}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["Marc'Aurelio Ranzato"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 4,
"praise": 2,
"presentation_and_reporting": 1,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 8
}
| 1
| 0.605439
| 0.394561
| 1.009049
| 0.100953
| 0.009049
| 0
| 0
| 0.125
| 0.5
| 0.25
| 0.125
| 0
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0.125,
"materials_and_methods": 0.5,
"praise": 0.25,
"presentation_and_reporting": 0.125,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
l_PClqDdLb5Bp
|
Stochastic Pooling for Regularization of Deep Convolutional Neural
Networks
|
We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.
|
Stochastic Pooling for Regularization of
Deep Convolutional Neural Networks
Matthew D. Zeiler
Department of Computer Science
Courant Institute, New York University
zeiler@cs.nyu.edu
Rob Fergus
Department of Computer Science
Courant Institute, New York University
fergus@cs.nyu.edu
Abstract
We introduce a simple and effective method for regularizing large convolutional
neural networks. We replace the conventional deterministic pooling operations
with a stochastic procedure, randomly picking the activation within each pool-
ing region according to a multinomial distribution, given by the activities within
the pooling region. The approach is hyper-parameter free and can be combined
with other regularization approaches, such as dropout and data augmentation. We
achieve state-of-the-art performance on four image datasets, relative to other ap-
proaches that do not utilize data augmentation.
1 Introduction
Neural network models are prone to over-fitting due to their high capacity. A range of regularization
techniques are used to prevent this, such as weight decay, weight tying and the augmentation of
the training set with transformed copies [9]. These allow the training of larger capacity models
than would otherwise be possible, which yield superior test performance compared to smaller un-
regularized models.
Dropout, recently proposed by Hintonet al.[2], is another regularization approach that stochastically
sets half the activations within a layer to zero for each training sample during training. It has been
shown to deliver significant gains in performance across a wide range of problems, although the
reasons for its efficacy are not yet fully understood.
A drawback to dropout is that it does not seem to have the same benefits for convolutional layers,
which are common in many networks designed for vision tasks. In this paper, we propose a novel
type of regularization for convolutional layers that enables the training of larger models without
over-fitting, and produces superior performance on recognition tasks.
The key idea is to make the pooling that occurs in each convolutional layer a stochastic process.
Conventional forms of pooling such as average and max are deterministic, the latter selecting the
largest activation in each pooling region. In our stochastic pooling, the selected activation is drawn
from a multinomial distribution formed by the activations within the pooling region.
An alternate view of stochastic pooling is that it is equivalent to standard max pooling but with many
copies of an input image, each having small local deformations. This is similar to explicit elastic
deformations of the input images [13], which delivers excellent MNIST performance. Other types
of data augmentation, such as flipping and cropping differ in that they are global image transforma-
tions. Furthermore, using stochastic pooling in a multi-layer model gives an exponential number of
deformations since the selections in higher layers are independent of those below.
1
arXiv:1301.3557v1 [cs.LG] 16 Jan 2013
2 Review of Convolutional Networks
Our stochastic pooling scheme is designed for use in a standard convolutional neural network archi-
tecture. We first review this model, along with conventional pooling schemes, before introducing
our novel stochastic pooling approach.
A classical convolutional network is composed of alternating layers of convolution and pooling
(i.e. subsampling). The aim of the first convolutional layer is to extract patterns found within local
regions of the input images that are common throughout the dataset. This is done by convolving a
template or filter over the input image pixels, computing the inner product of the template at every
location in the image and outputting this as a feature map c, for each filter in the layer. This output
is a measure of how well the template matches each portion of the image. A non-linear functionf()
is then applied element-wise to each feature map c: a = f(c). The resulting activations aare then
passed to the pooling layer. This aggregates the information within a set of small local regions, R,
producing a pooled feature map s(of smaller size) as output. Denoting the aggregation function as
pool(), for each feature map cwe have:
sj = pool(f(ci)) ∀i∈Rj (1)
where Rj is pooling region jin feature map cand iis the index of each element within it.
The motivation behind pooling is that the activations in the pooled map sare less sensitive to the
precise locations of structures within the image than the original feature map c. In a multi-layer
model, the convolutional layers, which take the pooled maps as input, can thus extract features
that are increasingly invariant to local transformations of the input image. This is important for
classification tasks, since these transformations obfuscate the object identity.
A range of functions can be used for f(), with tanh() and logistic functions being popular choices.
In this is paper we use a linear rectification function f(c) = max(0,c) as the non-linearity. In
general, this has been shown [10] to have significant benefits over tanh() or logistic functions.
However, it is especially suited to our pooling mechanism since: (i) our formulation involves the
non-negativity of elements in the pooling regions and (ii) the clipping of negative responses intro-
duces zeros into the pooling regions, ensuring that the stochastic sampling is selecting from a few
specific locations (those with strong responses), rather than all possible locations in the region.
There are two conventional choices for pool(): average and max. The former takes the arithmetic
mean of the elements in each pooling region:
sj = 1
|Rj|
∑
i∈Rj
ai (2)
while the max operation selects the largest element:
sj = max
i∈Rj
ai (3)
Both types of pooling have drawbacks when training deep convolutional networks. In average pool-
ing, all elements in a pooling region are considered, even if many have low magnitude. When com-
bined with linear rectification non-linearities, this has the effect of down-weighting strong activa-
tions since many zero elements are included in the average. Even worse, withtanh() non-linearities,
strong positive and negative activations can cancel each other out, leading to small pooled responses.
While max pooling does not suffer from these drawbacks, we find it easily overfits the training set
in practice, making it hard to generalize well to test examples. Our proposed pooling scheme has
the advantages of max pooling but its stochastic nature helps prevent over-fitting.
3 Stochastic Pooling
In stochastic pooling, we select the pooled map response by sampling from a multinomial distri-
bution formed from the activations of each pooling region. More precisely, we first compute the
probabilities pfor each region jby normalizing the activations within the region:
pi = ai∑
k∈Rj ak
(4)
2
We then sample from the multinomial distribution based on pto pick a location lwithin the region.
The pooled activation is then simply al:
sj = al where l∼P(p1,...,p |Rj |) (5)
The procedure is illustrated in Fig. 1. The samples for each pooling region in each layer for each
training example are drawn independently to one another. When back-propagating through the
network this same selected location lis used to direct the gradient back through the pooling region,
analogous to back-propagation with max pooling.
Max pooling only captures the strongest activation of the filter template with the input for each
region. However, there may be additional activations in the same pooling region that should be
taken into account when passing information up the network and stochastic pooling ensures that
these non-maximal activations will also be utilized.
★!
a)!Image!
b)!Filter!
c)!Rec0fied!Linear! e)!Probabili0es,!pi
0! 0! 0!
0!0!
0!0!
1.6!
2.4!
0! 0! 0!
0!0!
0!0!
0.4!
0.6!
d)!Ac0va0ons,!ai
1.6!
f)!Sampled!!
!!!!Ac0va0on,!s!
Sample!a!loca0on!
from!P():!e.g.!!l = 1
Figure 1: Toy example illustrating stochastic pooling. a) Input image. b) Convolutional filter. c)
Rectified linear function. d) Resulting activations within a given pooling region. e) Probabilities
based on the activations. f) Sampled activation. Note that the selected element for the pooling region
may not be the largest element. Stochastic pooling can thus represent multi-modal distributions of
activations within a region.
3.1 Probabilistic Weighting at Test Time
Using stochastic pooling at test time introduces noise into the network’s predictions which we found
to degrade performance (see Section 4.7). Instead, we use a probabilistic form of averaging. In this,
the activations in each region are weighted by the probability pi (see Eqn. 4) and summed:
sj =
∑
i∈Rj
piai (6)
This differs from standard average pooling because each element has a potentially different weight-
ing and the denominator is the sum of activations ∑
i∈Rj ai, rather than the pooling region size
|Rj|. In practice, using conventional average (or sum) pooling results in a huge performance drop
(see Section 4.7).
Our probabilistic weighting can be viewed as a form of model averaging in which each setting of
the locations l in the pooling regions defines a new model. At training time, sampling to get new
locations produces a new model since the connection structure throughout the network is modified.
At test time, using the probabilities instead of sampling, we effectively get an estimate of averaging
over all of these possible models without having to instantiate them. Given a network architecture
with ddifferent pooling regions, each of size n, the number of possible models is nd where dcan
be in the 104-106 range and nis typically 4,9, or 16 for example (corresponding to 2 ×2, 3 ×3 or
4 ×4 pooling regions). This is a significantly larger number than the model averaging that occurs
in dropout [2], where n = 2 always (since an activation is either present or not). In Section 4.7
we confirm that using this probability weighting achieves similar performance compared to using a
large number of model instantiations, while requiring only one pass through the network.
Using the probabilities for sampling at training time and for weighting the activations at test time
leads to state-of-the-art performance on many common benchmarks, as we now demonstrate.
3
CIFAR&100)
CIFAR&10)
SVHN)
MNIST)
mean) Local)CN) mean) mean)
a)) d)) e)) g))
h))f))c))b)) !" !" !"
Figure 2: A selection of images from each of the datasets we evaluated. The top row shows the
raw images while the bottom row are the preprocessed versions of the images we used for training.
The CIFAR datasets (f,h) show slight changes by subtracting the per pixel mean, whereas SVHN
(b) is almost indistinguishable from the original images. This prompted the use of local contrast
normalization (c) to normalize the extreme brightness variations and color changes for SVHN.
4 Experiments
4.1 Overview
We compare our method to average and max pooling on a variety of image classification tasks. In
all experiments we use mini-batch gradient descent with momentum to optimize the cross entropy
between our network’s prediction of the class and the ground truth labels. For a given parameter x
at time tthe weight updates added to the parameters, ∆xt are ∆xt = 0.9∆xt−1 −ϵgt where gt is
the gradient of the cost function with respect to that parameter at time taveraged over the batch and
ϵis a learning rate set by hand.
All experiments were conducted using an extremely efficient C++ GPU convolution library [6]
wrapped in MATLAB using GPUmat [14], which allowed for rapid development and experimenta-
tion. We begin with the same network layout as in Hinton et al.’s dropout work [2], which has 3
convolutional layers with 5x5 filters and 64 feature maps per layer with rectified linear units as their
outputs. We use this same model and train for 280 epochs in all experiments aside from one addi-
tional model in Section 4.5 that has 128 feature maps in layer 3 and is trained for 500 epochs. Unless
otherwise specified we use 3 ×3 pooling with stride 2 (i.e. neighboring pooling regions overlap by
1 element along the borders) for each of the 3 pooling layers. Additionally, after each pooling layer
there is a response normalization layer (as in [2]), which normalizes the pooling outputs at each
location over a subset of neighboring feature maps. This typically helps training by suppressing
extremely large outputs allowed by the rectified linear units as well as helps neighboring features
communicate. Finally, we use a single fully-connected layer with soft-max outputs to produce the
network’s class predictions. We applied this model to four different datasets: MNIST, CIFAR-10,
CIFAR-100 and Street View House Numbers (SVHN), see Fig. 2 for examples images.
4.2 CIFAR-10
We begin our experiments with the CIFAR-10 dataset where convolutional networks and methods
such as dropout are known to work well [2, 5]. This dataset is composed of 10 classes of natural
images with 50,000 training examples in total, 5,000 per class. Each image is an RGB image of size
32x32 taken from the tiny images dataset and labeled by hand. For this dataset we scale to [0,1]
and follow Hinton et al.’s [2] approach of subtracting the per-pixel mean computed over the dataset
from each image as shown in Fig. 2(f).
4
50 100 150 200 2500
5
10
15
20
25
30
35
Epochs
% Error
Avg (train)
Avg (test)
Max (train)
Max (test)
Stochastic (train)
Stochastic (test)
Figure 3: CIFAR-10 train and test error rates throughout training for average, max, and stochastic
pooling. Max and average pooling test errors plateau as those methods overfit. With stochastic
pooling, training error remains higher while test errors continue to decrease.1
Cross-validating with a set of 5,000 CIFAR-10 training images, we found a good value for the
learning rate ϵto be 10−2 for convolutional layers and 1 for the final softmax output layer. These
rates were annealed linearly throughout training to 1/100thof their original values. Additionally,
we found a small weight decay of 0.001 to be optimal and was applied to all layers. These hyper-
parameter settings found through cross-validation were used for all other datasets in our experiments.
Using the same network architecture described above, we trained three models using average, max
and stochastic pooling respectively and compare their performance. Fig. 3 shows the progression of
train and test errors over 280 training epochs. Stochastic pooling avoids over-fitting, unlike average
and max pooling, and produces less test errors. Table 1 compares the test performance of the three
pooling approaches to the current state-of-the-art result on CIFAR-10 which uses no data augmenta-
tion but adds dropout on an additional locally connected layer [2]. Stochastic pooling surpasses this
result by 0.47% using the same architecture but without requiring the locally connected layer.
Train Error % Test Error %
3-layer Conv. Net [2] – 16.6
3-layer Conv. Net + 1 Locally Conn. layer with dropout [2] – 15.6
Avg Pooling 1.92 19.24
Max Pooling 0.0 19.40
Stochastic Pooling 3.40 15.13
Table 1: CIFAR-10 Classification performance for various pooling methods in our model compared
to the state-of-the-art performance [2] with and without dropout.
To determine the effect of the pooling region size on the behavior of the system with stochastic
pooling, we compare the CIFAR-10 train and test set performance for 5x5, 4x4, 3x3, and 2x2 pooling
sizes throughout the network in Fig. 4. The optimal size appears to be 3x3, with smaller regions over-
fitting and larger regions possibly being too noisy during training. At all sizes the stochastic pooling
outperforms both max and average pooling.
4.3 MNIST
The MNIST digit classification task is composed of 28x28 images of the 10 handwritten digits [8].
There are 60,000 training images with 10,000 test images in this benchmark. The images are scaled
to [0,1] and we do not perform any other pre-processing.
During training, the error using both stochastic pooling and max pooling dropped quickly, but the
latter completely overfit the training data. Weight decay prevented average pooling from over-fitting,
but had an inferior performance to the other two methods. Table 2 compares the three pooling ap-
proaches to state-of-the-art methods on MNIST, which also utilize convolutional networks. Stochas-
1Weight decay prevented training errors from reaching 0 with average and stochastic pooling methods and
required the high number of epochs for training. All methods performed slightly better with weight decay.
5
16.55
15.13
15.71
15.86
3.18
3.4
4.38
6.4
21.11
19.53
18.59
19.25
0
0
0
0
20.74
19.52
18.83
19.38
0.25
1.8
4.88
9.08
0
5
10
15
20
25
2x2
3x3
4x4
5x5
%
Error
Pooling
Region
Size
Avg
Train
Avg
Test
Max
Train
Max
Test
Stochas>c
Train
Stochas>c
Test
Figure 4: CIFAR-10 train and test error rates for various pooling region sizes with each method.
tic pooling outperforms all other methods that do not use data augmentation methods such as jittering
or elastic distortions [7]. The current state-of-the-art single model approach by Ciresanet al.[1] uses
elastic distortions to augment the original training set. As stochastic pooling is a different type of
regularization, it could be combined with data augmentation to further improve performance.
Train Error % Test Error %
2-layer Conv. Net + 2-layer Classifier [3] – 0.53
6-layer Conv. Net + 2-layer Classifier + elastic distortions [1] – 0.35
Avg Pooling 0.57 0.83
Max Pooling 0.04 0.55
Stochastic Pooling 0.33 0.47
Table 2: MNIST Classification performance for various pooling methods. Rows 1 & 2 show the
current state-of-the-art approaches.
4.4 CIFAR-100
The CIFAR-100 dataset is another subset of the tiny images dataset, but with 100 classes [5]. There
are 50,000 training examples in total (500 per class) and 10,000 test examples. As with the CIFAR-
10, we scale to [0,1] and subtract the per-pixel mean from each image as shown in Fig. 2(h). Due
to the limited number of training examples per class, typical pooling methods used in convolutional
networks do not perform well, as shown in Table 3. Stochastic pooling outperforms these methods
by preventing over-fitting and surpasses what we believe to be the state-of-the-art method by2.66%.
Train Error % Test Error %
Receptive Field Learning [4] – 45.17
Avg Pooling 11.20 47.77
Max Pooling 0.17 50.90
Stochastic Pooling 21.22 42.51
Table 3: CIFAR-100 Classification performance for various pooling methods compared to the state-
of-the-art method based on receptive field learning.
4.5 Street View House Numbers
The Street View House Numbers (SVHN) dataset is composed of 604,388 images (using both the
difficult training set and simpler extra set) and 26,032 test images [11]. The goal of this task is to
classify the digit in the center of each cropped 32x32 color image. This is a difficult real world
problem since multiple digits may be visible within each image. The practical application of this is
to classify house numbers throughout Google’s street view database of images.
We found that subtracting the per-pixel mean from each image did not really modify the statistics
of the images (see Fig. 2(b)) and left large variations of brightness and color that could make clas-
6
sification more difficult. Instead, we utilized local contrast normalization (as in [12]) on each of the
three RGB channels to pre-process the images Fig. 2(c). This normalized the brightness and color
variations and helped training proceed quickly on this relatively large dataset.
Despite having significant amounts of training data, a large convolutional network can still overfit.
For this dataset, we train an additional model for 500 epochs with 64, 64 and 128 feature maps in
layers 1, 2 and 3 respectively. Our stochastic pooling helps to prevent overfitting even in this large
model (denoted 64-64-128 in Table 4), despite training for a long time. The existing state-of-the-
art on this dataset is the multi-stage convolutional network of Sermanet et al.[12], but stochastic
pooling beats this by 2.10% (relative gain of 43%).
Train Error % Test Error %
Multi-Stage Conv. Net + 2-layer Classifier [12] – 5.03
Multi-Stage Conv. Net + 2-layer Classifer + padding [12] – 4.90
64-64-64 Avg Pooling 1.83 3.98
64-64-64 Max Pooling 0.38 3.65
64-64-64 Stochastic Pooling 1.72 3.13
64-64-128 Avg Pooling 1.65 3.72
64-64-128 Max Pooling 0.13 3.81
64-64-128 Stochastic Pooling 1.41 2.80
Table 4: SVHN Classification performance for various pooling methods in our model with 64 or
128 layer 3 feature maps compared to state-of-the-art results with and without data augmentation.
4.6 Reduced Training Set Size
To further illustrate the ability of stochastic pooling to prevent over-fitting, we reduced the training
set size on MINST and CIFAR-10 datasets. Fig. 5 shows test performance when training on a
random selection of only 1000, 2000, 3000, 5000, 10000, half, or the full training set. In most cases,
stochastic pooling overfits less than the other pooling approaches.
1000 2000 3000 5000 10000 30000 600000
1
2
3
4
5
6
7
8
9
# of Training Cases
% Error
Avg
Max
Stochastic
1000 2000 3000 5000 10000 25000 5000015
20
25
30
35
40
45
50
55
60
65
# of Training Cases
% Error
Avg
Max
Stochastic
Figure 5: Test error when training with reduced dataset sizes on MNIST (left) and CIFAR-10 (right).
Stochastic pooling generally overfits the least.
4.7 Importance of Model Averaging
To analyze the importance of stochastic sampling at training time and probability weighting at test
time, we use different methods of pooling when training and testing on CIFAR-10 (see Table 5).
Choosing the locations stochastically at test time degrades performance slightly as could be ex-
pected, however it still outperforms models where max or average pooling are used at test time. To
confirm that probability weighting is a valid approximation to averaging many models, we draw N
samples of the pooling locations throughout the network and average the output probabilities from
those N models (denoted Stochastic-N in Table 5). As N increases, the results approach the prob-
ability weighting method, but have the obvious downside of an N-fold increase in computations.
Using a model trained with max or average pooling and using stochastic pooling at test time per-
forms poorly. This suggests that training with stochastic pooling, which incorporates non-maximal
elements and sampling noise, makes the model more robust at test time. Furthermore, if these non-
maximal elements are not utilized correctly or the scale produced by the pooling function is not
correct, such as if average pooling is used at test time, a drastic performance hit is seen.
7
When using probability weighting during training, the network easily over-fits and performs sub-
optimally at test time using any of the pooling methods. However, the benefits of probability
weighting at test time are seen when the model has specifically been trained to utilize it through
either probability weighting or stochastic pooling at training time.
Train Method Test Method Train Error % Test Error %
Stochastic Pooling Probability Weighting 3.20 15.20
Stochastic Pooling Stochastic Pooling 3.20 17.49
Stochastic Pooling Stochastic-10 Pooling 3.20 15.51
Stochastic Pooling Stochastic-100 Pooling 3.20 15.12
Stochastic Pooling Max Pooling 3.20 17.66
Stochastic Pooling Avg Pooling 3.20 53.50
Probability Weighting Probability Weighting 0.0 19.40
Probability Weighting Stochastic Pooling 0.0 24.00
Probability Weighting Max Pooling 0.0 22.45
Probability Weighting Avg Pooling 0.0 58.97
Max Pooling Max Pooling 0.0 19.40
Max Pooling Stochastic Pooling 0.0 32.75
Max Pooling Probability Weighting 0.0 30.00
Avg Pooling Avg Pooling 1.92 19.24
Avg Pooling Stochastic Pooling 1.92 44.25
Avg Pooling Probability Weighting 1.92 40.09
Table 5: CIFAR-10 Classification performance for various train and test combinations of pooling
methods. The best performance is obtained by using stochastic pooling when training (to prevent
over-fitting), while using the probability weighting at test time.
4.8 Visualizations
Some insight into the mechanism of stochastic pooling can be gained by using a deconvolutional
network of Zeiler et al.[15] to provide a novel visualization of our trained convolutional network.
The deconvolutional network has the same components (pooling, filtering) as a convolutional net-
work but are inverted to act as a top-down decoder that maps the top-layer feature maps back to the
input pixels. The unpooling operation uses the stochastically chosen locations selected during the
forward pass. The deconvolution network filters (now applied to the feature maps, rather than the
input) are the transpose of the feed-forward filters, as in an auto-encoder with tied encoder/decoder
weights. We repeat this top-down process until the input pixel level is reached, producing the vi-
sualizations in Fig. 6. With max pooling, many of the input image edges are present, but average
pooling produces a reconstruction with no discernible structure. Fig. 6(a) shows 16 examples of
pixel-space reconstructions for different location samples throughout the network. The reconstruc-
tions are similar to the max pooling case, but as the pooling locations change they result in small
local deformations of the visualized image.
Despite the stochastic nature of the model, the multinomial distributions effectively capture the reg-
ularities of the data. To demonstrate this, we compare the outputs produced by a deconvolutional
network when sampling using the feedforward (FF) proabilities versus sampling from uniform (UN)
distributions. In contrast to Fig. 6(a) which uses only feedforward proabilities, Fig. 6(b-h) replace
one or more of the pooling layers’ distributions with uniform distributions. The feed forward proba-
bilities encode significant structural information, especially in the lower layers of the model. Addi-
tional visualizations and videos of the sampling process are provided as supplementary material at
www.matthewzeiler.com/pubs/iclr2013/.
5 Discussion
We propose a simple and effective stochastic pooling strategy that can be combined with any other
forms of regularization such as weight decay, dropout, data augmentation, etc. to prevent over-
fitting when training deep convolutional networks. The method is also intuitive, selecting from
information the network is already providing, as opposed to methods such as dropout which throw
information away. We show state-of-the-art performance on numerous datasets, when comparing to
other approaches that do not employ data augmentation. Furthermore, our method has negligible
computational overhead and no hyper-parameters to tune, thus can be swapped into to any existing
convolutional network architecture.
8
a)
FF(3)
–
FF(2)
–
FF(1)
b)
UN(3)
–
FF(2)
–
FF(1)
c)
FF(3)
–
UN(2)
–
FF(1)
d)
FF(3)
–
FF(2)
–
UN(1)
h)
UN(3)
–
UN(2)
–
UN(1)
e)
UN(3)
–
UN(2)
–
FF(1)
g)
FF(3)
–
UN(2)
–
UN(1)
f)
FF(3)
–
UN(2)
–
UN(1)
Image
Avg
Max
Figure 6: Top down visualizations from the third layer feature map activations for the horse image
(far left). Max and average pooling visualizations are also shown on the left. (a)–(h): Each image
in a 4x4 block is one instantiation of the pooling locations using stochastic pooling. For sampling
the locations, each layer (indicated in parenthesis) can either use: (i) the multinomial distribution
over a pooling region derived from the feed-forward (FF) activations as in Eqn. 4, or (ii) a uniform
(UN) distribution. We can see that the feed-forward probabilities encode much of the structure in
the image, as almost all of it is lost when uniform sampling is used, especially in the lower layers.
References
[1] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and J. Schmidhuber. Flexible, high
performance convolutional neural networks for image classification. In IJCAI, 2011.
[2] G.E. Hinton, N. Srivastave, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving
neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
[3] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y . LeCun. What is the best multi-stage architec-
ture for object recognition? In ICCV, 2009.
[4] Y . Jia and C. Huang. Beyond spatial pyramids: Receptive field learning for pooled image
features. In NIPS Workshops, 2011.
[5] A. Krizhevsky. Learning multiple layers of featurs from tiny images. Technical Report TR-
2009, University of Toronto, 2009.
[6] A. Krizhevsky. cuda-convnet. http://code.google.com/p/cuda-convnet/, 2012.
[7] Y . LeCun. The MNIST database. http://yann.lecun.com/exdb/mnist/, 2012.
[8] Y . LeCun, L. Bottou, Y . Bengio, and P. Haffner. Gradient-based learning applied to document
recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[9] G. Montavon, G. Orr, and K.-R. Muller, editors. Neural Networks: Tricks of the Trade.
Springer, San Francisco, 2012.
[10] V . Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In
ICML, 2010.
[11] Y . Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y . Ng. Reading digits in natural
images with unsupervised feature learning. In NIPS Workshop, 2011.
[12] P. Sermanet, S. Chintala, and Y . LeCun. Convolutional neural networks applied to house
numbers digit classification. In ICPR, 2012.
[13] P. Simard, D. Steinkraus, and J. Platt. Best practices for convolutional neural networks applied
to visual document analysis. In ICDAR, 2003.
[14] http://gp-you.org/. GPUmat. http://sourceforge.net/projects/
gpumat/, 2012.
[15] M. Zeiler, G. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level
feature learning. In ICCV, 2011.
9
|
Matthew Zeiler, Rob Fergus
|
Unknown
| 2,013
|
{"id": "l_PClqDdLb5Bp", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358408700000, "tmdate": 1358408700000, "ddate": null, "number": 14, "content": {"title": "Stochastic Pooling for Regularization of Deep Convolutional Neural\r\n Networks", "decision": "conferenceOral-iclr2013-conference", "abstract": "We introduce a simple and effective method for regularizing large convolutional neural networks. We replace the conventional deterministic pooling operations with a stochastic procedure, randomly picking the activation within each pooling region according to a multinomial distribution, given by the activities within the pooling region. The approach is hyper-parameter free and can be combined with other regularization approaches, such as dropout and data augmentation. We achieve state-of-the-art performance on four image datasets, relative to other approaches that do not utilize data augmentation.", "pdf": "https://arxiv.org/abs/1301.3557", "paperhash": "zeiler|stochastic_pooling_for_regularization_of_deep_convolutional_neural_networks", "keywords": [], "conflicts": [], "authors": ["Matthew Zeiler", "Rob Fergus"], "authorids": ["zeiler@cs.nyu.edu", "robfergus@gmail.com"]}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["zeiler@cs.nyu.edu"], "writers": []}
|
[Review]:
I apologize for the delay in my reply.
Verdict: weak accept.
|
anonymous reviewer f4a8
| null | null |
{"id": "1toZvrIP-Xvme", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1394470860000, "tmdate": 1394470860000, "ddate": null, "number": 8, "content": {"title": "", "review": "I apologize for the delay in my reply.\r\nVerdict: weak accept."}, "forum": "l_PClqDdLb5Bp", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "l_PClqDdLb5Bp", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f4a8"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 2
}
| 0.5
| -1.409674
| 1.909674
| 0.501183
| 0.015256
| 0.001183
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
{
"criticism": 0.5,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 0.5
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
kk_XkMO0-dP8W
|
Feature Learning in Deep Neural Networks - A Study on Speech Recognition
Tasks
|
Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.
|
Feature Learning in Deep Neural Networks – Studies
on Speech Recognition Tasks
Dong Yu, Michael L. Seltzer, Jinyu Li1, Jui-Ting Huang1, Frank Seide2
Microsoft Research, Redmond, W A 98052
1Microsoft Corporation, Redmond, W A 98052
2Microsoft Research Asia, Beijing, P.R.C.
{dongyu,mseltzer,jinyli,jthuang,fseide}@microsoft.com
Abstract
Recent studies have shown that deep neural networks (DNNs) perform signifi-
cantly better than shallow networks and Gaussian mixture models (GMMs) on
large vocabulary speech recognition tasks. In this paper, we argue that the im-
proved accuracy achieved by the DNNs is the result of their ability to extract dis-
criminative internal representations that are robust to the many sources of variabil-
ity in speech signals. We show that these representations become increasingly in-
sensitive to small perturbations in the input with increasing network depth, which
leads to better speech recognition performance with deeper networks. We also
show that DNNs cannot extrapolate to test samples that are substantially differ-
ent from the training examples. If the training data are sufficiently representative,
however, internal features learned by the DNN are relatively stable with respect
to speaker differences, bandwidth differences, and environment distortion. This
enables DNN-based recognizers to perform as well or better than state-of-the-art
systems based on GMMs or shallow networks without the need for explicit model
adaptation or feature normalization.
1 Introduction
Automatic speech recognition (ASR) has been an active research area for more than five decades.
However, the performance of ASR systems is still far from satisfactory and the gap between ASR and
human speech recognition is still large on most tasks. One of the primary reasons speech recognition
is challenging is the high variability in speech signals. For example, speakers may have different
accents, dialects, or pronunciations, and speak in different styles, at different rates, and in different
emotional states. The presence of environmental noise, reverberation, different microphones and
recording devices results in additional variability. To complicate matters, the sources of variability
are often nonstationary and interact with the speech signal in a nonlinear way. As a result, it is
virtually impossible to avoid some degree of mismatch between the training and testing conditions.
Conventional speech recognizers use a hidden Markov model (HMM) in which each acoustic state
is modeled by a Gaussian mixture model (GMM). The model parameters can be discriminatively
trained using an objective function such as maximum mutual information (MMI) [1] or minimum
phone error rate (MPE) [2]. Such systems are known to be susceptible to performance degrada-
tion when even mild mismatch between training and testing conditions is encountered. To combat
this, a variety of techniques has been developed. For example, mismatch due to speaker differ-
ences can be reduced by V ocal Tract Length Normalization (VTLN) [3], which nonlinearly warps
the input feature vectors to better match the acoustic model, or Maximum Likelihood Linear Re-
gression (MLLR) [4], which adapt the GMM parameters to be more representative of the test data.
Other techniques such as Vector Taylor Series (VTS) adaptation are designed to address the mis-
match caused by environmental noise and channel distortion [5]. While these methods have been
1
arXiv:1301.3605v3 [cs.LG] 8 Mar 2013
successful to some degree, they add complexity and latency to the decoding process. Most require
multiple iterations of decoding and some only perform well with ample adaptation data, making
them unsuitable for systems that process short utterances, such as voice search.
Recently, an alternative acoustic model based on deep neural networks (DNNs) has been proposed.
In this model, a collection of Gaussian mixture models is replaced by a single context-dependent
deep neural network (CD-DNN). A number of research groups have obtained strong results on a
variety of large scale speech tasks using this approach [6–13]. Because the temporal structure of the
HMM is maintained, we refer to these models as CD-DNN-HMM acoustic models.
In this paper, we analyze the performance of DNNs for speech recognition and in particular, exam-
ine their ability to learn representations that are robust to variability in the acoustic signal. To do
so, we interpret the DNN as a joint model combining a nonlinear feature transformation and a log-
linear classifier. Using this view, we show that the many layers of nonlinear transforms in a DNN
convert the raw features into a highly invariant and discriminative representation which can then be
effectively classified using a log-linear model. These internal representations become increasingly
insensitive to small perturbations in the input with increasing network depth. In addition, the classi-
fication accuracy improves with deeper networks, although the gain per layer diminishes. However,
we also find that DNNs are unable to extrapolate to test samples that are substantially different from
the training samples. A series of experiments demonstrates that if the training data are sufficiently
representative, the DNN learns internal features that are relatively invariant to sources of variability
common in speech recognition such as speaker differences and environmental distortions. This en-
ables DNN-based speech recognizers to perform as well or better than state-of-the-art GMM-based
systems without the need for explicit model adaptation or feature normalization algorithms.
The rest of the paper is organized as follows. In Section 2 we briefly describe DNNs and illustrate
the feature learning interpretation of DNNs. In Section 3 we show that DNNs can learn invariant
and discriminative features and demonstrate empirically that higher layer features are less sensitive
to perturbations of the input. In Section 4 we point out that the feature generalization ability is
effective only when test samples are small perturbations of training samples. Otherwise, DNNs
perform poorly as indicated in our mixed-bandwidth experiments. We apply this analysis to speaker
adaptation in Section 5 and find that deep networks learn speaker-invariant representations, and to
the Aurora 4 noise robustness task in Section 6 where we show that a DNN can achieve performance
equivalent to the current state of the art without requiring explicit adaptation to the environment. We
conclude the paper in Section 7.
2 Deep Neural Networks
A deep neural network (DNN) is conventional multi-layer perceptron (MLP) with many hidden
layers (thus deep). If the input and output of the DNN are denoted as x and y, respectively, a
DNN can be interpreted as a directed graphical model that approximates the posterior probability
py|x(y= s|x) of a class sgiven an observation vector x, as a stack of (L+ 1)layers of log-linear
models. The first Llayers model the posterior probabilities of hidden binary vectors hℓ given input
vectors vℓ. If hℓ consists of Nℓ hidden units, each denoted as hℓ
j, the posterior probability can be
expressed as
pℓ(hℓ|vℓ) =
Nℓ
∏
j=1
ezℓ
j(vℓ)·hℓ
j
ezℓ
j(vℓ)·1 + ezℓ
j(vℓ)·0 , 0 ≤ℓ<L
where zℓ(vℓ) = (Wℓ)T vℓ + aℓ, and Wℓ and aℓ represent the weight matrix and bias vector in the
ℓ-th layer, respectively. Each observation is propagated forward through the network, starting with
the lowest layer(v0 = x) . The output variables of each layer become the input variables of the next,
i.e. vℓ+1 = hℓ. In the final layer, the class posterior probabilities are computed as a multinomial
distribution
py|x(y= s|x) = pL(y= s|vL) = ezL
s (vL)
∑
s′ ezL
s′ (vL) = softmaxs
(
vL)
. (1)
Note that the equality between py|x(y = s|x) and pL(y = s|vL) is valid by making a mean-field
approximation [14] at each hidden layer.
2
In the DNN, the estimation of the posterior probability py|x(y= s|x) can also be considered a two-
step deterministic process. In the first step, the observation vectorxis transformed to another feature
vector vL through L layers of non-linear transforms.In the second step, the posterior probability
py|x(y = s|x) is estimated using the log-linear model (1) given the transformed feature vector vL.
If we consider the first L layers fixed, learning the parameters in the softmax layer is equivalent
to training a conditional maximum-entropy (MaxEnt) model on features vL. In the conventional
MaxEnt model, features are manually designed [15]. In DNNs, however, the feature representations
are jointly learned with the MaxEnt model from the data. This not only eliminates the tedious and
potentially erroneous process of manual feature extraction but also has the potential to automatically
extract invariant and discriminative features, which are difficult to construct manually.
In all the following discussions, we use DNNs in the framework of the CD-DNN-HMM [6–10]
and use speech recognition as our classification task. The detailed training procedure and decoding
technique for CD-DNN-HMMs can be found in [6–8].
3 Invariant and discriminative features
3.1 Deeper is better
Using DNNs instead of shallow MLPs is a key component to the success of CD-DNN-HMMs. Ta-
ble 1, which is extracted from [8], summarizes the word error rates (WER) on the Switchboard
(SWB) [16] Hub5’00-SWB test set. Switchboard is a corpus of conversational telephone speech.
The system was trained using the 309-hour training set with labels generated by Viterbi align-
ment from a maximum likelihood (ML) trained GMM-HMM system. The labels correspond to
tied-parameter context-dependent acoustic states called senones. Our baseline WER with the cor-
responding discriminatively trained traditional GMM-HMM system is 23.6%, while the best CD-
DNN-HMM achives 17.0%—a 28% relative error reduction (it is possible to further improve the
DNN to a one-third reduction by realignment [8]).
We can observe that deeper networks outperform shallow ones. The WER decreases as the number
of hidden layers increases, using a fixed layer size of 2048 hidden units. In other words, deeper mod-
els have stronger discriminative ability than shallow models. This is also reflected in the improve-
ment of the training criterion (not shown). More interestingly, if architectures with an equivalent
number of parameters are compared, the deep models consistently outperform the shallow models
when the deep model is sufficiently wide at each layer. This is reflected in the right column of the
table, which shows the performance for shallow networks with the same number of parameters as
the deep networks in the left column. Even if we further increase the size of an MLP with a single
hidden layer to about 16000 hidden units we can only achieve a WER of 22.1%, which is signifi-
cantly worse than the 17.1% WER that is obtained using a 7×2k DNN under the same conditions.
Note that as the number of hidden layers further increases, only limited additional gains are obtained
and performance saturates after 9 hidden layers. The 9x2k DNN performs equally well as a 5x3k
DNN which has more parameters. In practice, a tradeoff needs to be made between the width of
each layer, the additional reduction in WER and the increased cost of training and decoding as the
number of hidden layers is increased.
3.2 DNNs learn more invariant features
We have noticed that the biggest benefit of using DNNs over shallow models is that DNNs learn more
invariant and discriminative features. This is because many layers of simple nonlinear processing
can generate a complicated nonlinear transform. To show that this nonlinear transform is robust to
small variations in the input features, let’s assume the output of layerl−1, or equivalently the input
to the layer lis changed from vℓ to vℓ + δℓ, where δℓ is a small change. This change will cause the
output of layer l, or equivalently the input to the layer ℓ+ 1to change by
δℓ+1 = σ(zℓ(vℓ + δℓ)) −σ(zℓ(vℓ)) ≈diag
(
σ′(zℓ(vℓ))
)
(wℓ)T δℓ.
3
Table 1: Effect of CD-DNN-HMM network depth on WER (%) on Hub5’00-SWB using the 309-
hour Switchboard training set. DBN pretraining is applied.
L×N WER 1 ×N WER
1 ×2k 24.2 – –
2 ×2k 20.4 – –
3 ×2k 18.4 – –
4 ×2k 17.8 – –
5 ×2k 17.2 1 ×3772 22.5
7 ×2k 17.1 1 ×4634 22.6
9 ×2k 17.0 – –
5 ×3k 17.0 – –
– – 1 ×16k 22.1
Figure 1: Percentage of saturated activations at each layer
The norm of the change δℓ+1 is
∥δℓ+1∥≈∥ diag(σ′(zℓ(vℓ)))((wℓ)T δℓ)∥
≤∥diag(σ′(zℓ(vℓ)))(wℓ)T ∥∥δℓ∥
= ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥∥δℓ∥ (2)
where ◦refers to an element-wise product.
Note that the magnitude of the majority of the weights is typically very small if the size of the hidden
layer is large. For example, in a6×2k DNN trained using 30 hours of SWB data, 98% of the weights
in all layers except the input layer have magnitudes less than 0.5.
While each element in vℓ+1 ◦(1 −vℓ+1) is less than or equal to 0.25, the actual value is typically
much smaller. This means that a large percentage of hidden neurons will not be active, as shown in
Figure 1. As a result, the average norm ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 in (2) across a 6-hr SWB
development set is smaller than one in all layers, as indicated in Figure 2. Since all hidden layer
values are bounded in the same range of (0,1), this indicates that when there is a small perturbation
on the input, the perturbation shrinks at each higher hidden layer. In other words, features generated
by higher hidden layers are more invariant to variations than those represented by lower layers.
Note that the maximum norm over the same development set is larger than one, as seen in Figure
2. This is necessary since the differences need to be enlarged around the class boundaries to have
discrimination ability.
4 Learning by seeing
In Section 3, we showed empirically that small perturbations in the input will be gradually shrunk
as we move to the internal representation in the higher layers. In this section, we point out that the
4
Figure 2: Average and maximum ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 across layers on a 6×2k DNN
Figure 3: Illustration of mixed-bandwidth speech recognition using a DNN
above result is only applicable to small perturbations around the training samples. When the test
samples deviate significantly from the training samples, DNNs cannot accurately classify them. In
other words, DNNs must see examples of representative variations in the data during training in
order to generalize to similar variations in the test data.
We demonstrate this point using a mixed-bandwidth ASR study. Typical speech recognizers are
trained on either narrowband speech signals, recorded at 8 kHz, or wideband speech signals,
recorded at 16 kHz. It would be advantageous if a single system could recognize both narrow-
band and wideband speech, i.e. mixed-bandwidth ASR. One such system was recently proposed
using a CD-DNN-HMM [17]. In that work, the following DNN architecture was used for all experi-
ments. The input features were 29 mel-scale log filter-bank outputs together with dynamic features.
An 11-frame context window was used generating an input layer with 29 ·3 ·11 = 957nodes. The
DNN has 7 hidden layers, each with 2048 nodes. The output layer has 1803 nodes, corresponding
to the number of senones determined by the GMM system.
The 29-dimensional filter bank has two parts: the first 22 filters span 0–4 kHz and the last 7 filters
span 4–8 kHz, with the center frequency of the first filter in the higher filter bank at 4 kHz. When the
speech is wideband, all 29 filters have observed values. However, when the speech is narrowband,
the high-frequency information was not captured so the final 7 filters are set to 0. Figure 3 illustrates
the architecture of the mixed-bandwidth ASR system.
Experiments were conducted on a mobile voice search (VS) corpus. This task consists of internet
search queries made by voice on a smartphone.There are two training sets, VS-1 and VS-2, con-
sisting of 72 and 197 hours of wideband audio data, respectively. These sets were collected during
5
Table 2: WER (%) on wideband (16k) and narrowband (8k) test sets with and without narrowband
training data.
training data 16 kHz VS-T 8 kHz VS-T
16 kHz VS-1 + 16 kHz VS-2 27.5 53.5
16 kHz VS-1 + 8 kHz VS-2 28.3 29.3
different times of year. The test set, called VS-T, has 26757 words in 9562 utterances. The narrow
band training and test data were obtained by downsampling the wideband data.
Table 2 summarizes the WER on the wideband and narrowband test sets when the DNN is trained
with and without narrowband speech. From this table, it is clear that if all training data are wideband,
the DNN performs well on the wideband test set (27.5% WER) but very poorly on the narrowband
test set (53.5% WER). However, if we convert VS-2 to narrowband speech and train the same DNN
using mixed-bandwidth data (second row), the DNN performs very well on both wideband and
narrowband speech.
To understand the difference between these two scenarios, we take the output vectors at each layer
for the wideband and narrowband input feature pairs, hℓ(xwb) and hℓ(xnb), and measure their Eu-
clidean distance. For the top layer, whose output is the senone posterior probability, we calculate
the KL-divergence in nats between py|x(sj|xwb) and py|x(sj|xnb). Table 3 shows the statistics of dl
and dy over 40,000 frames randomly sampled from the test set for the DNN trained using wideband
speech only and the DNN trained using mixed-bandwidth speech.
Table 3: Euclidean distance for the output vectors at each hidden layer (L1-L7) and the KL di-
vergence (nats) for the posteriors at the top layer between the narrowband (8 kHz) and wideband
(16 kHz) input features, measured using the wideband DNN or the mixed-bandwidth DNN.
wideband DNN mixed-band DNN
layer dist mean variance mean variance
L1
Eucl
13.28 3.90 7.32 3.62
L2 10.38 2.47 5.39 1.28
L3 8.04 1.77 4.49 1.27
L4 8.53 2.33 4.74 1.85
L5 9.01 2.96 5.39 2.30
L6 8.46 2.60 4.75 1.57
L7 5.27 1.85 3.12 0.93
Top KL 2.03 – 0.22 –
From Table 3 we can observe that in both DNNs, the distance between hidden layer vectors generated
from the wideband and narrowband input feature pair is significantly reduced at the layers close
to the output layer compared to that in the first hidden layer. Perhaps what is more interesting
is that the average distances and variances in the data-mixed DNN are consistently smaller than
those in the DNN trained on wideband speech only. This indicates that by using mixed-bandwidth
training data, the DNN learns to consider the differences in the wideband and narrowband input
features as irrelevant variations. These variations are suppressed after many layers of nonlinear
transformation. The final representation is thus more invariant to this variation and yet still has the
ability to distinguish between different class labels. This behavior is even more obvious at the output
layer since the KL-divergence between the paired outputs is only 0.22 in the mixed-bandwidth DNN,
much smaller than the 2.03 observed in the wideband DNN.
5 Robustness to speaker variation
A major source of variability is variation across speakers. Techniques for adapting a GMM-HMM to
a speaker have been investigated for decades. Two important techniques are VTLN [3], and feature-
space MLLR (fMLLR) [4]. Both VTLN and fMLLR operate on the features directly, making their
application in the DNN context straightforward.
6
Table 4: Comparison of feature-transform based speaker-adaptation techniques for GMM-HMMs,
a shallow, and a deep NN. Word-error rates in % for Hub5’00-SWB (relative change in parentheses).
GMM-HMM CD-MLP-HMM CD-DNN-HMM
adaptation technique 40 mix 1×2k 7×2k
speaker independent 23.6 24.2 17.1
+ VTLN 21.5 (-9%) 22.5 (-7%) 16.8 (-2%)
+ {fMLLR/fDLR}×4 20.4 (-5%) 21.5 (-4%) 16.4 (-2%)
VTLN warps the frequency axis of the filterbank analysis to account for the fact that the precise lo-
cations of vocal-tract resonances vary roughly monotonically with the physical size of the speaker.
This is done in both training and testing. On the other hand, fMLLR applies an affine transform
to the feature frames such that an adaptation data set better matches the model. In most cases, in-
cluding this work, ‘self-adaptation’ is used: generate labels using unsupervised transcription, then
re-recognize with the adapted model. This process is iterated four times. For GMM-HMMs, fM-
LLR transforms are estimated to maximize the likelihood of the adaptation data given the model.
For DNNs, we instead maximize cross entropy (with back propagation), which is a discriminative
criterion, so we prefer to call this transform feature-space Discriminative Linear Regression (fDLR).
Note that the transform is applied to individual frames, prior to concatenation.
Typically, applying VTLN and fMLLR jointly to a GMM-HMM system will reduce errors by 10–
15%. Initially, similar gains were expected for DNNs as well. However, these gains were not
realized, as shown in Table 4 [9]. The table compares VTLN and fMLLR/fDLR for GMM-HMMs,
a context-dependent ANN-HMM with a single hidden layer, and a deep network with 7 hidden
layers, on the same Switchboard task described in Section 3.1. For this task, test data are very
consistent with the training, and thus, only a small amount of adaptation to other factors such as
recording conditions or environmental factors occurs. We use the same configuration as in Table 1
which is speaker independent using single-pass decoding.
For the GMM-HMM, VTLN achieves a strong relative gain of 9%. VTLN is also effective with the
shallow neural-network system, gaining a slightly smaller 7%. However, the improvement of VTLN
on the deep network with 7 hidden layers is a much smaller 2% gain. Combining VTLN with
fDLR further reduces WER by 5% and 4% relative, for the GMM-HMM and the shallow network,
respectively. The reduction for the DNN is only 2%. We also tried transplanting VTLN and fMLLR
transforms estimated on the GMM system into the DNN, and achieved very similar results [9].
The VTLN and fDLR implementations of the shallow and deep networks are identical. Thus, we
conclude that to a significant degree, the deep neural network is able to learn internal representations
that are invariant with respect to the sources of variability that VTLN and fDLR address.
6 Robustness to environmental distortions
In many speech recognition tasks, there are often cases where the despite the presence of variability
in the training data, significant mismatch between training and test data persists. Environmental
factors are common sources of such mismatch, e.g. ambient noise, reverberation, microphone type
and capture device. The analysis in the previous sections suggests that DNNs have the ability to
generate internal representations that are robust with respect to variability seen in the training data.
In this section, we evaluate the extent to which this invariance can be obtained with respect to
distortions caused by the environment.
We performed a series of experiments on the Aurora 4 corpus [18], a 5000-word vocabulary task
based on the Wall Street Journal (WSJ0) corpus. The experiments were performed with the 16 kHz
multi-condition training set consisting of 7137 utterances from 83 speakers. One half of the ut-
terances was recorded by a high-quality close-talking microphone and the other half was recorded
using one of 18 different secondary microphones. Both halves include a combination of clean speech
and speech corrupted by one of six different types of noise (street traffic, train station, car, babble,
restaurant, airport) at a range of signal-to-noise ratios (SNR) between 10-20 dB.
7
The evaluation set consists of 330 utterances from 8 speakers. This test set was recorded by the pri-
mary microphone and a number of secondary microphones. These two sets are then each corrupted
by the same six noises used in the training set at SNRs between 5-15 dB, creating a total of 14 test
sets. These 14 test sets can then be grouped into 4 subsets, based on the type of distortion: none
(clean speech), additive noise only, channel distortion only, and noise + channel. Notice that the
types of noise are common across training and test sets but the SNRs of the data are not.
The DNN was trained using 24-dimensional log mel filterbank features with utterance-level mean
normalization. The first- and second-order derivative features were appended to the static feature
vectors. The input layer was formed from a context window of 11 frames creating an input layer of
792 input units. The DNN had 7 hidden layers with 2048 hidden units in each layer and the final
softmax output layer had 3206 units, corresponding to the senones of the baseline HMM system.
The network was initialized using layer-by-layer generative pre-training and then discriminatively
trained using back propagation.
In Table 5, the performance obtained by the DNN acoustic model is compared to several other
systems. The first system is a baseline GMM-HMM system, while the remaining systems are repre-
sentative of the state of the art in acoustic modeling and noise and speaker adaptation. All used the
same training set. To the authors’ knowledge, these are the best published results on this task.
The second system combines Minimum Phone Error (MPE) discriminative training [2] and noise
adaptive training (NAT) [19] using VTS adaptation to compensate for noise and channel mismatch
[20]. The third system uses a hybrid generative/discriminative classifier [21] as follows . First, an
adaptively trained HMM with VTS adaptation is used to generate features based on state likelihoods
and their derivatives. Then, these features are input to a discriminative log-linear model to obtain the
final hypothesis. The fourth system uses an HMM trained with NAT and combines VTS adaptation
for environment compensation and MLLR for speaker adaptation [22]. Finally, the last row of the
table shows the performance of the DNN system.
Table 5: A comparison of several systems in the literature to a DNN system on the Aurora 4 task.
Systems
distortion
A VGnone noise channel noise +
(clean) channel
GMM baseline 14.3 17.9 20.2 31.3 23.6
MPE-NAT + VTS [20] 7.2 12.8 11.5 19.7 15.3
NAT + Derivative Kernels [21] 7.4 12.6 10.7 19.0 14.8
NAT + Joint MLLR/VTS [22] 5.6 11.0 8.8 17.8 13.4
DNN (7×2048) 5.6 8.8 8.9 20.0 13.4
It is noteworthy that to obtain good performance, the GMM-based systems required complicated
adaptive training procedures [19, 23] and multiple iterations of recognition in order to perform ex-
plicit environment and/or speaker adaptation. One of these systems required two classifiers. In
contrast, the DNN system required only standard training and a single forward pass for classifi-
cation. Yet, it outperforms the two systems that perform environment adaptation and matches the
performance of a system that adapts to both the environment and speaker.
Finally, we recall the results in Section 4, in which the DNN trained only on wideband data could
not accurately classify narrowband speech. Similarly, a DNN trained only on clean speech has no
ability to learn internal features that are robust to environmental noise. When the DNN for Aurora
4 is trained using only clean speech examples, the performance on the noise- and channel-distorted
speech degrades substantially, resulting in an average WER of 30.6%. This further confirms our
earlier observation that DNNs are robust to modest variations between training and test data but
perform poorly if the mismatch is more severe.
7 Conclusion
In this paper we demonstrated through speech recognition experiments that DNNs can extract more
invariant and discriminative features at the higher layers. In other words, the features learned by
8
DNNs are less sensitive to small perturbations in the input features. This property enables DNNs to
generalize better than shallow networks and enables CD-DNN-HMMs to perform speech recogni-
tion in a manner that is more robust to mismatches in speaker, environment, or bandwidth. On the
other hand, DNNs cannot learn something from nothing. They require seeing representative samples
to perform well. By using a multi-style training strategy and letting DNNs to generalize to similar
patterns, we equaled the best result ever reported on the Aurora 4 noise robustness benchmark task
without the need for multiple recognition passes and model adaptation.
References
[1] L. Bahl, P. Brown, P.V . De Souza, and R. Mercer, “Maximum mutual information estimation of hidden
markov model parameters for speech recognition,” in Proc. ICASSP, Apr, vol. 11, pp. 49–52.
[2] D. Povey and P. C. Woodland, “Minimum phone error and i-smoothing for improved discriminative
training,” in Proc. ICASSP, 2002.
[3] P. Zhan et al., “V ocal tract length normalization for lvcsr,” Tech. Rep. CMU-LTI-97-150, Carnegie Mellon
Univ, 1997.
[4] M. J. F. Gales, “Maximum likelihood linear transformations for HMM-based speech recognition,” Com-
puter Speech and Language, vol. 12, pp. 75–98, 1998.
[5] A. Acero, L. Deng, T. Kristjansson, and J. Zhang, “HMM Adaptation Using Vector Taylor Series for
Noisy Speech Recognition,” in Proc. of ICSLP, 2000.
[6] D. Yu, L. Deng, and G. Dahl, “Roles of pretraining and fine-tuning in context-dependent DBN-HMMs
for real-world speech recognition,” inProc. NIPS Workshop on Deep Learning and Unsupervised Feature
Learning, 2010.
[7] G.E. Dahl, D. Yu, L. Deng, and A. Acero, “Context-dependent pretrained deep neural networks for large
vocabulary speech recognition,” IEEE Trans. Audio, Speech, and Lang. Proc., vol. 20, no. 1, pp. 33–42,
Jan. 2012.
[8] F. Seide, G. Li, and D. Yu, “Conversational speech transcription using context-dependent deep neural
networks,” in Proc. Interspeech, 2011.
[9] F. Seide, G.Li, X. Chen, and D. Yu, “Feature engineering in context-dependent deep neural networks for
conversational speech transcription,” in Proc. ASRU, 2011, pp. 24–29.
[10] D. Yu, F. Seide, G.Li, and L. Deng, “Exploiting sparseness in deep neural networks for large vocabulary
speech recognition,” in Proc. ICASSP, 2012, pp. 4409–4412.
[11] N. Jaitly, P. Nguyen, A. Senior, and V . Vanhoucke, “An application of pretrained deep neural networks to
large vocabulary conversational speech recognition,” Tech. Rep. Tech. Rep. 001, Department of Computer
Science, University of Toronto, 2012.
[12] T. N. Sainath, B. Kingsbury, B. Ramabhadran, P. Fousek, P. Novak, and A. r. Mohamed, “Making deep
belief networks effective for large vocabulary continuous speech recognition,” in Proc. ASRU, 2011, pp.
30–35.
[13] G. E. Dahl, D. Yu, L. Deng, and A. Acero, “Large vocabulary continuous speech recognition with context-
dependent dbn-hmms,” in Proc. ICASSP, 2011, pp. 4688–4691.
[14] L. Saul, T. Jaakkola, and M. I. Jordan, “Mean field theory for sigmoid belief networks,” Journal of
Artificial Intelligence Research, vol. 4, pp. 61–76, 1996.
[15] D. Yu, L. Deng, and A. Acero, “Using continuous features in the maximum entropy model,” Pattern
Recognition Letters, vol. 30, no. 14, pp. 1295–1300, 2009.
[16] J. Godfrey and E. Holliman, Switchboard-1 Release 2, Linguistic Data Consortium, Philadelphia, PA,
1997.
[17] J. Li, D. Yu, J.-T. Huang, and Y . Gong, “Improving wideband speech recognition using mixed-bandwidth
training data in CD-DNN-HMM,” in Proc. SLT, 2012.
[18] N. Parihar and J. Picone, “Aurora working group: DSR front end LVCSR evaluation AU/384/02,” Tech.
Rep., Inst. for Signal and Information Process, Mississippi State University.
[19] O. Kalinli, M. L. Seltzer, J. Droppo, and A. Acero, “Noise adaptive training for robust automatic speech
recognition,” IEEE Trans. on Audio, Sp. and Lang. Proc., vol. 18, no. 8, pp. 1889 –1901, Nov. 2010.
[20] F. Flego and M. J. F. Gales, “Discriminative adaptive training with VTS and JUD,” in Proc. ASRU, 2009.
[21] A. Ragni and M. J. F. Gales, “Derivative kernels for noise robust ASR,” in Proc. ASRU, 2011.
[22] Y .-Q. Wang and M. J. F. Gales, “Speaker and noise factorisation for robust speech recognition,” IEEE
Trans. on Audio Speech and Language Proc., vol. 20, no. 7, 2012.
[23] H. Liao and M. J. F. Gales, “Adaptive training with joint uncertainty decoding for robust recognition of
noisy data,” in Proc. of ICASSP, Honolulu, Hawaii, 2007.
9
|
Dong Yu, Mike Seltzer, Jinyu Li, Jui-Ting Huang, Frank Seide
|
Unknown
| 2,013
|
{"id": "kk_XkMO0-dP8W", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358404200000, "tmdate": 1358404200000, "ddate": null, "number": 43, "content": {"title": "Feature Learning in Deep Neural Networks - A Study on Speech Recognition\r\n Tasks", "decision": "conferenceOral-iclr2013-conference", "abstract": "Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.", "pdf": "https://arxiv.org/abs/1301.3605", "paperhash": "yu|feature_learning_in_deep_neural_networks_a_study_on_speech_recognition_tasks", "keywords": [], "conflicts": [], "authors": ["Dong Yu", "Mike Seltzer", "Jinyu Li", "Jui-Ting Huang", "Frank Seide"], "authorids": ["dongyu888@gmail.com", "mike.seltzer@gmail.com", "jinyli@microsoft.com", "jthuang@microsoft.com", "fseide@microsoft.com"]}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["dongyu888@gmail.com"], "writers": []}
|
[Review]:
* Comments
** Summary
The paper uses examples from speech recognition to make the
following points about feature learning in deep neural networks:
1. Speech recognition performance improves with deeper networks,
but the gain per layer diminishes.
2. The internal representations in a trained deep network become
increasingly insensitive to small perturbations in the input
with depth.
3. Deep networks are unable to extrapolate to test samples that are
substantially different from the training samples.
The paper then shows that deep neural networks are able to learn
representations that are comparatively invariant to two important
sources of variability in speech: speaker variability and
environmental distortions.
** Pluses
- The work here is an important contribution because it comes from
the application of deep learning to real-world problems in speech
recognition, and it compares deep learning to classical
state-of-the-art approaches including discriminatively trained
GMM-HMM models, vocal tract length normalization, feature-space
maximum likelihood linear regression, noise-adaptive training,
and vector Taylor series compensation.
- In the machine learning community, the deep learning literature
has been dominated by computer vision applications. It is good
to show applications in other domains that have different
characteristics. For example, speech recognition is inherently a
structured classification problem, while many vision applications
are simple classification problems.
** Minuses
- There is not a lot of new material here. Most of the results
have been published elsewhere.
** Recommendation
I'd like to see this paper accepted because
1. it makes important points about both the advantages and
limitations of current approaches to deep learning, illustrating
them with practical examples from speech recognition and
comparing deep learning against solid baselines; and
2. it brings speech recognition into the broader conversation on
deep learning.
* Minor Issues
- The first (unnumbered) equation is correct; however, I don't
think that viewing the internal layers as computing posterior
probabilities over hidden binary vectors provides any useful
insights.
- There is an error in the right hand side of the unnumbered
equation preceding Equation 4: it should be sigma prime (the
derivative), not sigma.
- 'Senones' is jargon that is very specific to speech recognition
and may not be understood by a broader machine learning audience.
- The VTS acronym for vector Taylor series compensation is never
defined in the paper.
* Proofreading
the performance of the ASR systems -> the performance of ASR systems
By using the context-dependent deep neural network -> By using context-dependent deep neural network
the feature learning interpretations of DNNs -> the feature learning interpretation of DNNs
a DNN can interpreted as -> a DNN can be interpreted as
whose senone alignment label was generated -> whose HMM state alignment labels were generated
the deep models consistently outperforms the shallow -> the deep models consistently outperform the shallow
This is reflected in right column -> This is reflected in the right column
3.2 DNN learns more invariant features -> 3.2 DNNs learn more invariant features
is that DNN learns more invariant -> is that DNNs learn more invariant
since the differences needs to be -> since the differences need to be
that the small perturbations in the input -> that small perturbations in the input
with the central frequency of the first higher filter bank at 4 kHz -> with the center frequency of the first filter in the higher filter bank at 4 kHz
between p_y|x(s_j|x_wb) and p_y|x(s_j|x_nb -> between p_y|x(s_j|x_wb) and p_y|x(s_j|x_nb)
Note that the transform is applied before augmenting neighbor frames. -> Note that the transform is applied to individual frames, prior to concatentation.
demonstrated through a speech recognition experiments -> demonstrated through speech recognition experiments
|
anonymous reviewer 778f
| null | null |
{"id": "ySpzfXa4-ryCM", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362161880000, "tmdate": 1362161880000, "ddate": null, "number": 4, "content": {"title": "review of Feature Learning in Deep Neural Networks - A Study on Speech Recognition\r\n Tasks", "review": "* Comments\r\n** Summary\r\n The paper uses examples from speech recognition to make the\r\n following points about feature learning in deep neural networks:\r\n 1. Speech recognition performance improves with deeper networks,\r\n but the gain per layer diminishes.\r\n 2. The internal representations in a trained deep network become\r\n increasingly insensitive to small perturbations in the input\r\n with depth.\r\n 3. Deep networks are unable to extrapolate to test samples that are\r\n substantially different from the training samples.\r\n\r\n The paper then shows that deep neural networks are able to learn\r\n representations that are comparatively invariant to two important\r\n sources of variability in speech: speaker variability and\r\n environmental distortions.\r\n\r\n** Pluses\r\n - The work here is an important contribution because it comes from\r\n the application of deep learning to real-world problems in speech\r\n recognition, and it compares deep learning to classical\r\n state-of-the-art approaches including discriminatively trained\r\n GMM-HMM models, vocal tract length normalization, feature-space\r\n maximum likelihood linear regression, noise-adaptive training,\r\n and vector Taylor series compensation.\r\n - In the machine learning community, the deep learning literature\r\n has been dominated by computer vision applications. It is good\r\n to show applications in other domains that have different\r\n characteristics. For example, speech recognition is inherently a\r\n structured classification problem, while many vision applications\r\n are simple classification problems.\r\n\r\n** Minuses\r\n - There is not a lot of new material here. Most of the results\r\n have been published elsewhere.\r\n\r\n** Recommendation\r\n I'd like to see this paper accepted because\r\n 1. it makes important points about both the advantages and\r\n limitations of current approaches to deep learning, illustrating\r\n them with practical examples from speech recognition and\r\n comparing deep learning against solid baselines; and\r\n 2. it brings speech recognition into the broader conversation on\r\n deep learning.\r\n\r\n* Minor Issues\r\n - The first (unnumbered) equation is correct; however, I don't\r\n think that viewing the internal layers as computing posterior\r\n probabilities over hidden binary vectors provides any useful\r\n insights.\r\n - There is an error in the right hand side of the unnumbered\r\n equation preceding Equation 4: it should be sigma prime (the\r\n derivative), not sigma.\r\n - 'Senones' is jargon that is very specific to speech recognition\r\n and may not be understood by a broader machine learning audience.\r\n - The VTS acronym for vector Taylor series compensation is never\r\n defined in the paper.\r\n\r\n* Proofreading\r\n the performance of the ASR systems -> the performance of ASR systems\r\n\r\n By using the context-dependent deep neural network -> By using context-dependent deep neural network\r\n\r\n the feature learning interpretations of DNNs -> the feature learning interpretation of DNNs\r\n\r\n a DNN can interpreted as -> a DNN can be interpreted as\r\n\r\n whose senone alignment label was generated -> whose HMM state alignment labels were generated\r\n\r\n the deep models consistently outperforms the shallow -> the deep models consistently outperform the shallow\r\n\r\n This is reflected in right column -> This is reflected in the right column\r\n\r\n 3.2 DNN learns more invariant features -> 3.2 DNNs learn more invariant features\r\n\r\n is that DNN learns more invariant -> is that DNNs learn more invariant\r\n\r\n since the differences needs to be -> since the differences need to be\r\n\r\n that the small perturbations in the input -> that small perturbations in the input\r\n\r\n with the central frequency of the first higher filter bank at 4 kHz -> with the center frequency of the first filter in the higher filter bank at 4 kHz\r\n\r\n between p_y|x(s_j|x_wb) and p_y|x(s_j|x_nb -> between p_y|x(s_j|x_wb) and p_y|x(s_j|x_nb)\r\n\r\n Note that the transform is applied before augmenting neighbor frames. -> Note that the transform is applied to individual frames, prior to concatentation.\r\n\r\n demonstrated through a speech recognition experiments -> demonstrated through speech recognition experiments"}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "kk_XkMO0-dP8W", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 778f"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 5,
"materials_and_methods": 8,
"praise": 4,
"presentation_and_reporting": 3,
"results_and_discussion": 2,
"suggestion_and_solution": 3,
"total": 21
}
| 1.333333
| 0.323258
| 1.010076
| 1.384104
| 0.498757
| 0.050771
| 0.142857
| 0
| 0.238095
| 0.380952
| 0.190476
| 0.142857
| 0.095238
| 0.142857
|
{
"criticism": 0.14285714285714285,
"example": 0,
"importance_and_relevance": 0.23809523809523808,
"materials_and_methods": 0.38095238095238093,
"praise": 0.19047619047619047,
"presentation_and_reporting": 0.14285714285714285,
"results_and_discussion": 0.09523809523809523,
"suggestion_and_solution": 0.14285714285714285
}
| 1.333333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
kk_XkMO0-dP8W
|
Feature Learning in Deep Neural Networks - A Study on Speech Recognition
Tasks
|
Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.
|
Feature Learning in Deep Neural Networks – Studies
on Speech Recognition Tasks
Dong Yu, Michael L. Seltzer, Jinyu Li1, Jui-Ting Huang1, Frank Seide2
Microsoft Research, Redmond, W A 98052
1Microsoft Corporation, Redmond, W A 98052
2Microsoft Research Asia, Beijing, P.R.C.
{dongyu,mseltzer,jinyli,jthuang,fseide}@microsoft.com
Abstract
Recent studies have shown that deep neural networks (DNNs) perform signifi-
cantly better than shallow networks and Gaussian mixture models (GMMs) on
large vocabulary speech recognition tasks. In this paper, we argue that the im-
proved accuracy achieved by the DNNs is the result of their ability to extract dis-
criminative internal representations that are robust to the many sources of variabil-
ity in speech signals. We show that these representations become increasingly in-
sensitive to small perturbations in the input with increasing network depth, which
leads to better speech recognition performance with deeper networks. We also
show that DNNs cannot extrapolate to test samples that are substantially differ-
ent from the training examples. If the training data are sufficiently representative,
however, internal features learned by the DNN are relatively stable with respect
to speaker differences, bandwidth differences, and environment distortion. This
enables DNN-based recognizers to perform as well or better than state-of-the-art
systems based on GMMs or shallow networks without the need for explicit model
adaptation or feature normalization.
1 Introduction
Automatic speech recognition (ASR) has been an active research area for more than five decades.
However, the performance of ASR systems is still far from satisfactory and the gap between ASR and
human speech recognition is still large on most tasks. One of the primary reasons speech recognition
is challenging is the high variability in speech signals. For example, speakers may have different
accents, dialects, or pronunciations, and speak in different styles, at different rates, and in different
emotional states. The presence of environmental noise, reverberation, different microphones and
recording devices results in additional variability. To complicate matters, the sources of variability
are often nonstationary and interact with the speech signal in a nonlinear way. As a result, it is
virtually impossible to avoid some degree of mismatch between the training and testing conditions.
Conventional speech recognizers use a hidden Markov model (HMM) in which each acoustic state
is modeled by a Gaussian mixture model (GMM). The model parameters can be discriminatively
trained using an objective function such as maximum mutual information (MMI) [1] or minimum
phone error rate (MPE) [2]. Such systems are known to be susceptible to performance degrada-
tion when even mild mismatch between training and testing conditions is encountered. To combat
this, a variety of techniques has been developed. For example, mismatch due to speaker differ-
ences can be reduced by V ocal Tract Length Normalization (VTLN) [3], which nonlinearly warps
the input feature vectors to better match the acoustic model, or Maximum Likelihood Linear Re-
gression (MLLR) [4], which adapt the GMM parameters to be more representative of the test data.
Other techniques such as Vector Taylor Series (VTS) adaptation are designed to address the mis-
match caused by environmental noise and channel distortion [5]. While these methods have been
1
arXiv:1301.3605v3 [cs.LG] 8 Mar 2013
successful to some degree, they add complexity and latency to the decoding process. Most require
multiple iterations of decoding and some only perform well with ample adaptation data, making
them unsuitable for systems that process short utterances, such as voice search.
Recently, an alternative acoustic model based on deep neural networks (DNNs) has been proposed.
In this model, a collection of Gaussian mixture models is replaced by a single context-dependent
deep neural network (CD-DNN). A number of research groups have obtained strong results on a
variety of large scale speech tasks using this approach [6–13]. Because the temporal structure of the
HMM is maintained, we refer to these models as CD-DNN-HMM acoustic models.
In this paper, we analyze the performance of DNNs for speech recognition and in particular, exam-
ine their ability to learn representations that are robust to variability in the acoustic signal. To do
so, we interpret the DNN as a joint model combining a nonlinear feature transformation and a log-
linear classifier. Using this view, we show that the many layers of nonlinear transforms in a DNN
convert the raw features into a highly invariant and discriminative representation which can then be
effectively classified using a log-linear model. These internal representations become increasingly
insensitive to small perturbations in the input with increasing network depth. In addition, the classi-
fication accuracy improves with deeper networks, although the gain per layer diminishes. However,
we also find that DNNs are unable to extrapolate to test samples that are substantially different from
the training samples. A series of experiments demonstrates that if the training data are sufficiently
representative, the DNN learns internal features that are relatively invariant to sources of variability
common in speech recognition such as speaker differences and environmental distortions. This en-
ables DNN-based speech recognizers to perform as well or better than state-of-the-art GMM-based
systems without the need for explicit model adaptation or feature normalization algorithms.
The rest of the paper is organized as follows. In Section 2 we briefly describe DNNs and illustrate
the feature learning interpretation of DNNs. In Section 3 we show that DNNs can learn invariant
and discriminative features and demonstrate empirically that higher layer features are less sensitive
to perturbations of the input. In Section 4 we point out that the feature generalization ability is
effective only when test samples are small perturbations of training samples. Otherwise, DNNs
perform poorly as indicated in our mixed-bandwidth experiments. We apply this analysis to speaker
adaptation in Section 5 and find that deep networks learn speaker-invariant representations, and to
the Aurora 4 noise robustness task in Section 6 where we show that a DNN can achieve performance
equivalent to the current state of the art without requiring explicit adaptation to the environment. We
conclude the paper in Section 7.
2 Deep Neural Networks
A deep neural network (DNN) is conventional multi-layer perceptron (MLP) with many hidden
layers (thus deep). If the input and output of the DNN are denoted as x and y, respectively, a
DNN can be interpreted as a directed graphical model that approximates the posterior probability
py|x(y= s|x) of a class sgiven an observation vector x, as a stack of (L+ 1)layers of log-linear
models. The first Llayers model the posterior probabilities of hidden binary vectors hℓ given input
vectors vℓ. If hℓ consists of Nℓ hidden units, each denoted as hℓ
j, the posterior probability can be
expressed as
pℓ(hℓ|vℓ) =
Nℓ
∏
j=1
ezℓ
j(vℓ)·hℓ
j
ezℓ
j(vℓ)·1 + ezℓ
j(vℓ)·0 , 0 ≤ℓ<L
where zℓ(vℓ) = (Wℓ)T vℓ + aℓ, and Wℓ and aℓ represent the weight matrix and bias vector in the
ℓ-th layer, respectively. Each observation is propagated forward through the network, starting with
the lowest layer(v0 = x) . The output variables of each layer become the input variables of the next,
i.e. vℓ+1 = hℓ. In the final layer, the class posterior probabilities are computed as a multinomial
distribution
py|x(y= s|x) = pL(y= s|vL) = ezL
s (vL)
∑
s′ ezL
s′ (vL) = softmaxs
(
vL)
. (1)
Note that the equality between py|x(y = s|x) and pL(y = s|vL) is valid by making a mean-field
approximation [14] at each hidden layer.
2
In the DNN, the estimation of the posterior probability py|x(y= s|x) can also be considered a two-
step deterministic process. In the first step, the observation vectorxis transformed to another feature
vector vL through L layers of non-linear transforms.In the second step, the posterior probability
py|x(y = s|x) is estimated using the log-linear model (1) given the transformed feature vector vL.
If we consider the first L layers fixed, learning the parameters in the softmax layer is equivalent
to training a conditional maximum-entropy (MaxEnt) model on features vL. In the conventional
MaxEnt model, features are manually designed [15]. In DNNs, however, the feature representations
are jointly learned with the MaxEnt model from the data. This not only eliminates the tedious and
potentially erroneous process of manual feature extraction but also has the potential to automatically
extract invariant and discriminative features, which are difficult to construct manually.
In all the following discussions, we use DNNs in the framework of the CD-DNN-HMM [6–10]
and use speech recognition as our classification task. The detailed training procedure and decoding
technique for CD-DNN-HMMs can be found in [6–8].
3 Invariant and discriminative features
3.1 Deeper is better
Using DNNs instead of shallow MLPs is a key component to the success of CD-DNN-HMMs. Ta-
ble 1, which is extracted from [8], summarizes the word error rates (WER) on the Switchboard
(SWB) [16] Hub5’00-SWB test set. Switchboard is a corpus of conversational telephone speech.
The system was trained using the 309-hour training set with labels generated by Viterbi align-
ment from a maximum likelihood (ML) trained GMM-HMM system. The labels correspond to
tied-parameter context-dependent acoustic states called senones. Our baseline WER with the cor-
responding discriminatively trained traditional GMM-HMM system is 23.6%, while the best CD-
DNN-HMM achives 17.0%—a 28% relative error reduction (it is possible to further improve the
DNN to a one-third reduction by realignment [8]).
We can observe that deeper networks outperform shallow ones. The WER decreases as the number
of hidden layers increases, using a fixed layer size of 2048 hidden units. In other words, deeper mod-
els have stronger discriminative ability than shallow models. This is also reflected in the improve-
ment of the training criterion (not shown). More interestingly, if architectures with an equivalent
number of parameters are compared, the deep models consistently outperform the shallow models
when the deep model is sufficiently wide at each layer. This is reflected in the right column of the
table, which shows the performance for shallow networks with the same number of parameters as
the deep networks in the left column. Even if we further increase the size of an MLP with a single
hidden layer to about 16000 hidden units we can only achieve a WER of 22.1%, which is signifi-
cantly worse than the 17.1% WER that is obtained using a 7×2k DNN under the same conditions.
Note that as the number of hidden layers further increases, only limited additional gains are obtained
and performance saturates after 9 hidden layers. The 9x2k DNN performs equally well as a 5x3k
DNN which has more parameters. In practice, a tradeoff needs to be made between the width of
each layer, the additional reduction in WER and the increased cost of training and decoding as the
number of hidden layers is increased.
3.2 DNNs learn more invariant features
We have noticed that the biggest benefit of using DNNs over shallow models is that DNNs learn more
invariant and discriminative features. This is because many layers of simple nonlinear processing
can generate a complicated nonlinear transform. To show that this nonlinear transform is robust to
small variations in the input features, let’s assume the output of layerl−1, or equivalently the input
to the layer lis changed from vℓ to vℓ + δℓ, where δℓ is a small change. This change will cause the
output of layer l, or equivalently the input to the layer ℓ+ 1to change by
δℓ+1 = σ(zℓ(vℓ + δℓ)) −σ(zℓ(vℓ)) ≈diag
(
σ′(zℓ(vℓ))
)
(wℓ)T δℓ.
3
Table 1: Effect of CD-DNN-HMM network depth on WER (%) on Hub5’00-SWB using the 309-
hour Switchboard training set. DBN pretraining is applied.
L×N WER 1 ×N WER
1 ×2k 24.2 – –
2 ×2k 20.4 – –
3 ×2k 18.4 – –
4 ×2k 17.8 – –
5 ×2k 17.2 1 ×3772 22.5
7 ×2k 17.1 1 ×4634 22.6
9 ×2k 17.0 – –
5 ×3k 17.0 – –
– – 1 ×16k 22.1
Figure 1: Percentage of saturated activations at each layer
The norm of the change δℓ+1 is
∥δℓ+1∥≈∥ diag(σ′(zℓ(vℓ)))((wℓ)T δℓ)∥
≤∥diag(σ′(zℓ(vℓ)))(wℓ)T ∥∥δℓ∥
= ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥∥δℓ∥ (2)
where ◦refers to an element-wise product.
Note that the magnitude of the majority of the weights is typically very small if the size of the hidden
layer is large. For example, in a6×2k DNN trained using 30 hours of SWB data, 98% of the weights
in all layers except the input layer have magnitudes less than 0.5.
While each element in vℓ+1 ◦(1 −vℓ+1) is less than or equal to 0.25, the actual value is typically
much smaller. This means that a large percentage of hidden neurons will not be active, as shown in
Figure 1. As a result, the average norm ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 in (2) across a 6-hr SWB
development set is smaller than one in all layers, as indicated in Figure 2. Since all hidden layer
values are bounded in the same range of (0,1), this indicates that when there is a small perturbation
on the input, the perturbation shrinks at each higher hidden layer. In other words, features generated
by higher hidden layers are more invariant to variations than those represented by lower layers.
Note that the maximum norm over the same development set is larger than one, as seen in Figure
2. This is necessary since the differences need to be enlarged around the class boundaries to have
discrimination ability.
4 Learning by seeing
In Section 3, we showed empirically that small perturbations in the input will be gradually shrunk
as we move to the internal representation in the higher layers. In this section, we point out that the
4
Figure 2: Average and maximum ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 across layers on a 6×2k DNN
Figure 3: Illustration of mixed-bandwidth speech recognition using a DNN
above result is only applicable to small perturbations around the training samples. When the test
samples deviate significantly from the training samples, DNNs cannot accurately classify them. In
other words, DNNs must see examples of representative variations in the data during training in
order to generalize to similar variations in the test data.
We demonstrate this point using a mixed-bandwidth ASR study. Typical speech recognizers are
trained on either narrowband speech signals, recorded at 8 kHz, or wideband speech signals,
recorded at 16 kHz. It would be advantageous if a single system could recognize both narrow-
band and wideband speech, i.e. mixed-bandwidth ASR. One such system was recently proposed
using a CD-DNN-HMM [17]. In that work, the following DNN architecture was used for all experi-
ments. The input features were 29 mel-scale log filter-bank outputs together with dynamic features.
An 11-frame context window was used generating an input layer with 29 ·3 ·11 = 957nodes. The
DNN has 7 hidden layers, each with 2048 nodes. The output layer has 1803 nodes, corresponding
to the number of senones determined by the GMM system.
The 29-dimensional filter bank has two parts: the first 22 filters span 0–4 kHz and the last 7 filters
span 4–8 kHz, with the center frequency of the first filter in the higher filter bank at 4 kHz. When the
speech is wideband, all 29 filters have observed values. However, when the speech is narrowband,
the high-frequency information was not captured so the final 7 filters are set to 0. Figure 3 illustrates
the architecture of the mixed-bandwidth ASR system.
Experiments were conducted on a mobile voice search (VS) corpus. This task consists of internet
search queries made by voice on a smartphone.There are two training sets, VS-1 and VS-2, con-
sisting of 72 and 197 hours of wideband audio data, respectively. These sets were collected during
5
Table 2: WER (%) on wideband (16k) and narrowband (8k) test sets with and without narrowband
training data.
training data 16 kHz VS-T 8 kHz VS-T
16 kHz VS-1 + 16 kHz VS-2 27.5 53.5
16 kHz VS-1 + 8 kHz VS-2 28.3 29.3
different times of year. The test set, called VS-T, has 26757 words in 9562 utterances. The narrow
band training and test data were obtained by downsampling the wideband data.
Table 2 summarizes the WER on the wideband and narrowband test sets when the DNN is trained
with and without narrowband speech. From this table, it is clear that if all training data are wideband,
the DNN performs well on the wideband test set (27.5% WER) but very poorly on the narrowband
test set (53.5% WER). However, if we convert VS-2 to narrowband speech and train the same DNN
using mixed-bandwidth data (second row), the DNN performs very well on both wideband and
narrowband speech.
To understand the difference between these two scenarios, we take the output vectors at each layer
for the wideband and narrowband input feature pairs, hℓ(xwb) and hℓ(xnb), and measure their Eu-
clidean distance. For the top layer, whose output is the senone posterior probability, we calculate
the KL-divergence in nats between py|x(sj|xwb) and py|x(sj|xnb). Table 3 shows the statistics of dl
and dy over 40,000 frames randomly sampled from the test set for the DNN trained using wideband
speech only and the DNN trained using mixed-bandwidth speech.
Table 3: Euclidean distance for the output vectors at each hidden layer (L1-L7) and the KL di-
vergence (nats) for the posteriors at the top layer between the narrowband (8 kHz) and wideband
(16 kHz) input features, measured using the wideband DNN or the mixed-bandwidth DNN.
wideband DNN mixed-band DNN
layer dist mean variance mean variance
L1
Eucl
13.28 3.90 7.32 3.62
L2 10.38 2.47 5.39 1.28
L3 8.04 1.77 4.49 1.27
L4 8.53 2.33 4.74 1.85
L5 9.01 2.96 5.39 2.30
L6 8.46 2.60 4.75 1.57
L7 5.27 1.85 3.12 0.93
Top KL 2.03 – 0.22 –
From Table 3 we can observe that in both DNNs, the distance between hidden layer vectors generated
from the wideband and narrowband input feature pair is significantly reduced at the layers close
to the output layer compared to that in the first hidden layer. Perhaps what is more interesting
is that the average distances and variances in the data-mixed DNN are consistently smaller than
those in the DNN trained on wideband speech only. This indicates that by using mixed-bandwidth
training data, the DNN learns to consider the differences in the wideband and narrowband input
features as irrelevant variations. These variations are suppressed after many layers of nonlinear
transformation. The final representation is thus more invariant to this variation and yet still has the
ability to distinguish between different class labels. This behavior is even more obvious at the output
layer since the KL-divergence between the paired outputs is only 0.22 in the mixed-bandwidth DNN,
much smaller than the 2.03 observed in the wideband DNN.
5 Robustness to speaker variation
A major source of variability is variation across speakers. Techniques for adapting a GMM-HMM to
a speaker have been investigated for decades. Two important techniques are VTLN [3], and feature-
space MLLR (fMLLR) [4]. Both VTLN and fMLLR operate on the features directly, making their
application in the DNN context straightforward.
6
Table 4: Comparison of feature-transform based speaker-adaptation techniques for GMM-HMMs,
a shallow, and a deep NN. Word-error rates in % for Hub5’00-SWB (relative change in parentheses).
GMM-HMM CD-MLP-HMM CD-DNN-HMM
adaptation technique 40 mix 1×2k 7×2k
speaker independent 23.6 24.2 17.1
+ VTLN 21.5 (-9%) 22.5 (-7%) 16.8 (-2%)
+ {fMLLR/fDLR}×4 20.4 (-5%) 21.5 (-4%) 16.4 (-2%)
VTLN warps the frequency axis of the filterbank analysis to account for the fact that the precise lo-
cations of vocal-tract resonances vary roughly monotonically with the physical size of the speaker.
This is done in both training and testing. On the other hand, fMLLR applies an affine transform
to the feature frames such that an adaptation data set better matches the model. In most cases, in-
cluding this work, ‘self-adaptation’ is used: generate labels using unsupervised transcription, then
re-recognize with the adapted model. This process is iterated four times. For GMM-HMMs, fM-
LLR transforms are estimated to maximize the likelihood of the adaptation data given the model.
For DNNs, we instead maximize cross entropy (with back propagation), which is a discriminative
criterion, so we prefer to call this transform feature-space Discriminative Linear Regression (fDLR).
Note that the transform is applied to individual frames, prior to concatenation.
Typically, applying VTLN and fMLLR jointly to a GMM-HMM system will reduce errors by 10–
15%. Initially, similar gains were expected for DNNs as well. However, these gains were not
realized, as shown in Table 4 [9]. The table compares VTLN and fMLLR/fDLR for GMM-HMMs,
a context-dependent ANN-HMM with a single hidden layer, and a deep network with 7 hidden
layers, on the same Switchboard task described in Section 3.1. For this task, test data are very
consistent with the training, and thus, only a small amount of adaptation to other factors such as
recording conditions or environmental factors occurs. We use the same configuration as in Table 1
which is speaker independent using single-pass decoding.
For the GMM-HMM, VTLN achieves a strong relative gain of 9%. VTLN is also effective with the
shallow neural-network system, gaining a slightly smaller 7%. However, the improvement of VTLN
on the deep network with 7 hidden layers is a much smaller 2% gain. Combining VTLN with
fDLR further reduces WER by 5% and 4% relative, for the GMM-HMM and the shallow network,
respectively. The reduction for the DNN is only 2%. We also tried transplanting VTLN and fMLLR
transforms estimated on the GMM system into the DNN, and achieved very similar results [9].
The VTLN and fDLR implementations of the shallow and deep networks are identical. Thus, we
conclude that to a significant degree, the deep neural network is able to learn internal representations
that are invariant with respect to the sources of variability that VTLN and fDLR address.
6 Robustness to environmental distortions
In many speech recognition tasks, there are often cases where the despite the presence of variability
in the training data, significant mismatch between training and test data persists. Environmental
factors are common sources of such mismatch, e.g. ambient noise, reverberation, microphone type
and capture device. The analysis in the previous sections suggests that DNNs have the ability to
generate internal representations that are robust with respect to variability seen in the training data.
In this section, we evaluate the extent to which this invariance can be obtained with respect to
distortions caused by the environment.
We performed a series of experiments on the Aurora 4 corpus [18], a 5000-word vocabulary task
based on the Wall Street Journal (WSJ0) corpus. The experiments were performed with the 16 kHz
multi-condition training set consisting of 7137 utterances from 83 speakers. One half of the ut-
terances was recorded by a high-quality close-talking microphone and the other half was recorded
using one of 18 different secondary microphones. Both halves include a combination of clean speech
and speech corrupted by one of six different types of noise (street traffic, train station, car, babble,
restaurant, airport) at a range of signal-to-noise ratios (SNR) between 10-20 dB.
7
The evaluation set consists of 330 utterances from 8 speakers. This test set was recorded by the pri-
mary microphone and a number of secondary microphones. These two sets are then each corrupted
by the same six noises used in the training set at SNRs between 5-15 dB, creating a total of 14 test
sets. These 14 test sets can then be grouped into 4 subsets, based on the type of distortion: none
(clean speech), additive noise only, channel distortion only, and noise + channel. Notice that the
types of noise are common across training and test sets but the SNRs of the data are not.
The DNN was trained using 24-dimensional log mel filterbank features with utterance-level mean
normalization. The first- and second-order derivative features were appended to the static feature
vectors. The input layer was formed from a context window of 11 frames creating an input layer of
792 input units. The DNN had 7 hidden layers with 2048 hidden units in each layer and the final
softmax output layer had 3206 units, corresponding to the senones of the baseline HMM system.
The network was initialized using layer-by-layer generative pre-training and then discriminatively
trained using back propagation.
In Table 5, the performance obtained by the DNN acoustic model is compared to several other
systems. The first system is a baseline GMM-HMM system, while the remaining systems are repre-
sentative of the state of the art in acoustic modeling and noise and speaker adaptation. All used the
same training set. To the authors’ knowledge, these are the best published results on this task.
The second system combines Minimum Phone Error (MPE) discriminative training [2] and noise
adaptive training (NAT) [19] using VTS adaptation to compensate for noise and channel mismatch
[20]. The third system uses a hybrid generative/discriminative classifier [21] as follows . First, an
adaptively trained HMM with VTS adaptation is used to generate features based on state likelihoods
and their derivatives. Then, these features are input to a discriminative log-linear model to obtain the
final hypothesis. The fourth system uses an HMM trained with NAT and combines VTS adaptation
for environment compensation and MLLR for speaker adaptation [22]. Finally, the last row of the
table shows the performance of the DNN system.
Table 5: A comparison of several systems in the literature to a DNN system on the Aurora 4 task.
Systems
distortion
A VGnone noise channel noise +
(clean) channel
GMM baseline 14.3 17.9 20.2 31.3 23.6
MPE-NAT + VTS [20] 7.2 12.8 11.5 19.7 15.3
NAT + Derivative Kernels [21] 7.4 12.6 10.7 19.0 14.8
NAT + Joint MLLR/VTS [22] 5.6 11.0 8.8 17.8 13.4
DNN (7×2048) 5.6 8.8 8.9 20.0 13.4
It is noteworthy that to obtain good performance, the GMM-based systems required complicated
adaptive training procedures [19, 23] and multiple iterations of recognition in order to perform ex-
plicit environment and/or speaker adaptation. One of these systems required two classifiers. In
contrast, the DNN system required only standard training and a single forward pass for classifi-
cation. Yet, it outperforms the two systems that perform environment adaptation and matches the
performance of a system that adapts to both the environment and speaker.
Finally, we recall the results in Section 4, in which the DNN trained only on wideband data could
not accurately classify narrowband speech. Similarly, a DNN trained only on clean speech has no
ability to learn internal features that are robust to environmental noise. When the DNN for Aurora
4 is trained using only clean speech examples, the performance on the noise- and channel-distorted
speech degrades substantially, resulting in an average WER of 30.6%. This further confirms our
earlier observation that DNNs are robust to modest variations between training and test data but
perform poorly if the mismatch is more severe.
7 Conclusion
In this paper we demonstrated through speech recognition experiments that DNNs can extract more
invariant and discriminative features at the higher layers. In other words, the features learned by
8
DNNs are less sensitive to small perturbations in the input features. This property enables DNNs to
generalize better than shallow networks and enables CD-DNN-HMMs to perform speech recogni-
tion in a manner that is more robust to mismatches in speaker, environment, or bandwidth. On the
other hand, DNNs cannot learn something from nothing. They require seeing representative samples
to perform well. By using a multi-style training strategy and letting DNNs to generalize to similar
patterns, we equaled the best result ever reported on the Aurora 4 noise robustness benchmark task
without the need for multiple recognition passes and model adaptation.
References
[1] L. Bahl, P. Brown, P.V . De Souza, and R. Mercer, “Maximum mutual information estimation of hidden
markov model parameters for speech recognition,” in Proc. ICASSP, Apr, vol. 11, pp. 49–52.
[2] D. Povey and P. C. Woodland, “Minimum phone error and i-smoothing for improved discriminative
training,” in Proc. ICASSP, 2002.
[3] P. Zhan et al., “V ocal tract length normalization for lvcsr,” Tech. Rep. CMU-LTI-97-150, Carnegie Mellon
Univ, 1997.
[4] M. J. F. Gales, “Maximum likelihood linear transformations for HMM-based speech recognition,” Com-
puter Speech and Language, vol. 12, pp. 75–98, 1998.
[5] A. Acero, L. Deng, T. Kristjansson, and J. Zhang, “HMM Adaptation Using Vector Taylor Series for
Noisy Speech Recognition,” in Proc. of ICSLP, 2000.
[6] D. Yu, L. Deng, and G. Dahl, “Roles of pretraining and fine-tuning in context-dependent DBN-HMMs
for real-world speech recognition,” inProc. NIPS Workshop on Deep Learning and Unsupervised Feature
Learning, 2010.
[7] G.E. Dahl, D. Yu, L. Deng, and A. Acero, “Context-dependent pretrained deep neural networks for large
vocabulary speech recognition,” IEEE Trans. Audio, Speech, and Lang. Proc., vol. 20, no. 1, pp. 33–42,
Jan. 2012.
[8] F. Seide, G. Li, and D. Yu, “Conversational speech transcription using context-dependent deep neural
networks,” in Proc. Interspeech, 2011.
[9] F. Seide, G.Li, X. Chen, and D. Yu, “Feature engineering in context-dependent deep neural networks for
conversational speech transcription,” in Proc. ASRU, 2011, pp. 24–29.
[10] D. Yu, F. Seide, G.Li, and L. Deng, “Exploiting sparseness in deep neural networks for large vocabulary
speech recognition,” in Proc. ICASSP, 2012, pp. 4409–4412.
[11] N. Jaitly, P. Nguyen, A. Senior, and V . Vanhoucke, “An application of pretrained deep neural networks to
large vocabulary conversational speech recognition,” Tech. Rep. Tech. Rep. 001, Department of Computer
Science, University of Toronto, 2012.
[12] T. N. Sainath, B. Kingsbury, B. Ramabhadran, P. Fousek, P. Novak, and A. r. Mohamed, “Making deep
belief networks effective for large vocabulary continuous speech recognition,” in Proc. ASRU, 2011, pp.
30–35.
[13] G. E. Dahl, D. Yu, L. Deng, and A. Acero, “Large vocabulary continuous speech recognition with context-
dependent dbn-hmms,” in Proc. ICASSP, 2011, pp. 4688–4691.
[14] L. Saul, T. Jaakkola, and M. I. Jordan, “Mean field theory for sigmoid belief networks,” Journal of
Artificial Intelligence Research, vol. 4, pp. 61–76, 1996.
[15] D. Yu, L. Deng, and A. Acero, “Using continuous features in the maximum entropy model,” Pattern
Recognition Letters, vol. 30, no. 14, pp. 1295–1300, 2009.
[16] J. Godfrey and E. Holliman, Switchboard-1 Release 2, Linguistic Data Consortium, Philadelphia, PA,
1997.
[17] J. Li, D. Yu, J.-T. Huang, and Y . Gong, “Improving wideband speech recognition using mixed-bandwidth
training data in CD-DNN-HMM,” in Proc. SLT, 2012.
[18] N. Parihar and J. Picone, “Aurora working group: DSR front end LVCSR evaluation AU/384/02,” Tech.
Rep., Inst. for Signal and Information Process, Mississippi State University.
[19] O. Kalinli, M. L. Seltzer, J. Droppo, and A. Acero, “Noise adaptive training for robust automatic speech
recognition,” IEEE Trans. on Audio, Sp. and Lang. Proc., vol. 18, no. 8, pp. 1889 –1901, Nov. 2010.
[20] F. Flego and M. J. F. Gales, “Discriminative adaptive training with VTS and JUD,” in Proc. ASRU, 2009.
[21] A. Ragni and M. J. F. Gales, “Derivative kernels for noise robust ASR,” in Proc. ASRU, 2011.
[22] Y .-Q. Wang and M. J. F. Gales, “Speaker and noise factorisation for robust speech recognition,” IEEE
Trans. on Audio Speech and Language Proc., vol. 20, no. 7, 2012.
[23] H. Liao and M. J. F. Gales, “Adaptive training with joint uncertainty decoding for robust recognition of
noisy data,” in Proc. of ICASSP, Honolulu, Hawaii, 2007.
9
|
Dong Yu, Mike Seltzer, Jinyu Li, Jui-Ting Huang, Frank Seide
|
Unknown
| 2,013
|
{"id": "kk_XkMO0-dP8W", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358404200000, "tmdate": 1358404200000, "ddate": null, "number": 43, "content": {"title": "Feature Learning in Deep Neural Networks - A Study on Speech Recognition\r\n Tasks", "decision": "conferenceOral-iclr2013-conference", "abstract": "Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.", "pdf": "https://arxiv.org/abs/1301.3605", "paperhash": "yu|feature_learning_in_deep_neural_networks_a_study_on_speech_recognition_tasks", "keywords": [], "conflicts": [], "authors": ["Dong Yu", "Mike Seltzer", "Jinyu Li", "Jui-Ting Huang", "Frank Seide"], "authorids": ["dongyu888@gmail.com", "mike.seltzer@gmail.com", "jinyli@microsoft.com", "jthuang@microsoft.com", "fseide@microsoft.com"]}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["dongyu888@gmail.com"], "writers": []}
|
[Review]:
The paper presents an analysis of performance of DNN acoustic models in tasks where there is a mis-match between training and test data. Most of the results do not seem to be novel, and were published in several papers already. The paper is well written and mostly easy to follow.
Pros:
Although there is nothing surprising in the paper, the study may motivate others to investigate DNNs.
Cons:
Authors could have been more bold in ideas and experiments.
Comments:
Table 1: it would be more convincing to show L x N for variable L and N, such as N=4096, if one wants to prove that many (9) hidden layers are needed to achieve top performance (I'd expect that accuracy saturation would occur with less hidden layers, if N would increase); moreover, one can investigate architectures that would have the same number of parameters, but would be more shallow - for example, first and last hidden layers can have N=2048, and the hidden layer in between can have N=8192 - this would be more fair to show if one wants to claim that 9 hidden layers are better than 3 (as obviously, adding more parameters helps and the current comparison with 1-hidden layer NN is completely unfair as input and output layers have different dimensionality, but one can apply other tricks there to reduce complexity - for example hierarchical softmax in the output layer etc.)
'Note that the magnitude of the majority of the weights is typically very small' - note that this is also related to sizes of the hidden layers; if hidden layers were very small, the weights would be larger (output of neuron is non-linear function of weighted sum of inputs; if there are 2048 inputs that are in range (0,1), then we can naturally expect the weights to be very small)
Section 3 rather shows that neural networks are good at representing smooth functions, which is the opposite to what deep architectures were proposed for. Another reason to believe that 9 hidden layers are not needed.
The results where DNN models perform poorly on data that were not seen during training are not really striking or novel; it would be actually good if authors would try to overcome this problem in a novel way. For example, one can try to make DNNs more robust by allowing some kind of simple cheap adaptation during test time. When it comes to capturing VTLN / speaker characteristics, it would be interesting to use longer-context information, either through recurrence, or by using features derived from long contexts (such as previous 2-10 seconds).
Table 4 compares relative reductions of WER: however, note that 0% is not reachable on Switchboard. If we would assume that human performance is around 5-10% WER, then the difference in relative improvements would be significantly smaller. Also, it is very common that the better the baseline is, the harder it is to gain improvements (as many different techniques actually address the same problems).
Also, it is possible that DNNs can learn some weak VTLN, as they typically see longer context information; it would be interesting to see an experiment where DNN would be trained with limited context information (I would expect WER to increase, but also the relative gain from VTLN should increase).
|
anonymous reviewer cf74
| null | null |
{"id": "eMmX26-PXaMJN", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362128940000, "tmdate": 1362128940000, "ddate": null, "number": 1, "content": {"title": "review of Feature Learning in Deep Neural Networks - A Study on Speech Recognition\r\n Tasks", "review": "The paper presents an analysis of performance of DNN acoustic models in tasks where there is a mis-match between training and test data. Most of the results do not seem to be novel, and were published in several papers already. The paper is well written and mostly easy to follow.\r\n\r\nPros:\r\nAlthough there is nothing surprising in the paper, the study may motivate others to investigate DNNs.\r\n\r\nCons:\r\nAuthors could have been more bold in ideas and experiments.\r\n\r\nComments:\r\n\r\nTable 1: it would be more convincing to show L x N for variable L and N, such as N=4096, if one wants to prove that many (9) hidden layers are needed to achieve top performance (I'd expect that accuracy saturation would occur with less hidden layers, if N would increase); moreover, one can investigate architectures that would have the same number of parameters, but would be more shallow - for example, first and last hidden layers can have N=2048, and the hidden layer in between can have N=8192 - this would be more fair to show if one wants to claim that 9 hidden layers are better than 3 (as obviously, adding more parameters helps and the current comparison with 1-hidden layer NN is completely unfair as input and output layers have different dimensionality, but one can apply other tricks there to reduce complexity - for example hierarchical softmax in the output layer etc.)\r\n\r\n'Note that the magnitude of the majority of the weights is typically very small' - note that this is also related to sizes of the hidden layers; if hidden layers were very small, the weights would be larger (output of neuron is non-linear function of weighted sum of inputs; if there are 2048 inputs that are in range (0,1), then we can naturally expect the weights to be very small)\r\n\r\nSection 3 rather shows that neural networks are good at representing smooth functions, which is the opposite to what deep architectures were proposed for. Another reason to believe that 9 hidden layers are not needed.\r\n\r\nThe results where DNN models perform poorly on data that were not seen during training are not really striking or novel; it would be actually good if authors would try to overcome this problem in a novel way. For example, one can try to make DNNs more robust by allowing some kind of simple cheap adaptation during test time. When it comes to capturing VTLN / speaker characteristics, it would be interesting to use longer-context information, either through recurrence, or by using features derived from long contexts (such as previous 2-10 seconds).\r\n\r\nTable 4 compares relative reductions of WER: however, note that 0% is not reachable on Switchboard. If we would assume that human performance is around 5-10% WER, then the difference in relative improvements would be significantly smaller. Also, it is very common that the better the baseline is, the harder it is to gain improvements (as many different techniques actually address the same problems).\r\n\r\nAlso, it is possible that DNNs can learn some weak VTLN, as they typically see longer context information; it would be interesting to see an experiment where DNN would be trained with limited context information (I would expect WER to increase, but also the relative gain from VTLN should increase)."}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "kk_XkMO0-dP8W", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer cf74"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 2,
"importance_and_relevance": 2,
"materials_and_methods": 10,
"praise": 3,
"presentation_and_reporting": 3,
"results_and_discussion": 4,
"suggestion_and_solution": 6,
"total": 15
}
| 2.133333
| 2.070204
| 0.06313
| 2.179727
| 0.496897
| 0.046393
| 0.133333
| 0.133333
| 0.133333
| 0.666667
| 0.2
| 0.2
| 0.266667
| 0.4
|
{
"criticism": 0.13333333333333333,
"example": 0.13333333333333333,
"importance_and_relevance": 0.13333333333333333,
"materials_and_methods": 0.6666666666666666,
"praise": 0.2,
"presentation_and_reporting": 0.2,
"results_and_discussion": 0.26666666666666666,
"suggestion_and_solution": 0.4
}
| 2.133333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
kk_XkMO0-dP8W
|
Feature Learning in Deep Neural Networks - A Study on Speech Recognition
Tasks
|
Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.
|
Feature Learning in Deep Neural Networks – Studies
on Speech Recognition Tasks
Dong Yu, Michael L. Seltzer, Jinyu Li1, Jui-Ting Huang1, Frank Seide2
Microsoft Research, Redmond, W A 98052
1Microsoft Corporation, Redmond, W A 98052
2Microsoft Research Asia, Beijing, P.R.C.
{dongyu,mseltzer,jinyli,jthuang,fseide}@microsoft.com
Abstract
Recent studies have shown that deep neural networks (DNNs) perform signifi-
cantly better than shallow networks and Gaussian mixture models (GMMs) on
large vocabulary speech recognition tasks. In this paper, we argue that the im-
proved accuracy achieved by the DNNs is the result of their ability to extract dis-
criminative internal representations that are robust to the many sources of variabil-
ity in speech signals. We show that these representations become increasingly in-
sensitive to small perturbations in the input with increasing network depth, which
leads to better speech recognition performance with deeper networks. We also
show that DNNs cannot extrapolate to test samples that are substantially differ-
ent from the training examples. If the training data are sufficiently representative,
however, internal features learned by the DNN are relatively stable with respect
to speaker differences, bandwidth differences, and environment distortion. This
enables DNN-based recognizers to perform as well or better than state-of-the-art
systems based on GMMs or shallow networks without the need for explicit model
adaptation or feature normalization.
1 Introduction
Automatic speech recognition (ASR) has been an active research area for more than five decades.
However, the performance of ASR systems is still far from satisfactory and the gap between ASR and
human speech recognition is still large on most tasks. One of the primary reasons speech recognition
is challenging is the high variability in speech signals. For example, speakers may have different
accents, dialects, or pronunciations, and speak in different styles, at different rates, and in different
emotional states. The presence of environmental noise, reverberation, different microphones and
recording devices results in additional variability. To complicate matters, the sources of variability
are often nonstationary and interact with the speech signal in a nonlinear way. As a result, it is
virtually impossible to avoid some degree of mismatch between the training and testing conditions.
Conventional speech recognizers use a hidden Markov model (HMM) in which each acoustic state
is modeled by a Gaussian mixture model (GMM). The model parameters can be discriminatively
trained using an objective function such as maximum mutual information (MMI) [1] or minimum
phone error rate (MPE) [2]. Such systems are known to be susceptible to performance degrada-
tion when even mild mismatch between training and testing conditions is encountered. To combat
this, a variety of techniques has been developed. For example, mismatch due to speaker differ-
ences can be reduced by V ocal Tract Length Normalization (VTLN) [3], which nonlinearly warps
the input feature vectors to better match the acoustic model, or Maximum Likelihood Linear Re-
gression (MLLR) [4], which adapt the GMM parameters to be more representative of the test data.
Other techniques such as Vector Taylor Series (VTS) adaptation are designed to address the mis-
match caused by environmental noise and channel distortion [5]. While these methods have been
1
arXiv:1301.3605v3 [cs.LG] 8 Mar 2013
successful to some degree, they add complexity and latency to the decoding process. Most require
multiple iterations of decoding and some only perform well with ample adaptation data, making
them unsuitable for systems that process short utterances, such as voice search.
Recently, an alternative acoustic model based on deep neural networks (DNNs) has been proposed.
In this model, a collection of Gaussian mixture models is replaced by a single context-dependent
deep neural network (CD-DNN). A number of research groups have obtained strong results on a
variety of large scale speech tasks using this approach [6–13]. Because the temporal structure of the
HMM is maintained, we refer to these models as CD-DNN-HMM acoustic models.
In this paper, we analyze the performance of DNNs for speech recognition and in particular, exam-
ine their ability to learn representations that are robust to variability in the acoustic signal. To do
so, we interpret the DNN as a joint model combining a nonlinear feature transformation and a log-
linear classifier. Using this view, we show that the many layers of nonlinear transforms in a DNN
convert the raw features into a highly invariant and discriminative representation which can then be
effectively classified using a log-linear model. These internal representations become increasingly
insensitive to small perturbations in the input with increasing network depth. In addition, the classi-
fication accuracy improves with deeper networks, although the gain per layer diminishes. However,
we also find that DNNs are unable to extrapolate to test samples that are substantially different from
the training samples. A series of experiments demonstrates that if the training data are sufficiently
representative, the DNN learns internal features that are relatively invariant to sources of variability
common in speech recognition such as speaker differences and environmental distortions. This en-
ables DNN-based speech recognizers to perform as well or better than state-of-the-art GMM-based
systems without the need for explicit model adaptation or feature normalization algorithms.
The rest of the paper is organized as follows. In Section 2 we briefly describe DNNs and illustrate
the feature learning interpretation of DNNs. In Section 3 we show that DNNs can learn invariant
and discriminative features and demonstrate empirically that higher layer features are less sensitive
to perturbations of the input. In Section 4 we point out that the feature generalization ability is
effective only when test samples are small perturbations of training samples. Otherwise, DNNs
perform poorly as indicated in our mixed-bandwidth experiments. We apply this analysis to speaker
adaptation in Section 5 and find that deep networks learn speaker-invariant representations, and to
the Aurora 4 noise robustness task in Section 6 where we show that a DNN can achieve performance
equivalent to the current state of the art without requiring explicit adaptation to the environment. We
conclude the paper in Section 7.
2 Deep Neural Networks
A deep neural network (DNN) is conventional multi-layer perceptron (MLP) with many hidden
layers (thus deep). If the input and output of the DNN are denoted as x and y, respectively, a
DNN can be interpreted as a directed graphical model that approximates the posterior probability
py|x(y= s|x) of a class sgiven an observation vector x, as a stack of (L+ 1)layers of log-linear
models. The first Llayers model the posterior probabilities of hidden binary vectors hℓ given input
vectors vℓ. If hℓ consists of Nℓ hidden units, each denoted as hℓ
j, the posterior probability can be
expressed as
pℓ(hℓ|vℓ) =
Nℓ
∏
j=1
ezℓ
j(vℓ)·hℓ
j
ezℓ
j(vℓ)·1 + ezℓ
j(vℓ)·0 , 0 ≤ℓ<L
where zℓ(vℓ) = (Wℓ)T vℓ + aℓ, and Wℓ and aℓ represent the weight matrix and bias vector in the
ℓ-th layer, respectively. Each observation is propagated forward through the network, starting with
the lowest layer(v0 = x) . The output variables of each layer become the input variables of the next,
i.e. vℓ+1 = hℓ. In the final layer, the class posterior probabilities are computed as a multinomial
distribution
py|x(y= s|x) = pL(y= s|vL) = ezL
s (vL)
∑
s′ ezL
s′ (vL) = softmaxs
(
vL)
. (1)
Note that the equality between py|x(y = s|x) and pL(y = s|vL) is valid by making a mean-field
approximation [14] at each hidden layer.
2
In the DNN, the estimation of the posterior probability py|x(y= s|x) can also be considered a two-
step deterministic process. In the first step, the observation vectorxis transformed to another feature
vector vL through L layers of non-linear transforms.In the second step, the posterior probability
py|x(y = s|x) is estimated using the log-linear model (1) given the transformed feature vector vL.
If we consider the first L layers fixed, learning the parameters in the softmax layer is equivalent
to training a conditional maximum-entropy (MaxEnt) model on features vL. In the conventional
MaxEnt model, features are manually designed [15]. In DNNs, however, the feature representations
are jointly learned with the MaxEnt model from the data. This not only eliminates the tedious and
potentially erroneous process of manual feature extraction but also has the potential to automatically
extract invariant and discriminative features, which are difficult to construct manually.
In all the following discussions, we use DNNs in the framework of the CD-DNN-HMM [6–10]
and use speech recognition as our classification task. The detailed training procedure and decoding
technique for CD-DNN-HMMs can be found in [6–8].
3 Invariant and discriminative features
3.1 Deeper is better
Using DNNs instead of shallow MLPs is a key component to the success of CD-DNN-HMMs. Ta-
ble 1, which is extracted from [8], summarizes the word error rates (WER) on the Switchboard
(SWB) [16] Hub5’00-SWB test set. Switchboard is a corpus of conversational telephone speech.
The system was trained using the 309-hour training set with labels generated by Viterbi align-
ment from a maximum likelihood (ML) trained GMM-HMM system. The labels correspond to
tied-parameter context-dependent acoustic states called senones. Our baseline WER with the cor-
responding discriminatively trained traditional GMM-HMM system is 23.6%, while the best CD-
DNN-HMM achives 17.0%—a 28% relative error reduction (it is possible to further improve the
DNN to a one-third reduction by realignment [8]).
We can observe that deeper networks outperform shallow ones. The WER decreases as the number
of hidden layers increases, using a fixed layer size of 2048 hidden units. In other words, deeper mod-
els have stronger discriminative ability than shallow models. This is also reflected in the improve-
ment of the training criterion (not shown). More interestingly, if architectures with an equivalent
number of parameters are compared, the deep models consistently outperform the shallow models
when the deep model is sufficiently wide at each layer. This is reflected in the right column of the
table, which shows the performance for shallow networks with the same number of parameters as
the deep networks in the left column. Even if we further increase the size of an MLP with a single
hidden layer to about 16000 hidden units we can only achieve a WER of 22.1%, which is signifi-
cantly worse than the 17.1% WER that is obtained using a 7×2k DNN under the same conditions.
Note that as the number of hidden layers further increases, only limited additional gains are obtained
and performance saturates after 9 hidden layers. The 9x2k DNN performs equally well as a 5x3k
DNN which has more parameters. In practice, a tradeoff needs to be made between the width of
each layer, the additional reduction in WER and the increased cost of training and decoding as the
number of hidden layers is increased.
3.2 DNNs learn more invariant features
We have noticed that the biggest benefit of using DNNs over shallow models is that DNNs learn more
invariant and discriminative features. This is because many layers of simple nonlinear processing
can generate a complicated nonlinear transform. To show that this nonlinear transform is robust to
small variations in the input features, let’s assume the output of layerl−1, or equivalently the input
to the layer lis changed from vℓ to vℓ + δℓ, where δℓ is a small change. This change will cause the
output of layer l, or equivalently the input to the layer ℓ+ 1to change by
δℓ+1 = σ(zℓ(vℓ + δℓ)) −σ(zℓ(vℓ)) ≈diag
(
σ′(zℓ(vℓ))
)
(wℓ)T δℓ.
3
Table 1: Effect of CD-DNN-HMM network depth on WER (%) on Hub5’00-SWB using the 309-
hour Switchboard training set. DBN pretraining is applied.
L×N WER 1 ×N WER
1 ×2k 24.2 – –
2 ×2k 20.4 – –
3 ×2k 18.4 – –
4 ×2k 17.8 – –
5 ×2k 17.2 1 ×3772 22.5
7 ×2k 17.1 1 ×4634 22.6
9 ×2k 17.0 – –
5 ×3k 17.0 – –
– – 1 ×16k 22.1
Figure 1: Percentage of saturated activations at each layer
The norm of the change δℓ+1 is
∥δℓ+1∥≈∥ diag(σ′(zℓ(vℓ)))((wℓ)T δℓ)∥
≤∥diag(σ′(zℓ(vℓ)))(wℓ)T ∥∥δℓ∥
= ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥∥δℓ∥ (2)
where ◦refers to an element-wise product.
Note that the magnitude of the majority of the weights is typically very small if the size of the hidden
layer is large. For example, in a6×2k DNN trained using 30 hours of SWB data, 98% of the weights
in all layers except the input layer have magnitudes less than 0.5.
While each element in vℓ+1 ◦(1 −vℓ+1) is less than or equal to 0.25, the actual value is typically
much smaller. This means that a large percentage of hidden neurons will not be active, as shown in
Figure 1. As a result, the average norm ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 in (2) across a 6-hr SWB
development set is smaller than one in all layers, as indicated in Figure 2. Since all hidden layer
values are bounded in the same range of (0,1), this indicates that when there is a small perturbation
on the input, the perturbation shrinks at each higher hidden layer. In other words, features generated
by higher hidden layers are more invariant to variations than those represented by lower layers.
Note that the maximum norm over the same development set is larger than one, as seen in Figure
2. This is necessary since the differences need to be enlarged around the class boundaries to have
discrimination ability.
4 Learning by seeing
In Section 3, we showed empirically that small perturbations in the input will be gradually shrunk
as we move to the internal representation in the higher layers. In this section, we point out that the
4
Figure 2: Average and maximum ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 across layers on a 6×2k DNN
Figure 3: Illustration of mixed-bandwidth speech recognition using a DNN
above result is only applicable to small perturbations around the training samples. When the test
samples deviate significantly from the training samples, DNNs cannot accurately classify them. In
other words, DNNs must see examples of representative variations in the data during training in
order to generalize to similar variations in the test data.
We demonstrate this point using a mixed-bandwidth ASR study. Typical speech recognizers are
trained on either narrowband speech signals, recorded at 8 kHz, or wideband speech signals,
recorded at 16 kHz. It would be advantageous if a single system could recognize both narrow-
band and wideband speech, i.e. mixed-bandwidth ASR. One such system was recently proposed
using a CD-DNN-HMM [17]. In that work, the following DNN architecture was used for all experi-
ments. The input features were 29 mel-scale log filter-bank outputs together with dynamic features.
An 11-frame context window was used generating an input layer with 29 ·3 ·11 = 957nodes. The
DNN has 7 hidden layers, each with 2048 nodes. The output layer has 1803 nodes, corresponding
to the number of senones determined by the GMM system.
The 29-dimensional filter bank has two parts: the first 22 filters span 0–4 kHz and the last 7 filters
span 4–8 kHz, with the center frequency of the first filter in the higher filter bank at 4 kHz. When the
speech is wideband, all 29 filters have observed values. However, when the speech is narrowband,
the high-frequency information was not captured so the final 7 filters are set to 0. Figure 3 illustrates
the architecture of the mixed-bandwidth ASR system.
Experiments were conducted on a mobile voice search (VS) corpus. This task consists of internet
search queries made by voice on a smartphone.There are two training sets, VS-1 and VS-2, con-
sisting of 72 and 197 hours of wideband audio data, respectively. These sets were collected during
5
Table 2: WER (%) on wideband (16k) and narrowband (8k) test sets with and without narrowband
training data.
training data 16 kHz VS-T 8 kHz VS-T
16 kHz VS-1 + 16 kHz VS-2 27.5 53.5
16 kHz VS-1 + 8 kHz VS-2 28.3 29.3
different times of year. The test set, called VS-T, has 26757 words in 9562 utterances. The narrow
band training and test data were obtained by downsampling the wideband data.
Table 2 summarizes the WER on the wideband and narrowband test sets when the DNN is trained
with and without narrowband speech. From this table, it is clear that if all training data are wideband,
the DNN performs well on the wideband test set (27.5% WER) but very poorly on the narrowband
test set (53.5% WER). However, if we convert VS-2 to narrowband speech and train the same DNN
using mixed-bandwidth data (second row), the DNN performs very well on both wideband and
narrowband speech.
To understand the difference between these two scenarios, we take the output vectors at each layer
for the wideband and narrowband input feature pairs, hℓ(xwb) and hℓ(xnb), and measure their Eu-
clidean distance. For the top layer, whose output is the senone posterior probability, we calculate
the KL-divergence in nats between py|x(sj|xwb) and py|x(sj|xnb). Table 3 shows the statistics of dl
and dy over 40,000 frames randomly sampled from the test set for the DNN trained using wideband
speech only and the DNN trained using mixed-bandwidth speech.
Table 3: Euclidean distance for the output vectors at each hidden layer (L1-L7) and the KL di-
vergence (nats) for the posteriors at the top layer between the narrowband (8 kHz) and wideband
(16 kHz) input features, measured using the wideband DNN or the mixed-bandwidth DNN.
wideband DNN mixed-band DNN
layer dist mean variance mean variance
L1
Eucl
13.28 3.90 7.32 3.62
L2 10.38 2.47 5.39 1.28
L3 8.04 1.77 4.49 1.27
L4 8.53 2.33 4.74 1.85
L5 9.01 2.96 5.39 2.30
L6 8.46 2.60 4.75 1.57
L7 5.27 1.85 3.12 0.93
Top KL 2.03 – 0.22 –
From Table 3 we can observe that in both DNNs, the distance between hidden layer vectors generated
from the wideband and narrowband input feature pair is significantly reduced at the layers close
to the output layer compared to that in the first hidden layer. Perhaps what is more interesting
is that the average distances and variances in the data-mixed DNN are consistently smaller than
those in the DNN trained on wideband speech only. This indicates that by using mixed-bandwidth
training data, the DNN learns to consider the differences in the wideband and narrowband input
features as irrelevant variations. These variations are suppressed after many layers of nonlinear
transformation. The final representation is thus more invariant to this variation and yet still has the
ability to distinguish between different class labels. This behavior is even more obvious at the output
layer since the KL-divergence between the paired outputs is only 0.22 in the mixed-bandwidth DNN,
much smaller than the 2.03 observed in the wideband DNN.
5 Robustness to speaker variation
A major source of variability is variation across speakers. Techniques for adapting a GMM-HMM to
a speaker have been investigated for decades. Two important techniques are VTLN [3], and feature-
space MLLR (fMLLR) [4]. Both VTLN and fMLLR operate on the features directly, making their
application in the DNN context straightforward.
6
Table 4: Comparison of feature-transform based speaker-adaptation techniques for GMM-HMMs,
a shallow, and a deep NN. Word-error rates in % for Hub5’00-SWB (relative change in parentheses).
GMM-HMM CD-MLP-HMM CD-DNN-HMM
adaptation technique 40 mix 1×2k 7×2k
speaker independent 23.6 24.2 17.1
+ VTLN 21.5 (-9%) 22.5 (-7%) 16.8 (-2%)
+ {fMLLR/fDLR}×4 20.4 (-5%) 21.5 (-4%) 16.4 (-2%)
VTLN warps the frequency axis of the filterbank analysis to account for the fact that the precise lo-
cations of vocal-tract resonances vary roughly monotonically with the physical size of the speaker.
This is done in both training and testing. On the other hand, fMLLR applies an affine transform
to the feature frames such that an adaptation data set better matches the model. In most cases, in-
cluding this work, ‘self-adaptation’ is used: generate labels using unsupervised transcription, then
re-recognize with the adapted model. This process is iterated four times. For GMM-HMMs, fM-
LLR transforms are estimated to maximize the likelihood of the adaptation data given the model.
For DNNs, we instead maximize cross entropy (with back propagation), which is a discriminative
criterion, so we prefer to call this transform feature-space Discriminative Linear Regression (fDLR).
Note that the transform is applied to individual frames, prior to concatenation.
Typically, applying VTLN and fMLLR jointly to a GMM-HMM system will reduce errors by 10–
15%. Initially, similar gains were expected for DNNs as well. However, these gains were not
realized, as shown in Table 4 [9]. The table compares VTLN and fMLLR/fDLR for GMM-HMMs,
a context-dependent ANN-HMM with a single hidden layer, and a deep network with 7 hidden
layers, on the same Switchboard task described in Section 3.1. For this task, test data are very
consistent with the training, and thus, only a small amount of adaptation to other factors such as
recording conditions or environmental factors occurs. We use the same configuration as in Table 1
which is speaker independent using single-pass decoding.
For the GMM-HMM, VTLN achieves a strong relative gain of 9%. VTLN is also effective with the
shallow neural-network system, gaining a slightly smaller 7%. However, the improvement of VTLN
on the deep network with 7 hidden layers is a much smaller 2% gain. Combining VTLN with
fDLR further reduces WER by 5% and 4% relative, for the GMM-HMM and the shallow network,
respectively. The reduction for the DNN is only 2%. We also tried transplanting VTLN and fMLLR
transforms estimated on the GMM system into the DNN, and achieved very similar results [9].
The VTLN and fDLR implementations of the shallow and deep networks are identical. Thus, we
conclude that to a significant degree, the deep neural network is able to learn internal representations
that are invariant with respect to the sources of variability that VTLN and fDLR address.
6 Robustness to environmental distortions
In many speech recognition tasks, there are often cases where the despite the presence of variability
in the training data, significant mismatch between training and test data persists. Environmental
factors are common sources of such mismatch, e.g. ambient noise, reverberation, microphone type
and capture device. The analysis in the previous sections suggests that DNNs have the ability to
generate internal representations that are robust with respect to variability seen in the training data.
In this section, we evaluate the extent to which this invariance can be obtained with respect to
distortions caused by the environment.
We performed a series of experiments on the Aurora 4 corpus [18], a 5000-word vocabulary task
based on the Wall Street Journal (WSJ0) corpus. The experiments were performed with the 16 kHz
multi-condition training set consisting of 7137 utterances from 83 speakers. One half of the ut-
terances was recorded by a high-quality close-talking microphone and the other half was recorded
using one of 18 different secondary microphones. Both halves include a combination of clean speech
and speech corrupted by one of six different types of noise (street traffic, train station, car, babble,
restaurant, airport) at a range of signal-to-noise ratios (SNR) between 10-20 dB.
7
The evaluation set consists of 330 utterances from 8 speakers. This test set was recorded by the pri-
mary microphone and a number of secondary microphones. These two sets are then each corrupted
by the same six noises used in the training set at SNRs between 5-15 dB, creating a total of 14 test
sets. These 14 test sets can then be grouped into 4 subsets, based on the type of distortion: none
(clean speech), additive noise only, channel distortion only, and noise + channel. Notice that the
types of noise are common across training and test sets but the SNRs of the data are not.
The DNN was trained using 24-dimensional log mel filterbank features with utterance-level mean
normalization. The first- and second-order derivative features were appended to the static feature
vectors. The input layer was formed from a context window of 11 frames creating an input layer of
792 input units. The DNN had 7 hidden layers with 2048 hidden units in each layer and the final
softmax output layer had 3206 units, corresponding to the senones of the baseline HMM system.
The network was initialized using layer-by-layer generative pre-training and then discriminatively
trained using back propagation.
In Table 5, the performance obtained by the DNN acoustic model is compared to several other
systems. The first system is a baseline GMM-HMM system, while the remaining systems are repre-
sentative of the state of the art in acoustic modeling and noise and speaker adaptation. All used the
same training set. To the authors’ knowledge, these are the best published results on this task.
The second system combines Minimum Phone Error (MPE) discriminative training [2] and noise
adaptive training (NAT) [19] using VTS adaptation to compensate for noise and channel mismatch
[20]. The third system uses a hybrid generative/discriminative classifier [21] as follows . First, an
adaptively trained HMM with VTS adaptation is used to generate features based on state likelihoods
and their derivatives. Then, these features are input to a discriminative log-linear model to obtain the
final hypothesis. The fourth system uses an HMM trained with NAT and combines VTS adaptation
for environment compensation and MLLR for speaker adaptation [22]. Finally, the last row of the
table shows the performance of the DNN system.
Table 5: A comparison of several systems in the literature to a DNN system on the Aurora 4 task.
Systems
distortion
A VGnone noise channel noise +
(clean) channel
GMM baseline 14.3 17.9 20.2 31.3 23.6
MPE-NAT + VTS [20] 7.2 12.8 11.5 19.7 15.3
NAT + Derivative Kernels [21] 7.4 12.6 10.7 19.0 14.8
NAT + Joint MLLR/VTS [22] 5.6 11.0 8.8 17.8 13.4
DNN (7×2048) 5.6 8.8 8.9 20.0 13.4
It is noteworthy that to obtain good performance, the GMM-based systems required complicated
adaptive training procedures [19, 23] and multiple iterations of recognition in order to perform ex-
plicit environment and/or speaker adaptation. One of these systems required two classifiers. In
contrast, the DNN system required only standard training and a single forward pass for classifi-
cation. Yet, it outperforms the two systems that perform environment adaptation and matches the
performance of a system that adapts to both the environment and speaker.
Finally, we recall the results in Section 4, in which the DNN trained only on wideband data could
not accurately classify narrowband speech. Similarly, a DNN trained only on clean speech has no
ability to learn internal features that are robust to environmental noise. When the DNN for Aurora
4 is trained using only clean speech examples, the performance on the noise- and channel-distorted
speech degrades substantially, resulting in an average WER of 30.6%. This further confirms our
earlier observation that DNNs are robust to modest variations between training and test data but
perform poorly if the mismatch is more severe.
7 Conclusion
In this paper we demonstrated through speech recognition experiments that DNNs can extract more
invariant and discriminative features at the higher layers. In other words, the features learned by
8
DNNs are less sensitive to small perturbations in the input features. This property enables DNNs to
generalize better than shallow networks and enables CD-DNN-HMMs to perform speech recogni-
tion in a manner that is more robust to mismatches in speaker, environment, or bandwidth. On the
other hand, DNNs cannot learn something from nothing. They require seeing representative samples
to perform well. By using a multi-style training strategy and letting DNNs to generalize to similar
patterns, we equaled the best result ever reported on the Aurora 4 noise robustness benchmark task
without the need for multiple recognition passes and model adaptation.
References
[1] L. Bahl, P. Brown, P.V . De Souza, and R. Mercer, “Maximum mutual information estimation of hidden
markov model parameters for speech recognition,” in Proc. ICASSP, Apr, vol. 11, pp. 49–52.
[2] D. Povey and P. C. Woodland, “Minimum phone error and i-smoothing for improved discriminative
training,” in Proc. ICASSP, 2002.
[3] P. Zhan et al., “V ocal tract length normalization for lvcsr,” Tech. Rep. CMU-LTI-97-150, Carnegie Mellon
Univ, 1997.
[4] M. J. F. Gales, “Maximum likelihood linear transformations for HMM-based speech recognition,” Com-
puter Speech and Language, vol. 12, pp. 75–98, 1998.
[5] A. Acero, L. Deng, T. Kristjansson, and J. Zhang, “HMM Adaptation Using Vector Taylor Series for
Noisy Speech Recognition,” in Proc. of ICSLP, 2000.
[6] D. Yu, L. Deng, and G. Dahl, “Roles of pretraining and fine-tuning in context-dependent DBN-HMMs
for real-world speech recognition,” inProc. NIPS Workshop on Deep Learning and Unsupervised Feature
Learning, 2010.
[7] G.E. Dahl, D. Yu, L. Deng, and A. Acero, “Context-dependent pretrained deep neural networks for large
vocabulary speech recognition,” IEEE Trans. Audio, Speech, and Lang. Proc., vol. 20, no. 1, pp. 33–42,
Jan. 2012.
[8] F. Seide, G. Li, and D. Yu, “Conversational speech transcription using context-dependent deep neural
networks,” in Proc. Interspeech, 2011.
[9] F. Seide, G.Li, X. Chen, and D. Yu, “Feature engineering in context-dependent deep neural networks for
conversational speech transcription,” in Proc. ASRU, 2011, pp. 24–29.
[10] D. Yu, F. Seide, G.Li, and L. Deng, “Exploiting sparseness in deep neural networks for large vocabulary
speech recognition,” in Proc. ICASSP, 2012, pp. 4409–4412.
[11] N. Jaitly, P. Nguyen, A. Senior, and V . Vanhoucke, “An application of pretrained deep neural networks to
large vocabulary conversational speech recognition,” Tech. Rep. Tech. Rep. 001, Department of Computer
Science, University of Toronto, 2012.
[12] T. N. Sainath, B. Kingsbury, B. Ramabhadran, P. Fousek, P. Novak, and A. r. Mohamed, “Making deep
belief networks effective for large vocabulary continuous speech recognition,” in Proc. ASRU, 2011, pp.
30–35.
[13] G. E. Dahl, D. Yu, L. Deng, and A. Acero, “Large vocabulary continuous speech recognition with context-
dependent dbn-hmms,” in Proc. ICASSP, 2011, pp. 4688–4691.
[14] L. Saul, T. Jaakkola, and M. I. Jordan, “Mean field theory for sigmoid belief networks,” Journal of
Artificial Intelligence Research, vol. 4, pp. 61–76, 1996.
[15] D. Yu, L. Deng, and A. Acero, “Using continuous features in the maximum entropy model,” Pattern
Recognition Letters, vol. 30, no. 14, pp. 1295–1300, 2009.
[16] J. Godfrey and E. Holliman, Switchboard-1 Release 2, Linguistic Data Consortium, Philadelphia, PA,
1997.
[17] J. Li, D. Yu, J.-T. Huang, and Y . Gong, “Improving wideband speech recognition using mixed-bandwidth
training data in CD-DNN-HMM,” in Proc. SLT, 2012.
[18] N. Parihar and J. Picone, “Aurora working group: DSR front end LVCSR evaluation AU/384/02,” Tech.
Rep., Inst. for Signal and Information Process, Mississippi State University.
[19] O. Kalinli, M. L. Seltzer, J. Droppo, and A. Acero, “Noise adaptive training for robust automatic speech
recognition,” IEEE Trans. on Audio, Sp. and Lang. Proc., vol. 18, no. 8, pp. 1889 –1901, Nov. 2010.
[20] F. Flego and M. J. F. Gales, “Discriminative adaptive training with VTS and JUD,” in Proc. ASRU, 2009.
[21] A. Ragni and M. J. F. Gales, “Derivative kernels for noise robust ASR,” in Proc. ASRU, 2011.
[22] Y .-Q. Wang and M. J. F. Gales, “Speaker and noise factorisation for robust speech recognition,” IEEE
Trans. on Audio Speech and Language Proc., vol. 20, no. 7, 2012.
[23] H. Liao and M. J. F. Gales, “Adaptive training with joint uncertainty decoding for robust recognition of
noisy data,” in Proc. of ICASSP, Honolulu, Hawaii, 2007.
9
|
Dong Yu, Mike Seltzer, Jinyu Li, Jui-Ting Huang, Frank Seide
|
Unknown
| 2,013
|
{"id": "kk_XkMO0-dP8W", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358404200000, "tmdate": 1358404200000, "ddate": null, "number": 43, "content": {"title": "Feature Learning in Deep Neural Networks - A Study on Speech Recognition\r\n Tasks", "decision": "conferenceOral-iclr2013-conference", "abstract": "Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.", "pdf": "https://arxiv.org/abs/1301.3605", "paperhash": "yu|feature_learning_in_deep_neural_networks_a_study_on_speech_recognition_tasks", "keywords": [], "conflicts": [], "authors": ["Dong Yu", "Mike Seltzer", "Jinyu Li", "Jui-Ting Huang", "Frank Seide"], "authorids": ["dongyu888@gmail.com", "mike.seltzer@gmail.com", "jinyli@microsoft.com", "jthuang@microsoft.com", "fseide@microsoft.com"]}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["dongyu888@gmail.com"], "writers": []}
|
[Review]:
We’d like to thank the reviewers for their comments.
We have uploaded a revised version of the paper which we believe addresses reviewers’ concerns as well as the grammatical issues and typos.
We have revised the abstract and introduction to better establish the purpose of the paper. Our goal is to demonstrate that deep neural networks can learn internal representations that are robust to variability in the input, and that this robustness is maintained when large amounts of training data are used. Much work in DNNs has been on smaller data sets and historically, in speech recognition, large improvements observed on small systems usually do not translate when applied to large-scale state-of-the-art systems.
In addition, the paper contrasts DNN-based systems and their “built in” invariance to a wide variety of variability, to GMM-based systems, where algorithms have been designed to combat unwanted variability in a source-specific manner, i.e. they are designed to address a particular mismatch, such as the speaker or the environment.
We also believe there is also a practical implication of these results: algorithms for addressing this acoustic mismatch in speaker, environment, or other factors, which are standard and essential for GMM-based recognizers, become far less critical and potentially unnecessary for DNN-based recognizers. We think this is important for both setting future research directions and deploying large-scale systems.
Finally, while some of the results have been published previously, we believe the inherent robustness of DNNs to such diverse sources of variability is quite interesting, and is a point that might allude readers unless these results are combined and presented together. We also want to point out that the analysis of sensitivity to the input perturbation and all of the results in Section 6 on environmental robustness are new and previously unpublished.
We hope by putting together all these analyses and results in one paper we can provide some insights on the strengths and weaknesses of using a DNN for speech recognition when trained with real world data.
|
Mike Seltzer
| null | null |
{"id": "WWycbHg8XRWuv", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362989220000, "tmdate": 1362989220000, "ddate": null, "number": 3, "content": {"title": "", "review": "We\u2019d like to thank the reviewers for their comments. \r\n\r\nWe have uploaded a revised version of the paper which we believe addresses reviewers\u2019 concerns as well as the grammatical issues and typos. \r\n \r\nWe have revised the abstract and introduction to better establish the purpose of the paper. Our goal is to demonstrate that deep neural networks can learn internal representations that are robust to variability in the input, and that this robustness is maintained when large amounts of training data are used. Much work in DNNs has been on smaller data sets and historically, in speech recognition, large improvements observed on small systems usually do not translate when applied to large-scale state-of-the-art systems. \r\n \r\nIn addition, the paper contrasts DNN-based systems and their \u201cbuilt in\u201d invariance to a wide variety of variability, to GMM-based systems, where algorithms have been designed to combat unwanted variability in a source-specific manner, i.e. they are designed to address a particular mismatch, such as the speaker or the environment. \r\n \r\nWe also believe there is also a practical implication of these results: algorithms for addressing this acoustic mismatch in speaker, environment, or other factors, which are standard and essential for GMM-based recognizers, become far less critical and potentially unnecessary for DNN-based recognizers. We think this is important for both setting future research directions and deploying large-scale systems. \r\n \r\nFinally, while some of the results have been published previously, we believe the inherent robustness of DNNs to such diverse sources of variability is quite interesting, and is a point that might allude readers unless these results are combined and presented together. We also want to point out that the analysis of sensitivity to the input perturbation and all of the results in Section 6 on environmental robustness are new and previously unpublished. \r\n\r\nWe hope by putting together all these analyses and results in one paper we can provide some insights on the strengths and weaknesses of using a DNN for speech recognition when trained with real world data."}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "kk_XkMO0-dP8W", "readers": ["everyone"], "nonreaders": [], "signatures": ["Mike Seltzer"], "writers": ["anonymous"]}
|
{
"criticism": 1,
"example": 0,
"importance_and_relevance": 3,
"materials_and_methods": 7,
"praise": 1,
"presentation_and_reporting": 2,
"results_and_discussion": 4,
"suggestion_and_solution": 2,
"total": 12
}
| 1.666667
| 1.650884
| 0.015782
| 1.69549
| 0.316569
| 0.028824
| 0.083333
| 0
| 0.25
| 0.583333
| 0.083333
| 0.166667
| 0.333333
| 0.166667
|
{
"criticism": 0.08333333333333333,
"example": 0,
"importance_and_relevance": 0.25,
"materials_and_methods": 0.5833333333333334,
"praise": 0.08333333333333333,
"presentation_and_reporting": 0.16666666666666666,
"results_and_discussion": 0.3333333333333333,
"suggestion_and_solution": 0.16666666666666666
}
| 1.666667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
kk_XkMO0-dP8W
|
Feature Learning in Deep Neural Networks - A Study on Speech Recognition
Tasks
|
Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.
|
Feature Learning in Deep Neural Networks – Studies
on Speech Recognition Tasks
Dong Yu, Michael L. Seltzer, Jinyu Li1, Jui-Ting Huang1, Frank Seide2
Microsoft Research, Redmond, W A 98052
1Microsoft Corporation, Redmond, W A 98052
2Microsoft Research Asia, Beijing, P.R.C.
{dongyu,mseltzer,jinyli,jthuang,fseide}@microsoft.com
Abstract
Recent studies have shown that deep neural networks (DNNs) perform signifi-
cantly better than shallow networks and Gaussian mixture models (GMMs) on
large vocabulary speech recognition tasks. In this paper, we argue that the im-
proved accuracy achieved by the DNNs is the result of their ability to extract dis-
criminative internal representations that are robust to the many sources of variabil-
ity in speech signals. We show that these representations become increasingly in-
sensitive to small perturbations in the input with increasing network depth, which
leads to better speech recognition performance with deeper networks. We also
show that DNNs cannot extrapolate to test samples that are substantially differ-
ent from the training examples. If the training data are sufficiently representative,
however, internal features learned by the DNN are relatively stable with respect
to speaker differences, bandwidth differences, and environment distortion. This
enables DNN-based recognizers to perform as well or better than state-of-the-art
systems based on GMMs or shallow networks without the need for explicit model
adaptation or feature normalization.
1 Introduction
Automatic speech recognition (ASR) has been an active research area for more than five decades.
However, the performance of ASR systems is still far from satisfactory and the gap between ASR and
human speech recognition is still large on most tasks. One of the primary reasons speech recognition
is challenging is the high variability in speech signals. For example, speakers may have different
accents, dialects, or pronunciations, and speak in different styles, at different rates, and in different
emotional states. The presence of environmental noise, reverberation, different microphones and
recording devices results in additional variability. To complicate matters, the sources of variability
are often nonstationary and interact with the speech signal in a nonlinear way. As a result, it is
virtually impossible to avoid some degree of mismatch between the training and testing conditions.
Conventional speech recognizers use a hidden Markov model (HMM) in which each acoustic state
is modeled by a Gaussian mixture model (GMM). The model parameters can be discriminatively
trained using an objective function such as maximum mutual information (MMI) [1] or minimum
phone error rate (MPE) [2]. Such systems are known to be susceptible to performance degrada-
tion when even mild mismatch between training and testing conditions is encountered. To combat
this, a variety of techniques has been developed. For example, mismatch due to speaker differ-
ences can be reduced by V ocal Tract Length Normalization (VTLN) [3], which nonlinearly warps
the input feature vectors to better match the acoustic model, or Maximum Likelihood Linear Re-
gression (MLLR) [4], which adapt the GMM parameters to be more representative of the test data.
Other techniques such as Vector Taylor Series (VTS) adaptation are designed to address the mis-
match caused by environmental noise and channel distortion [5]. While these methods have been
1
arXiv:1301.3605v3 [cs.LG] 8 Mar 2013
successful to some degree, they add complexity and latency to the decoding process. Most require
multiple iterations of decoding and some only perform well with ample adaptation data, making
them unsuitable for systems that process short utterances, such as voice search.
Recently, an alternative acoustic model based on deep neural networks (DNNs) has been proposed.
In this model, a collection of Gaussian mixture models is replaced by a single context-dependent
deep neural network (CD-DNN). A number of research groups have obtained strong results on a
variety of large scale speech tasks using this approach [6–13]. Because the temporal structure of the
HMM is maintained, we refer to these models as CD-DNN-HMM acoustic models.
In this paper, we analyze the performance of DNNs for speech recognition and in particular, exam-
ine their ability to learn representations that are robust to variability in the acoustic signal. To do
so, we interpret the DNN as a joint model combining a nonlinear feature transformation and a log-
linear classifier. Using this view, we show that the many layers of nonlinear transforms in a DNN
convert the raw features into a highly invariant and discriminative representation which can then be
effectively classified using a log-linear model. These internal representations become increasingly
insensitive to small perturbations in the input with increasing network depth. In addition, the classi-
fication accuracy improves with deeper networks, although the gain per layer diminishes. However,
we also find that DNNs are unable to extrapolate to test samples that are substantially different from
the training samples. A series of experiments demonstrates that if the training data are sufficiently
representative, the DNN learns internal features that are relatively invariant to sources of variability
common in speech recognition such as speaker differences and environmental distortions. This en-
ables DNN-based speech recognizers to perform as well or better than state-of-the-art GMM-based
systems without the need for explicit model adaptation or feature normalization algorithms.
The rest of the paper is organized as follows. In Section 2 we briefly describe DNNs and illustrate
the feature learning interpretation of DNNs. In Section 3 we show that DNNs can learn invariant
and discriminative features and demonstrate empirically that higher layer features are less sensitive
to perturbations of the input. In Section 4 we point out that the feature generalization ability is
effective only when test samples are small perturbations of training samples. Otherwise, DNNs
perform poorly as indicated in our mixed-bandwidth experiments. We apply this analysis to speaker
adaptation in Section 5 and find that deep networks learn speaker-invariant representations, and to
the Aurora 4 noise robustness task in Section 6 where we show that a DNN can achieve performance
equivalent to the current state of the art without requiring explicit adaptation to the environment. We
conclude the paper in Section 7.
2 Deep Neural Networks
A deep neural network (DNN) is conventional multi-layer perceptron (MLP) with many hidden
layers (thus deep). If the input and output of the DNN are denoted as x and y, respectively, a
DNN can be interpreted as a directed graphical model that approximates the posterior probability
py|x(y= s|x) of a class sgiven an observation vector x, as a stack of (L+ 1)layers of log-linear
models. The first Llayers model the posterior probabilities of hidden binary vectors hℓ given input
vectors vℓ. If hℓ consists of Nℓ hidden units, each denoted as hℓ
j, the posterior probability can be
expressed as
pℓ(hℓ|vℓ) =
Nℓ
∏
j=1
ezℓ
j(vℓ)·hℓ
j
ezℓ
j(vℓ)·1 + ezℓ
j(vℓ)·0 , 0 ≤ℓ<L
where zℓ(vℓ) = (Wℓ)T vℓ + aℓ, and Wℓ and aℓ represent the weight matrix and bias vector in the
ℓ-th layer, respectively. Each observation is propagated forward through the network, starting with
the lowest layer(v0 = x) . The output variables of each layer become the input variables of the next,
i.e. vℓ+1 = hℓ. In the final layer, the class posterior probabilities are computed as a multinomial
distribution
py|x(y= s|x) = pL(y= s|vL) = ezL
s (vL)
∑
s′ ezL
s′ (vL) = softmaxs
(
vL)
. (1)
Note that the equality between py|x(y = s|x) and pL(y = s|vL) is valid by making a mean-field
approximation [14] at each hidden layer.
2
In the DNN, the estimation of the posterior probability py|x(y= s|x) can also be considered a two-
step deterministic process. In the first step, the observation vectorxis transformed to another feature
vector vL through L layers of non-linear transforms.In the second step, the posterior probability
py|x(y = s|x) is estimated using the log-linear model (1) given the transformed feature vector vL.
If we consider the first L layers fixed, learning the parameters in the softmax layer is equivalent
to training a conditional maximum-entropy (MaxEnt) model on features vL. In the conventional
MaxEnt model, features are manually designed [15]. In DNNs, however, the feature representations
are jointly learned with the MaxEnt model from the data. This not only eliminates the tedious and
potentially erroneous process of manual feature extraction but also has the potential to automatically
extract invariant and discriminative features, which are difficult to construct manually.
In all the following discussions, we use DNNs in the framework of the CD-DNN-HMM [6–10]
and use speech recognition as our classification task. The detailed training procedure and decoding
technique for CD-DNN-HMMs can be found in [6–8].
3 Invariant and discriminative features
3.1 Deeper is better
Using DNNs instead of shallow MLPs is a key component to the success of CD-DNN-HMMs. Ta-
ble 1, which is extracted from [8], summarizes the word error rates (WER) on the Switchboard
(SWB) [16] Hub5’00-SWB test set. Switchboard is a corpus of conversational telephone speech.
The system was trained using the 309-hour training set with labels generated by Viterbi align-
ment from a maximum likelihood (ML) trained GMM-HMM system. The labels correspond to
tied-parameter context-dependent acoustic states called senones. Our baseline WER with the cor-
responding discriminatively trained traditional GMM-HMM system is 23.6%, while the best CD-
DNN-HMM achives 17.0%—a 28% relative error reduction (it is possible to further improve the
DNN to a one-third reduction by realignment [8]).
We can observe that deeper networks outperform shallow ones. The WER decreases as the number
of hidden layers increases, using a fixed layer size of 2048 hidden units. In other words, deeper mod-
els have stronger discriminative ability than shallow models. This is also reflected in the improve-
ment of the training criterion (not shown). More interestingly, if architectures with an equivalent
number of parameters are compared, the deep models consistently outperform the shallow models
when the deep model is sufficiently wide at each layer. This is reflected in the right column of the
table, which shows the performance for shallow networks with the same number of parameters as
the deep networks in the left column. Even if we further increase the size of an MLP with a single
hidden layer to about 16000 hidden units we can only achieve a WER of 22.1%, which is signifi-
cantly worse than the 17.1% WER that is obtained using a 7×2k DNN under the same conditions.
Note that as the number of hidden layers further increases, only limited additional gains are obtained
and performance saturates after 9 hidden layers. The 9x2k DNN performs equally well as a 5x3k
DNN which has more parameters. In practice, a tradeoff needs to be made between the width of
each layer, the additional reduction in WER and the increased cost of training and decoding as the
number of hidden layers is increased.
3.2 DNNs learn more invariant features
We have noticed that the biggest benefit of using DNNs over shallow models is that DNNs learn more
invariant and discriminative features. This is because many layers of simple nonlinear processing
can generate a complicated nonlinear transform. To show that this nonlinear transform is robust to
small variations in the input features, let’s assume the output of layerl−1, or equivalently the input
to the layer lis changed from vℓ to vℓ + δℓ, where δℓ is a small change. This change will cause the
output of layer l, or equivalently the input to the layer ℓ+ 1to change by
δℓ+1 = σ(zℓ(vℓ + δℓ)) −σ(zℓ(vℓ)) ≈diag
(
σ′(zℓ(vℓ))
)
(wℓ)T δℓ.
3
Table 1: Effect of CD-DNN-HMM network depth on WER (%) on Hub5’00-SWB using the 309-
hour Switchboard training set. DBN pretraining is applied.
L×N WER 1 ×N WER
1 ×2k 24.2 – –
2 ×2k 20.4 – –
3 ×2k 18.4 – –
4 ×2k 17.8 – –
5 ×2k 17.2 1 ×3772 22.5
7 ×2k 17.1 1 ×4634 22.6
9 ×2k 17.0 – –
5 ×3k 17.0 – –
– – 1 ×16k 22.1
Figure 1: Percentage of saturated activations at each layer
The norm of the change δℓ+1 is
∥δℓ+1∥≈∥ diag(σ′(zℓ(vℓ)))((wℓ)T δℓ)∥
≤∥diag(σ′(zℓ(vℓ)))(wℓ)T ∥∥δℓ∥
= ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥∥δℓ∥ (2)
where ◦refers to an element-wise product.
Note that the magnitude of the majority of the weights is typically very small if the size of the hidden
layer is large. For example, in a6×2k DNN trained using 30 hours of SWB data, 98% of the weights
in all layers except the input layer have magnitudes less than 0.5.
While each element in vℓ+1 ◦(1 −vℓ+1) is less than or equal to 0.25, the actual value is typically
much smaller. This means that a large percentage of hidden neurons will not be active, as shown in
Figure 1. As a result, the average norm ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 in (2) across a 6-hr SWB
development set is smaller than one in all layers, as indicated in Figure 2. Since all hidden layer
values are bounded in the same range of (0,1), this indicates that when there is a small perturbation
on the input, the perturbation shrinks at each higher hidden layer. In other words, features generated
by higher hidden layers are more invariant to variations than those represented by lower layers.
Note that the maximum norm over the same development set is larger than one, as seen in Figure
2. This is necessary since the differences need to be enlarged around the class boundaries to have
discrimination ability.
4 Learning by seeing
In Section 3, we showed empirically that small perturbations in the input will be gradually shrunk
as we move to the internal representation in the higher layers. In this section, we point out that the
4
Figure 2: Average and maximum ∥diag(vℓ+1 ◦(1 −vℓ+1))(wℓ)T ∥2 across layers on a 6×2k DNN
Figure 3: Illustration of mixed-bandwidth speech recognition using a DNN
above result is only applicable to small perturbations around the training samples. When the test
samples deviate significantly from the training samples, DNNs cannot accurately classify them. In
other words, DNNs must see examples of representative variations in the data during training in
order to generalize to similar variations in the test data.
We demonstrate this point using a mixed-bandwidth ASR study. Typical speech recognizers are
trained on either narrowband speech signals, recorded at 8 kHz, or wideband speech signals,
recorded at 16 kHz. It would be advantageous if a single system could recognize both narrow-
band and wideband speech, i.e. mixed-bandwidth ASR. One such system was recently proposed
using a CD-DNN-HMM [17]. In that work, the following DNN architecture was used for all experi-
ments. The input features were 29 mel-scale log filter-bank outputs together with dynamic features.
An 11-frame context window was used generating an input layer with 29 ·3 ·11 = 957nodes. The
DNN has 7 hidden layers, each with 2048 nodes. The output layer has 1803 nodes, corresponding
to the number of senones determined by the GMM system.
The 29-dimensional filter bank has two parts: the first 22 filters span 0–4 kHz and the last 7 filters
span 4–8 kHz, with the center frequency of the first filter in the higher filter bank at 4 kHz. When the
speech is wideband, all 29 filters have observed values. However, when the speech is narrowband,
the high-frequency information was not captured so the final 7 filters are set to 0. Figure 3 illustrates
the architecture of the mixed-bandwidth ASR system.
Experiments were conducted on a mobile voice search (VS) corpus. This task consists of internet
search queries made by voice on a smartphone.There are two training sets, VS-1 and VS-2, con-
sisting of 72 and 197 hours of wideband audio data, respectively. These sets were collected during
5
Table 2: WER (%) on wideband (16k) and narrowband (8k) test sets with and without narrowband
training data.
training data 16 kHz VS-T 8 kHz VS-T
16 kHz VS-1 + 16 kHz VS-2 27.5 53.5
16 kHz VS-1 + 8 kHz VS-2 28.3 29.3
different times of year. The test set, called VS-T, has 26757 words in 9562 utterances. The narrow
band training and test data were obtained by downsampling the wideband data.
Table 2 summarizes the WER on the wideband and narrowband test sets when the DNN is trained
with and without narrowband speech. From this table, it is clear that if all training data are wideband,
the DNN performs well on the wideband test set (27.5% WER) but very poorly on the narrowband
test set (53.5% WER). However, if we convert VS-2 to narrowband speech and train the same DNN
using mixed-bandwidth data (second row), the DNN performs very well on both wideband and
narrowband speech.
To understand the difference between these two scenarios, we take the output vectors at each layer
for the wideband and narrowband input feature pairs, hℓ(xwb) and hℓ(xnb), and measure their Eu-
clidean distance. For the top layer, whose output is the senone posterior probability, we calculate
the KL-divergence in nats between py|x(sj|xwb) and py|x(sj|xnb). Table 3 shows the statistics of dl
and dy over 40,000 frames randomly sampled from the test set for the DNN trained using wideband
speech only and the DNN trained using mixed-bandwidth speech.
Table 3: Euclidean distance for the output vectors at each hidden layer (L1-L7) and the KL di-
vergence (nats) for the posteriors at the top layer between the narrowband (8 kHz) and wideband
(16 kHz) input features, measured using the wideband DNN or the mixed-bandwidth DNN.
wideband DNN mixed-band DNN
layer dist mean variance mean variance
L1
Eucl
13.28 3.90 7.32 3.62
L2 10.38 2.47 5.39 1.28
L3 8.04 1.77 4.49 1.27
L4 8.53 2.33 4.74 1.85
L5 9.01 2.96 5.39 2.30
L6 8.46 2.60 4.75 1.57
L7 5.27 1.85 3.12 0.93
Top KL 2.03 – 0.22 –
From Table 3 we can observe that in both DNNs, the distance between hidden layer vectors generated
from the wideband and narrowband input feature pair is significantly reduced at the layers close
to the output layer compared to that in the first hidden layer. Perhaps what is more interesting
is that the average distances and variances in the data-mixed DNN are consistently smaller than
those in the DNN trained on wideband speech only. This indicates that by using mixed-bandwidth
training data, the DNN learns to consider the differences in the wideband and narrowband input
features as irrelevant variations. These variations are suppressed after many layers of nonlinear
transformation. The final representation is thus more invariant to this variation and yet still has the
ability to distinguish between different class labels. This behavior is even more obvious at the output
layer since the KL-divergence between the paired outputs is only 0.22 in the mixed-bandwidth DNN,
much smaller than the 2.03 observed in the wideband DNN.
5 Robustness to speaker variation
A major source of variability is variation across speakers. Techniques for adapting a GMM-HMM to
a speaker have been investigated for decades. Two important techniques are VTLN [3], and feature-
space MLLR (fMLLR) [4]. Both VTLN and fMLLR operate on the features directly, making their
application in the DNN context straightforward.
6
Table 4: Comparison of feature-transform based speaker-adaptation techniques for GMM-HMMs,
a shallow, and a deep NN. Word-error rates in % for Hub5’00-SWB (relative change in parentheses).
GMM-HMM CD-MLP-HMM CD-DNN-HMM
adaptation technique 40 mix 1×2k 7×2k
speaker independent 23.6 24.2 17.1
+ VTLN 21.5 (-9%) 22.5 (-7%) 16.8 (-2%)
+ {fMLLR/fDLR}×4 20.4 (-5%) 21.5 (-4%) 16.4 (-2%)
VTLN warps the frequency axis of the filterbank analysis to account for the fact that the precise lo-
cations of vocal-tract resonances vary roughly monotonically with the physical size of the speaker.
This is done in both training and testing. On the other hand, fMLLR applies an affine transform
to the feature frames such that an adaptation data set better matches the model. In most cases, in-
cluding this work, ‘self-adaptation’ is used: generate labels using unsupervised transcription, then
re-recognize with the adapted model. This process is iterated four times. For GMM-HMMs, fM-
LLR transforms are estimated to maximize the likelihood of the adaptation data given the model.
For DNNs, we instead maximize cross entropy (with back propagation), which is a discriminative
criterion, so we prefer to call this transform feature-space Discriminative Linear Regression (fDLR).
Note that the transform is applied to individual frames, prior to concatenation.
Typically, applying VTLN and fMLLR jointly to a GMM-HMM system will reduce errors by 10–
15%. Initially, similar gains were expected for DNNs as well. However, these gains were not
realized, as shown in Table 4 [9]. The table compares VTLN and fMLLR/fDLR for GMM-HMMs,
a context-dependent ANN-HMM with a single hidden layer, and a deep network with 7 hidden
layers, on the same Switchboard task described in Section 3.1. For this task, test data are very
consistent with the training, and thus, only a small amount of adaptation to other factors such as
recording conditions or environmental factors occurs. We use the same configuration as in Table 1
which is speaker independent using single-pass decoding.
For the GMM-HMM, VTLN achieves a strong relative gain of 9%. VTLN is also effective with the
shallow neural-network system, gaining a slightly smaller 7%. However, the improvement of VTLN
on the deep network with 7 hidden layers is a much smaller 2% gain. Combining VTLN with
fDLR further reduces WER by 5% and 4% relative, for the GMM-HMM and the shallow network,
respectively. The reduction for the DNN is only 2%. We also tried transplanting VTLN and fMLLR
transforms estimated on the GMM system into the DNN, and achieved very similar results [9].
The VTLN and fDLR implementations of the shallow and deep networks are identical. Thus, we
conclude that to a significant degree, the deep neural network is able to learn internal representations
that are invariant with respect to the sources of variability that VTLN and fDLR address.
6 Robustness to environmental distortions
In many speech recognition tasks, there are often cases where the despite the presence of variability
in the training data, significant mismatch between training and test data persists. Environmental
factors are common sources of such mismatch, e.g. ambient noise, reverberation, microphone type
and capture device. The analysis in the previous sections suggests that DNNs have the ability to
generate internal representations that are robust with respect to variability seen in the training data.
In this section, we evaluate the extent to which this invariance can be obtained with respect to
distortions caused by the environment.
We performed a series of experiments on the Aurora 4 corpus [18], a 5000-word vocabulary task
based on the Wall Street Journal (WSJ0) corpus. The experiments were performed with the 16 kHz
multi-condition training set consisting of 7137 utterances from 83 speakers. One half of the ut-
terances was recorded by a high-quality close-talking microphone and the other half was recorded
using one of 18 different secondary microphones. Both halves include a combination of clean speech
and speech corrupted by one of six different types of noise (street traffic, train station, car, babble,
restaurant, airport) at a range of signal-to-noise ratios (SNR) between 10-20 dB.
7
The evaluation set consists of 330 utterances from 8 speakers. This test set was recorded by the pri-
mary microphone and a number of secondary microphones. These two sets are then each corrupted
by the same six noises used in the training set at SNRs between 5-15 dB, creating a total of 14 test
sets. These 14 test sets can then be grouped into 4 subsets, based on the type of distortion: none
(clean speech), additive noise only, channel distortion only, and noise + channel. Notice that the
types of noise are common across training and test sets but the SNRs of the data are not.
The DNN was trained using 24-dimensional log mel filterbank features with utterance-level mean
normalization. The first- and second-order derivative features were appended to the static feature
vectors. The input layer was formed from a context window of 11 frames creating an input layer of
792 input units. The DNN had 7 hidden layers with 2048 hidden units in each layer and the final
softmax output layer had 3206 units, corresponding to the senones of the baseline HMM system.
The network was initialized using layer-by-layer generative pre-training and then discriminatively
trained using back propagation.
In Table 5, the performance obtained by the DNN acoustic model is compared to several other
systems. The first system is a baseline GMM-HMM system, while the remaining systems are repre-
sentative of the state of the art in acoustic modeling and noise and speaker adaptation. All used the
same training set. To the authors’ knowledge, these are the best published results on this task.
The second system combines Minimum Phone Error (MPE) discriminative training [2] and noise
adaptive training (NAT) [19] using VTS adaptation to compensate for noise and channel mismatch
[20]. The third system uses a hybrid generative/discriminative classifier [21] as follows . First, an
adaptively trained HMM with VTS adaptation is used to generate features based on state likelihoods
and their derivatives. Then, these features are input to a discriminative log-linear model to obtain the
final hypothesis. The fourth system uses an HMM trained with NAT and combines VTS adaptation
for environment compensation and MLLR for speaker adaptation [22]. Finally, the last row of the
table shows the performance of the DNN system.
Table 5: A comparison of several systems in the literature to a DNN system on the Aurora 4 task.
Systems
distortion
A VGnone noise channel noise +
(clean) channel
GMM baseline 14.3 17.9 20.2 31.3 23.6
MPE-NAT + VTS [20] 7.2 12.8 11.5 19.7 15.3
NAT + Derivative Kernels [21] 7.4 12.6 10.7 19.0 14.8
NAT + Joint MLLR/VTS [22] 5.6 11.0 8.8 17.8 13.4
DNN (7×2048) 5.6 8.8 8.9 20.0 13.4
It is noteworthy that to obtain good performance, the GMM-based systems required complicated
adaptive training procedures [19, 23] and multiple iterations of recognition in order to perform ex-
plicit environment and/or speaker adaptation. One of these systems required two classifiers. In
contrast, the DNN system required only standard training and a single forward pass for classifi-
cation. Yet, it outperforms the two systems that perform environment adaptation and matches the
performance of a system that adapts to both the environment and speaker.
Finally, we recall the results in Section 4, in which the DNN trained only on wideband data could
not accurately classify narrowband speech. Similarly, a DNN trained only on clean speech has no
ability to learn internal features that are robust to environmental noise. When the DNN for Aurora
4 is trained using only clean speech examples, the performance on the noise- and channel-distorted
speech degrades substantially, resulting in an average WER of 30.6%. This further confirms our
earlier observation that DNNs are robust to modest variations between training and test data but
perform poorly if the mismatch is more severe.
7 Conclusion
In this paper we demonstrated through speech recognition experiments that DNNs can extract more
invariant and discriminative features at the higher layers. In other words, the features learned by
8
DNNs are less sensitive to small perturbations in the input features. This property enables DNNs to
generalize better than shallow networks and enables CD-DNN-HMMs to perform speech recogni-
tion in a manner that is more robust to mismatches in speaker, environment, or bandwidth. On the
other hand, DNNs cannot learn something from nothing. They require seeing representative samples
to perform well. By using a multi-style training strategy and letting DNNs to generalize to similar
patterns, we equaled the best result ever reported on the Aurora 4 noise robustness benchmark task
without the need for multiple recognition passes and model adaptation.
References
[1] L. Bahl, P. Brown, P.V . De Souza, and R. Mercer, “Maximum mutual information estimation of hidden
markov model parameters for speech recognition,” in Proc. ICASSP, Apr, vol. 11, pp. 49–52.
[2] D. Povey and P. C. Woodland, “Minimum phone error and i-smoothing for improved discriminative
training,” in Proc. ICASSP, 2002.
[3] P. Zhan et al., “V ocal tract length normalization for lvcsr,” Tech. Rep. CMU-LTI-97-150, Carnegie Mellon
Univ, 1997.
[4] M. J. F. Gales, “Maximum likelihood linear transformations for HMM-based speech recognition,” Com-
puter Speech and Language, vol. 12, pp. 75–98, 1998.
[5] A. Acero, L. Deng, T. Kristjansson, and J. Zhang, “HMM Adaptation Using Vector Taylor Series for
Noisy Speech Recognition,” in Proc. of ICSLP, 2000.
[6] D. Yu, L. Deng, and G. Dahl, “Roles of pretraining and fine-tuning in context-dependent DBN-HMMs
for real-world speech recognition,” inProc. NIPS Workshop on Deep Learning and Unsupervised Feature
Learning, 2010.
[7] G.E. Dahl, D. Yu, L. Deng, and A. Acero, “Context-dependent pretrained deep neural networks for large
vocabulary speech recognition,” IEEE Trans. Audio, Speech, and Lang. Proc., vol. 20, no. 1, pp. 33–42,
Jan. 2012.
[8] F. Seide, G. Li, and D. Yu, “Conversational speech transcription using context-dependent deep neural
networks,” in Proc. Interspeech, 2011.
[9] F. Seide, G.Li, X. Chen, and D. Yu, “Feature engineering in context-dependent deep neural networks for
conversational speech transcription,” in Proc. ASRU, 2011, pp. 24–29.
[10] D. Yu, F. Seide, G.Li, and L. Deng, “Exploiting sparseness in deep neural networks for large vocabulary
speech recognition,” in Proc. ICASSP, 2012, pp. 4409–4412.
[11] N. Jaitly, P. Nguyen, A. Senior, and V . Vanhoucke, “An application of pretrained deep neural networks to
large vocabulary conversational speech recognition,” Tech. Rep. Tech. Rep. 001, Department of Computer
Science, University of Toronto, 2012.
[12] T. N. Sainath, B. Kingsbury, B. Ramabhadran, P. Fousek, P. Novak, and A. r. Mohamed, “Making deep
belief networks effective for large vocabulary continuous speech recognition,” in Proc. ASRU, 2011, pp.
30–35.
[13] G. E. Dahl, D. Yu, L. Deng, and A. Acero, “Large vocabulary continuous speech recognition with context-
dependent dbn-hmms,” in Proc. ICASSP, 2011, pp. 4688–4691.
[14] L. Saul, T. Jaakkola, and M. I. Jordan, “Mean field theory for sigmoid belief networks,” Journal of
Artificial Intelligence Research, vol. 4, pp. 61–76, 1996.
[15] D. Yu, L. Deng, and A. Acero, “Using continuous features in the maximum entropy model,” Pattern
Recognition Letters, vol. 30, no. 14, pp. 1295–1300, 2009.
[16] J. Godfrey and E. Holliman, Switchboard-1 Release 2, Linguistic Data Consortium, Philadelphia, PA,
1997.
[17] J. Li, D. Yu, J.-T. Huang, and Y . Gong, “Improving wideband speech recognition using mixed-bandwidth
training data in CD-DNN-HMM,” in Proc. SLT, 2012.
[18] N. Parihar and J. Picone, “Aurora working group: DSR front end LVCSR evaluation AU/384/02,” Tech.
Rep., Inst. for Signal and Information Process, Mississippi State University.
[19] O. Kalinli, M. L. Seltzer, J. Droppo, and A. Acero, “Noise adaptive training for robust automatic speech
recognition,” IEEE Trans. on Audio, Sp. and Lang. Proc., vol. 18, no. 8, pp. 1889 –1901, Nov. 2010.
[20] F. Flego and M. J. F. Gales, “Discriminative adaptive training with VTS and JUD,” in Proc. ASRU, 2009.
[21] A. Ragni and M. J. F. Gales, “Derivative kernels for noise robust ASR,” in Proc. ASRU, 2011.
[22] Y .-Q. Wang and M. J. F. Gales, “Speaker and noise factorisation for robust speech recognition,” IEEE
Trans. on Audio Speech and Language Proc., vol. 20, no. 7, 2012.
[23] H. Liao and M. J. F. Gales, “Adaptive training with joint uncertainty decoding for robust recognition of
noisy data,” in Proc. of ICASSP, Honolulu, Hawaii, 2007.
9
|
Dong Yu, Mike Seltzer, Jinyu Li, Jui-Ting Huang, Frank Seide
|
Unknown
| 2,013
|
{"id": "kk_XkMO0-dP8W", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358404200000, "tmdate": 1358404200000, "ddate": null, "number": 43, "content": {"title": "Feature Learning in Deep Neural Networks - A Study on Speech Recognition\r\n Tasks", "decision": "conferenceOral-iclr2013-conference", "abstract": "Recent studies have shown that deep neural networks (DNNs) perform significantly better than shallow networks and Gaussian mixture models (GMMs) on large vocabulary speech recognition tasks. In this paper we argue that the difficulty in speech recognition is primarily caused by the high variability in speech signals. DNNs, which can be considered a joint model of a nonlinear feature transform and a log-linear classifier, achieve improved recognition accuracy by extracting discriminative internal representations that are less sensitive to small perturbations in the input features. However, if test samples are very dissimilar to training samples, DNNs perform poorly. We demonstrate these properties empirically using a series of recognition experiments on mixed narrowband and wideband speech and speech distorted by environmental noise.", "pdf": "https://arxiv.org/abs/1301.3605", "paperhash": "yu|feature_learning_in_deep_neural_networks_a_study_on_speech_recognition_tasks", "keywords": [], "conflicts": [], "authors": ["Dong Yu", "Mike Seltzer", "Jinyu Li", "Jui-Ting Huang", "Frank Seide"], "authorids": ["dongyu888@gmail.com", "mike.seltzer@gmail.com", "jinyli@microsoft.com", "jthuang@microsoft.com", "fseide@microsoft.com"]}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["dongyu888@gmail.com"], "writers": []}
|
[Review]:
This paper is by the group that did the first large-scale speech recognition experiments on deep neural nets, and popularized the technique. It contains various analysis and experiments relating to this setup.
Ultimately I was not really sure what was the main point of the paper. There is some analysis of whether the network amplifies or reduces differences in inputs as we go through the layers; there are some experiments relating to features normalization techniques (such as VTLN) and how they interact with neural nets, and there were some experiments showing that the neural network does not do very well on narrowband data unless it has been trained on narrowband data in addition to wideband data; and also showing (by looking at the intermediate activations) that the network learns to be invariant to wideband/narrowband differences, if it is trained on both kinds of input.
Although the paper itself is kind of scattered, and I'm not really sure that it makes any major contributions, I would suggest the conference organizers to strongly consider accepting it, because unlike (I imagine) many of the other papers, it comes from a group who are applying these techniques to real world problems and is having considerable success. I think their perspective would be valuable, and accepting it would send the message that this conference values serious, real-world applications, which I think would be a good thing.
--
Below are some suggestions for minor fixes to the paper.
eq. 4, prime ( ') missing after sigma on top right.
sec. 3.2, you do not explain the difference between average norm and maximum norm.
What type of matrix norm do you mean, and what are the average and maximum taken over?
after 'narrowband input feature pairs', one of your subscripts needs to be changed.
|
anonymous reviewer 1860
| null | null |
{"id": "NFxrNAiI-clI8", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361169180000, "tmdate": 1361169180000, "ddate": null, "number": 2, "content": {"title": "review of Feature Learning in Deep Neural Networks - A Study on Speech Recognition\r\n Tasks", "review": "This paper is by the group that did the first large-scale speech recognition experiments on deep neural nets, and popularized the technique. It contains various analysis and experiments relating to this setup.\r\n Ultimately I was not really sure what was the main point of the paper. There is some analysis of whether the network amplifies or reduces differences in inputs as we go through the layers; there are some experiments relating to features normalization techniques (such as VTLN) and how they interact with neural nets, and there were some experiments showing that the neural network does not do very well on narrowband data unless it has been trained on narrowband data in addition to wideband data; and also showing (by looking at the intermediate activations) that the network learns to be invariant to wideband/narrowband differences, if it is trained on both kinds of input.\r\n Although the paper itself is kind of scattered, and I'm not really sure that it makes any major contributions, I would suggest the conference organizers to strongly consider accepting it, because unlike (I imagine) many of the other papers, it comes from a group who are applying these techniques to real world problems and is having considerable success. I think their perspective would be valuable, and accepting it would send the message that this conference values serious, real-world applications, which I think would be a good thing.\r\n\r\n--\r\nBelow are some suggestions for minor fixes to the paper.\r\n\r\neq. 4, prime ( ') missing after sigma on top right.\r\n\r\nsec. 3.2, you do not explain the difference between average norm and maximum norm.\r\nWhat type of matrix norm do you mean, and what are the average and maximum taken over?\r\n\r\nafter 'narrowband input feature pairs', one of your subscripts needs to be changed."}, "forum": "kk_XkMO0-dP8W", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "kk_XkMO0-dP8W", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 1860"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 3,
"materials_and_methods": 5,
"praise": 2,
"presentation_and_reporting": 3,
"results_and_discussion": 1,
"suggestion_and_solution": 4,
"total": 13
}
| 1.538462
| 1.538462
| 0
| 1.563406
| 0.300883
| 0.024944
| 0.153846
| 0
| 0.230769
| 0.384615
| 0.153846
| 0.230769
| 0.076923
| 0.307692
|
{
"criticism": 0.15384615384615385,
"example": 0,
"importance_and_relevance": 0.23076923076923078,
"materials_and_methods": 0.38461538461538464,
"praise": 0.15384615384615385,
"presentation_and_reporting": 0.23076923076923078,
"results_and_discussion": 0.07692307692307693,
"suggestion_and_solution": 0.3076923076923077
}
| 1.538462
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
Thank you for your comments. We will soon push a revision to fix all the grammar and language mistakes you pointed out.
Regarding equation (1) and equation (7), mathbf{G} represents the Fisher Information Matrix form of the metric resulting when you consider respectively p(x) vs p(y|x). Equation (1) is introduced in section 1, which presents the generic case of a family of distributions p_{ heta}(x). From section 3 onwards we adapt these equations specifically to neural networks, where, from a probabilistic point of view, we are dealing with conditional probabilities p(y|x).
Could you please be more specific regarding the elements of the paper that you found confusing?
We would like to reformulate the conclusion to make our contributions clearer. The novel points we are trying to make are:
(1) Hessian Free optimization and Krylov Subspace Descent, as long as they use the Gauss-Newton approximation of the Hessian, can be understood as Natural Gradient, because the Gauss-Newton matrix matches the metric of Natural Gradient (and the rest of the pipeline is the same).
(2) Possibly due to the regularization effect discussed in (6), we hypothesize and support with empirical results that Natural Gradient helps dealing with the early overfitting problem introduced by Erhan et al. This early overfitting problem might be a serious issue when trying to scale neural networks to large models with very large datasets.
(3) We make the observation that since the targets get integrated out when computing the metric of Natural Gradient, one can use unlabeled data to improve the accuracy of this metric that dictates the speed with which we move in parameter space.
(4) Natural Gradient introduced by Nicolas Le Roux et al has a fundamental difference with Amari's. It is not just a different justification, but a different algorithm that might behave differently in practice.
(5) Natural Gradient is different from a second order method because while one uses second order information, it is not the second order information of the error function, but of the KL divergence (which is quite different). For e.g. it is always positive definite by construction, while the curvature is not. Also, when considering the curvature of the KL, is not the curvature of the same surface throughout learning. At each step we have a different KL divergence and hence a different surface, while for second order methods the error surface stays constant through out learning. The second distinction is that Natural Gradient is naturally suited for online learning, provided that we have sufficient statistics to estimate the KL divergence (the metric). Theoretically, second order methods are meant to be batch methods (because the Hessian is supposed over the whole dataset) where the Natural Gradient metric only depends on the model.
(6) The standard understanding of Natural Gradient is that by imposing the KL divergence between p_{theta}(y|x) and p_{theta+delta}(y|x) to be constant it ensures that some amount of progress is done at every step and hence it converges faster. We add that it also ensures that you do not move too far in some direction (which would make the KL change quickly), hence acting as a regularizer.
Regarding the paper not being formal enough we often find that a dry mathematical treatment of the problem does not help improving the understanding or eliminating confusions. We believe that we were formal enough when showing the equivalence between the generalized Gauss-Newton and Amari's metric. Point (6) of our conclusion is a hypothesis which we validate empirically and we do not have a formal treatment for it.
|
Razvan Pascanu, Yoshua Bengio
| null | null |
{"id": "wiYbiqRc-GqXO", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362084780000, "tmdate": 1362084780000, "ddate": null, "number": 9, "content": {"title": "", "review": "Thank you for your comments. We will soon push a revision to fix all the grammar and language mistakes you pointed out.\r\n\r\nRegarding equation (1) and equation (7), mathbf{G} represents the Fisher Information Matrix form of the metric resulting when you consider respectively p(x) vs p(y|x). Equation (1) is introduced in section 1, which presents the generic case of a family of distributions p_{\theta}(x). From section 3 onwards we adapt these equations specifically to neural networks, where, from a probabilistic point of view, we are dealing with conditional probabilities p(y|x).\r\n\r\nCould you please be more specific regarding the elements of the paper that you found confusing?\r\nWe would like to reformulate the conclusion to make our contributions clearer. The novel points we are trying to make are:\r\n\r\n(1) Hessian Free optimization and Krylov Subspace Descent, as long as they use the Gauss-Newton approximation of the Hessian, can be understood as Natural Gradient, because the Gauss-Newton matrix matches the metric of Natural Gradient (and the rest of the pipeline is the same).\r\n(2) Possibly due to the regularization effect discussed in (6), we hypothesize and support with empirical results that Natural Gradient helps dealing with the early overfitting problem introduced by Erhan et al. This early overfitting problem might be a serious issue when trying to scale neural networks to large models with very large datasets.\r\n(3) We make the observation that since the targets get integrated out when computing the metric of Natural Gradient, one can use unlabeled data to improve the accuracy of this metric that dictates the speed with which we move in parameter space.\r\n(4) Natural Gradient introduced by Nicolas Le Roux et al has a fundamental difference with Amari's. It is not just a different justification, but a different algorithm that might behave differently in practice.\r\n(5) Natural Gradient is different from a second order method because while one uses second order information, it is not the second order information of the error function, but of the KL divergence (which is quite different). For e.g. it is always positive definite by construction, while the curvature is not. Also, when considering the curvature of the KL, is not the curvature of the same surface throughout learning. At each step we have a different KL divergence and hence a different surface, while for second order methods the error surface stays constant through out learning. The second distinction is that Natural Gradient is naturally suited for online learning, provided that we have sufficient statistics to estimate the KL divergence (the metric). Theoretically, second order methods are meant to be batch methods (because the Hessian is supposed over the whole dataset) where the Natural Gradient metric only depends on the model.\r\n(6) The standard understanding of Natural Gradient is that by imposing the KL divergence between p_{theta}(y|x) and p_{theta+delta}(y|x) to be constant it ensures that some amount of progress is done at every step and hence it converges faster. We add that it also ensures that you do not move too far in some direction (which would make the KL change quickly), hence acting as a regularizer.\r\n\r\nRegarding the paper not being formal enough we often find that a dry mathematical treatment of the problem does not help improving the understanding or eliminating confusions. We believe that we were formal enough when showing the equivalence between the generalized Gauss-Newton and Amari's metric. Point (6) of our conclusion is a hypothesis which we validate empirically and we do not have a formal treatment for it."}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["Razvan Pascanu, Yoshua Bengio"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 2,
"materials_and_methods": 12,
"praise": 0,
"presentation_and_reporting": 5,
"results_and_discussion": 11,
"suggestion_and_solution": 3,
"total": 25
}
| 1.4
| -0.87267
| 2.27267
| 1.432551
| 0.322213
| 0.032551
| 0.08
| 0
| 0.08
| 0.48
| 0
| 0.2
| 0.44
| 0.12
|
{
"criticism": 0.08,
"example": 0,
"importance_and_relevance": 0.08,
"materials_and_methods": 0.48,
"praise": 0,
"presentation_and_reporting": 0.2,
"results_and_discussion": 0.44,
"suggestion_and_solution": 0.12
}
| 1.4
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
Summary
The paper reviews the concept of natural gradient, re-derives it in the context of neural network training, compares a number of natural gradient-based algorithms and discusses their differences. The paper's aims are highly relevant to the state of the field, and it contains numerous valuable insights. Precisely because of its topic's importance, however, I deplore its lack of maturity, especially in terms of experimental results and literature overview.
Comments
-- The title raises the expectation of a review-style paper with a broad literature overview on the topic, but that aspect is underdeveloped. A paper such as this would be a perfect opportunity to relate natural gradient-related work in neural networks to closely related approaches in reinforcement learning [1,2] and stochastic search [3].
-- The discussion in section 2 is correct and useful, but would benefit enormously from an illustrative figure that clarifies the relation between parameter space and distribution manifold, and how gradient directions differ in both. The last sentence (Lagrange method) is also breezing over a number of details that would benefit from a more explicit treatment.
-- There is a recurring claim that gradient-covariances are 'usually confused' with Fisher matrices. While there are indeed a few authors who did fall victim to this, it is not a belief held by many researchers working on natural gradients, please reformulate.
-- The information-geometric manifold is generally highly curved, which means that results that hold for infinitesimal step-sizes do not generally apply to realistic gradient algorithms with large finite steps. Indeed, [4] introduces an information-geometric 'flow' and contrasts it with its finite-step approximations. It is important to distinguish the effect of the natural gradient itself from the artifacts of finite-step approximations, indeed the asymptotic behavior can differ, see [5]. A number of arguments in section 6 could be revised in this light.
-- The idea of using more data to estimate the Fisher information matrix (because if does not need to be labeled), compared to the data necessary for the steepest gradient itself, is promising for semi-supervised neural network training. It was previously was presented in [3], in a slightly different context with infinitely many unlabeled samples.
-- The new variants of natural gradient descent should be given in pseudocode in the appendix, and if possible even with a reference open-source implementation in the Theano framework.
-- The experiment presented in Figure 2 is very interesting, although I disagree with the conclusions that are derived from it: the variance is qualitatively the same for both algorithms, just rescaled by roughly a factor 4. So, relatively speaking, the influence of early samples is still equally strong, only the generic variability of the natural gradient is reduced: plausibly by the effect that the Fisher-preconditioning reduces step-sizes in directions of high variance.
-- The other experiments, which focus on test-set performance, have a major flaw: it appears each algorithm variant was run exactly once on each dataset, which makes it very difficult to judge whether the results are significant. Also, the effect of hyper-parameter-tuning on those results is left vague.
Minor points/typos
-- Generally, structure the text such that equations are presented before they are referred to, this makes for a more linear reading flow.
-- variable n is undefined
-- clarify which spaces the variables x, z, t, theta live in.
-- 'three most typical'
-- 'different parametrizations of the model'
-- 'similar derivations'
-- 'plateaus'
-- axes of figures could be homogenized.
References
[1] 'Natural policy gradient', Kakade, NIPS 2002.
[2] 'Natural Actor-Critic', Peters and Schaal, Neurocomputing 2008.
[3] 'Stochastic Search using the Natural Gradient', Sun et al, ICML 2009.
[4] 'Information-Geometric Optimization Algorithms: A Unifying Picture via Invariance Principles', Arnold et al, Arxiv 2011.
[5] 'Natural Evolution Strategies Converge on Sphere Functions', Schaul, GECCO 2012.
|
anonymous reviewer 6f71
| null | null |
{"id": "uEQsuu1xiBueM", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362372600000, "tmdate": 1362372600000, "ddate": null, "number": 3, "content": {"title": "review of Natural Gradient Revisited", "review": "Summary\r\n\r\nThe paper reviews the concept of natural gradient, re-derives it in the context of neural network training, compares a number of natural gradient-based algorithms and discusses their differences. The paper's aims are highly relevant to the state of the field, and it contains numerous valuable insights. Precisely because of its topic's importance, however, I deplore its lack of maturity, especially in terms of experimental results and literature overview. \r\n\r\n\r\nComments\r\n\r\n-- The title raises the expectation of a review-style paper with a broad literature overview on the topic, but that aspect is underdeveloped. A paper such as this would be a perfect opportunity to relate natural gradient-related work in neural networks to closely related approaches in reinforcement learning [1,2] and stochastic search [3].\r\n\r\n-- The discussion in section 2 is correct and useful, but would benefit enormously from an illustrative figure that clarifies the relation between parameter space and distribution manifold, and how gradient directions differ in both. The last sentence (Lagrange method) is also breezing over a number of details that would benefit from a more explicit treatment.\r\n\r\n-- There is a recurring claim that gradient-covariances are 'usually confused' with Fisher matrices. While there are indeed a few authors who did fall victim to this, it is not a belief held by many researchers working on natural gradients, please reformulate.\r\n\r\n-- The information-geometric manifold is generally highly curved, which means that results that hold for infinitesimal step-sizes do not generally apply to realistic gradient algorithms with large finite steps. Indeed, [4] introduces an information-geometric 'flow' and contrasts it with its finite-step approximations. It is important to distinguish the effect of the natural gradient itself from the artifacts of finite-step approximations, indeed the asymptotic behavior can differ, see [5]. A number of arguments in section 6 could be revised in this light.\r\n\r\n-- The idea of using more data to estimate the Fisher information matrix (because if does not need to be labeled), compared to the data necessary for the steepest gradient itself, is promising for semi-supervised neural network training. It was previously was presented in [3], in a slightly different context with infinitely many unlabeled samples.\r\n\r\n-- The new variants of natural gradient descent should be given in pseudocode in the appendix, and if possible even with a reference open-source implementation in the Theano framework.\r\n\r\n-- The experiment presented in Figure 2 is very interesting, although I disagree with the conclusions that are derived from it: the variance is qualitatively the same for both algorithms, just rescaled by roughly a factor 4. So, relatively speaking, the influence of early samples is still equally strong, only the generic variability of the natural gradient is reduced: plausibly by the effect that the Fisher-preconditioning reduces step-sizes in directions of high variance.\r\n\r\n-- The other experiments, which focus on test-set performance, have a major flaw: it appears each algorithm variant was run exactly once on each dataset, which makes it very difficult to judge whether the results are significant. Also, the effect of hyper-parameter-tuning on those results is left vague.\r\n\r\n\r\n\r\nMinor points/typos\r\n-- Generally, structure the text such that equations are presented before they are referred to, this makes for a more linear reading flow.\r\n-- variable n is undefined\r\n-- clarify which spaces the variables x, z, t, theta live in.\r\n-- 'three most typical'\r\n-- 'different parametrizations of the model'\r\n-- 'similar derivations'\r\n-- 'plateaus' \r\n-- axes of figures could be homogenized.\r\n\r\nReferences\r\n[1] 'Natural policy gradient', Kakade, NIPS 2002.\r\n[2] 'Natural Actor-Critic', Peters and Schaal, Neurocomputing 2008.\r\n[3] 'Stochastic Search using the Natural Gradient', Sun et al, ICML 2009.\r\n[4] 'Information-Geometric Optimization Algorithms: A Unifying Picture via Invariance Principles', Arnold et al, Arxiv 2011.\r\n[5] 'Natural Evolution Strategies Converge on Sphere Functions', Schaul, GECCO 2012."}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 6f71"], "writers": ["anonymous"]}
|
{
"criticism": 9,
"example": 2,
"importance_and_relevance": 7,
"materials_and_methods": 14,
"praise": 5,
"presentation_and_reporting": 7,
"results_and_discussion": 9,
"suggestion_and_solution": 9,
"total": 28
}
| 2.214286
| -1.336761
| 3.551047
| 2.245884
| 0.369311
| 0.031598
| 0.321429
| 0.071429
| 0.25
| 0.5
| 0.178571
| 0.25
| 0.321429
| 0.321429
|
{
"criticism": 0.32142857142857145,
"example": 0.07142857142857142,
"importance_and_relevance": 0.25,
"materials_and_methods": 0.5,
"praise": 0.17857142857142858,
"presentation_and_reporting": 0.25,
"results_and_discussion": 0.32142857142857145,
"suggestion_and_solution": 0.32142857142857145
}
| 2.214286
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
GENERAL COMMENTS
The paper promises to establish the relation between Amari's natural gradient and many methods that are called Natural Gradient or can be related to Natural Gradient because they use Gauss-Newton approximations of the Hessian. The problem is that I find the paper misleading. In particular the G of equation (1) is not the same as the G of equation (7). The author certainly points out that the crux of the matter is to understand which distribution is used to approximate the Fisher information matrix, but the final argument is a mess. This should be done a lot more rigorously (and a lot less informally.) As the paper stands, it only increases the level of confusion.
SPECIFIC COMMENTS
* (ichi Amari, 1997) - > (Amari, 1997)
* differ -> defer
* Due to this surjection: A surjection is something else!
* Equation (1): please make clear that the expectation is an expectation on z distributed according p_theta (not the ground truth nor the empirical distribution). Equation (7) then appears to be a mix of both.
* becomes the conditional p_ heta(t|x) where q(x) represents: where is q in p_ heta(t|x)
|
anonymous reviewer 6a77
| null | null |
{"id": "ttBP0QO8pKtvq", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1361998920000, "tmdate": 1361998920000, "ddate": null, "number": 7, "content": {"title": "review of Natural Gradient Revisited", "review": "GENERAL COMMENTS\r\nThe paper promises to establish the relation between Amari's natural gradient and many methods that are called Natural Gradient or can be related to Natural Gradient because they use Gauss-Newton approximations of the Hessian. The problem is that I find the paper misleading. In particular the G of equation (1) is not the same as the G of equation (7). The author certainly points out that the crux of the matter is to understand which distribution is used to approximate the Fisher information matrix, but the final argument is a mess. This should be done a lot more rigorously (and a lot less informally.) As the paper stands, it only increases the level of confusion.\r\n\r\nSPECIFIC COMMENTS\r\n* (ichi Amari, 1997) - > (Amari, 1997)\r\n* differ -> defer\r\n* Due to this surjection: A surjection is something else!\r\n* Equation (1): please make clear that the expectation is an expectation on z distributed according p_theta (not the ground truth nor the empirical distribution). Equation (7) then appears to be a mix of both.\r\n* becomes the conditional p_\theta(t|x) where q(x) represents: where is q in p_\theta(t|x)"}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 6a77"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 2,
"praise": 0,
"presentation_and_reporting": 3,
"results_and_discussion": 1,
"suggestion_and_solution": 3,
"total": 10
}
| 1.1
| 0.957958
| 0.142042
| 1.111044
| 0.151747
| 0.011044
| 0.2
| 0
| 0
| 0.2
| 0
| 0.3
| 0.1
| 0.3
|
{
"criticism": 0.2,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.2,
"praise": 0,
"presentation_and_reporting": 0.3,
"results_and_discussion": 0.1,
"suggestion_and_solution": 0.3
}
| 1.1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
I read the updated version of the paper. I has indeed been improved substantially, and my concerns were addressed. It should clearly be accepted in its current form.
|
anonymous reviewer 6f71
| null | null |
{"id": "iPpSPn9bTwn4Y", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363291260000, "tmdate": 1363291260000, "ddate": null, "number": 5, "content": {"title": "", "review": "I read the updated version of the paper. I has indeed been improved substantially, and my concerns were addressed. It should clearly be accepted in its current form."}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 6f71"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 1,
"total": 3
}
| 0.666667
| -0.911576
| 1.578243
| 0.66835
| 0.071263
| 0.001684
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0.333333
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0.3333333333333333,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0.3333333333333333
}
| 0.666667
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
We would like to thank all the reviewers for their feedback and insights. We had submitted a new version of the paper (it should appear on arxiv on Thu, 14 Mar 2013 00:00:00 GMT, though it can be retrieved now from
http://www-etud.iro.umontreal.ca/~pascanur/papers/ICLR_natural_gradient.pdf
We kindly ask the reviewers to look at. The new paper
contains drastic changes that we believe will improve the
quality of the paper. In a few bullet points the changes are:
* The title of the paper was changed to reflect our focus on natural
gradient for deep neural networks
* The wording and structure of the paper was slightly changed to better
reflect the final conclusions
* We improved notation, providing more details where they were missing
* Additional plots were added as empirical proof to some of our hypotheses
* We've added both the pseudo-code as well as link to a Theano-based
implementation of the algorithm
|
Razvan Pascanu
| null | null |
{"id": "aaN5bD_cRqbLk", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363216740000, "tmdate": 1363216740000, "ddate": null, "number": 2, "content": {"title": "", "review": "We would like to thank all the reviewers for their feedback and insights. We had submitted a new version of the paper (it should appear on arxiv on Thu, 14 Mar 2013 00:00:00 GMT, though it can be retrieved now from \r\n\r\nhttp://www-etud.iro.umontreal.ca/~pascanur/papers/ICLR_natural_gradient.pdf\r\n\r\n We kindly ask the reviewers to look at. The new paper \r\ncontains drastic changes that we believe will improve the \r\nquality of the paper. In a few bullet points the changes are: \r\n\r\n* The title of the paper was changed to reflect our focus on natural\r\ngradient for deep neural networks\r\n* The wording and structure of the paper was slightly changed to better\r\nreflect the final conclusions\r\n* We improved notation, providing more details where they were missing\r\n* Additional plots were added as empirical proof to some of our hypotheses\r\n* We've added both the pseudo-code as well as link to a Theano-based\r\nimplementation of the algorithm"}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["Razvan Pascanu"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 1,
"praise": 1,
"presentation_and_reporting": 1,
"results_and_discussion": 1,
"suggestion_and_solution": 3,
"total": 4
}
| 1.75
| 0.471623
| 1.278377
| 1.757797
| 0.197601
| 0.007797
| 0
| 0
| 0
| 0.25
| 0.25
| 0.25
| 0.25
| 0.75
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0.25,
"praise": 0.25,
"presentation_and_reporting": 0.25,
"results_and_discussion": 0.25,
"suggestion_and_solution": 0.75
}
| 1.75
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
Clearly, the revised paper is much better than the initial paper to the extent that it should be considered a different paper that shares its title with the initial paper. The ICLR committee will have to make a policy decision about this.
The revised paper is poorly summarized by it abstract because it does not show things in the same order as the abstract. The paper contains the following:
* A derivation of natural gradient that does not depend on information geometry. This derivation is in fact well known (and therefore not new.)
* A clear discussion of which distribution should be used to compute the natural gradient Riemannian tensor (equation 8). This is not new, but this is explained nicely and clearly.
* An illustration of what happens when one mixes these distributions. This is not surprising, but nicely illustrates the point that many so-called 'natural gradient' algorithms are not the same as Amari's natural gradient.
* A more specific discussion of the difference between LeRoux 'natural gradient' and the real natural gradient with useful intuitions. This is a good clarification.
* A more specific discussion of how many second order algorithms using the Gauss-Newton approximation are related to some so-called natural gradient algorithms which are not the true natural gradient. Things get confusing because the authors seem committed to calling all these algorithms 'natural gradient' despite their own evidence.
In conclusion, although novelty is limited, the paper disambiguates some of the confusion surrounding natural gradient. I simply wish the authors took their own hint and simply proposed banning the words 'natural gradient' to describe things that are not Amari's natural gradient but are simply inspired by it.
|
anonymous reviewer 6a77
| null | null |
{"id": "_MfuTMZ4u7mWN", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1364251020000, "tmdate": 1364251020000, "ddate": null, "number": 4, "content": {"title": "", "review": "Clearly, the revised paper is much better than the initial paper to the extent that it should be considered a different paper that shares its title with the initial paper. The ICLR committee will have to make a policy decision about this.\r\n\r\nThe revised paper is poorly summarized by it abstract because it does not show things in the same order as the abstract. The paper contains the following:\r\n\r\n* A derivation of natural gradient that does not depend on information geometry. This derivation is in fact well known (and therefore not new.)\r\n\r\n* A clear discussion of which distribution should be used to compute the natural gradient Riemannian tensor (equation 8). This is not new, but this is explained nicely and clearly.\r\n\r\n* An illustration of what happens when one mixes these distributions. This is not surprising, but nicely illustrates the point that many so-called 'natural gradient' algorithms are not the same as Amari's natural gradient. \r\n\r\n* A more specific discussion of the difference between LeRoux 'natural gradient' and the real natural gradient with useful intuitions. This is a good clarification.\r\n\r\n* A more specific discussion of how many second order algorithms using the Gauss-Newton approximation are related to some so-called natural gradient algorithms which are not the true natural gradient. Things get confusing because the authors seem committed to calling all these algorithms 'natural gradient' despite their own evidence.\r\n\r\nIn conclusion, although novelty is limited, the paper disambiguates some of the confusion surrounding natural gradient. I simply wish the authors took their own hint and simply proposed banning the words 'natural gradient' to describe things that are not Amari's natural gradient but are simply inspired by it."}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 6a77"], "writers": ["anonymous"]}
|
{
"criticism": 6,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 5,
"praise": 2,
"presentation_and_reporting": 7,
"results_and_discussion": 7,
"suggestion_and_solution": 5,
"total": 15
}
| 2.2
| 2.13687
| 0.06313
| 2.213608
| 0.196648
| 0.013608
| 0.4
| 0
| 0.066667
| 0.333333
| 0.133333
| 0.466667
| 0.466667
| 0.333333
|
{
"criticism": 0.4,
"example": 0,
"importance_and_relevance": 0.06666666666666667,
"materials_and_methods": 0.3333333333333333,
"praise": 0.13333333333333333,
"presentation_and_reporting": 0.4666666666666667,
"results_and_discussion": 0.4666666666666667,
"suggestion_and_solution": 0.3333333333333333
}
| 2.2
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
The revised arxiv paper is available now, and we replied to the reviewers comments.
|
Razvan Pascanu, Yoshua Bengio
| null | null |
{"id": "XXo-vXWa-ZvQL", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363288920000, "tmdate": 1363288920000, "ddate": null, "number": 1, "content": {"title": "", "review": "The revised arxiv paper is available now, and we replied to the reviewers comments."}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["Razvan Pascanu, Yoshua Bengio"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 1
}
| 0
| -2.27267
| 2.27267
| 0.000842
| 0.007299
| 0.000842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 0
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
This paper attempts to reconcile several definitions of the natural gradient, and to connect the Gauss-Newton approximation of the Hessian used in Hessian free optimization to the metric used in natural gradient descent. Understanding the geometry of objective functions, and the geometry of the space they live in, is crucial for model training, and is arguably the greatest bottleneck in training deep or otherwise complex models. However, this paper makes a confused presentation of the underlying ideas, and does not succeed in clearly tying them together.
More specific comments:
In the second (and third) paragraph of section 2, the natural gradient is discussed as if it stems from degeneracies in theta, where multiple theta values correspond to the same distribution p. This is inaccurate. Degeneracies in theta have nothing to do with the natural gradient. This may stem from a misinterpretation of the role of symmetries in natural gradient derivations? Symmetries are frequently used in the derivation of the natural gradient, in that the metric is frequently chosen such that it is invariant to symmetries in the parameter space. However, the metric being invariant to symmetries does not mean that p is similarly invariant, and there are natural gradient applications where symmetries aren't used at all. (You might find The Natural Gradient by Analogy to Signal Whitening, Sohl-Dickstein, http://arxiv.org/abs/1205.1828 a more straightforward introduction to the natural gradient.)
At the end of page 2, between equations 2 and 3, you introduce relations which certainly don't hold in general. At the least you should give the assumptions you're using. (also, notationally, it's not clear what you're taking the expectation over -- z? theta?)
Equation 15 doesn't make sense. As written, the matrices are the wrong shape. Should the inner second derivative be in terms of r instead of theta?
The text has minor English difficulties, and could benefit from a grammar and word choice editing pass. I stopped marking these pretty early on, but here are some specific suggested edits:
'two-folded' -> 'two-fold'
'framework of natural gradient' -> 'framework of the natural gradient'
'gradient protects about' -> 'gradient protects against'
'worrysome' -> 'worrisome'
'even though is called the same' -> 'despite the shared name'
'differ' -> 'defer'
'get map' -> 'get mapped'
|
anonymous reviewer 1939
| null | null |
{"id": "26sD6qgwF8Vob", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362404760000, "tmdate": 1362404760000, "ddate": null, "number": 8, "content": {"title": "review of Natural Gradient Revisited", "review": "This paper attempts to reconcile several definitions of the natural gradient, and to connect the Gauss-Newton approximation of the Hessian used in Hessian free optimization to the metric used in natural gradient descent. Understanding the geometry of objective functions, and the geometry of the space they live in, is crucial for model training, and is arguably the greatest bottleneck in training deep or otherwise complex models. However, this paper makes a confused presentation of the underlying ideas, and does not succeed in clearly tying them together.\r\n\r\nMore specific comments:\r\n\r\nIn the second (and third) paragraph of section 2, the natural gradient is discussed as if it stems from degeneracies in theta, where multiple theta values correspond to the same distribution p. This is inaccurate. Degeneracies in theta have nothing to do with the natural gradient. This may stem from a misinterpretation of the role of symmetries in natural gradient derivations? Symmetries are frequently used in the derivation of the natural gradient, in that the metric is frequently chosen such that it is invariant to symmetries in the parameter space. However, the metric being invariant to symmetries does not mean that p is similarly invariant, and there are natural gradient applications where symmetries aren't used at all. (You might find The Natural Gradient by Analogy to Signal Whitening, Sohl-Dickstein, http://arxiv.org/abs/1205.1828 a more straightforward introduction to the natural gradient.)\r\n\r\nAt the end of page 2, between equations 2 and 3, you introduce relations which certainly don't hold in general. At the least you should give the assumptions you're using. (also, notationally, it's not clear what you're taking the expectation over -- z? theta?)\r\n\r\nEquation 15 doesn't make sense. As written, the matrices are the wrong shape. Should the inner second derivative be in terms of r instead of theta?\r\n\r\nThe text has minor English difficulties, and could benefit from a grammar and word choice editing pass. I stopped marking these pretty early on, but here are some specific suggested edits:\r\n'two-folded' -> 'two-fold'\r\n'framework of natural gradient' -> 'framework of the natural gradient'\r\n'gradient protects about' -> 'gradient protects against'\r\n'worrysome' -> 'worrisome'\r\n'even though is called the same' -> 'despite the shared name'\r\n'differ' -> 'defer'\r\n'get map' -> 'get mapped'"}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 1939"], "writers": ["anonymous"]}
|
{
"criticism": 6,
"example": 3,
"importance_and_relevance": 1,
"materials_and_methods": 5,
"praise": 0,
"presentation_and_reporting": 5,
"results_and_discussion": 1,
"suggestion_and_solution": 5,
"total": 18
}
| 1.444444
| 1.049884
| 0.394561
| 1.462483
| 0.218059
| 0.018038
| 0.333333
| 0.166667
| 0.055556
| 0.277778
| 0
| 0.277778
| 0.055556
| 0.277778
|
{
"criticism": 0.3333333333333333,
"example": 0.16666666666666666,
"importance_and_relevance": 0.05555555555555555,
"materials_and_methods": 0.2777777777777778,
"praise": 0,
"presentation_and_reporting": 0.2777777777777778,
"results_and_discussion": 0.05555555555555555,
"suggestion_and_solution": 0.2777777777777778
}
| 1.444444
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
jbLdjjxPd-b2l
|
Natural Gradient Revisited
|
The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.
|
Revisiting Natural Gradient for Deep Networks
Razvan Pascanu and Yoshua Bengio
Dept. IRO
University of Montreal
Montreal, QC
Abstract
The aim of this paper is three-fold. First we show that Hessian-Free (Martens,
2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described
as implementations of natural gradient descent due to their use of the extended
Gauss-Newton approximation of the Hessian. Secondly we re-derive natural gra-
dient from basic principles, contrasting the difference between two versions of
the algorithm found in the neural network literature, as well as highlighting a few
differences between natural gradient and typical second order methods. Lastly we
show empirically that natural gradient can be robust to overfitting and particularly
it can be robust to the order in which the training data is presented to the model.
1 Introduction
Several recent papers tried to address the issue of using better optimization techniques for machine
learning, especially for training deep architectures or neural networks of various kinds. Hessian-Free
optimization (Martens, 2010; Sutskever et al., 2011; Chapelle and Erhan, 2011), Krylov Subspace
Descent (Vinyals and Povey, 2012), natural gradient descent (Amari, 1997; Park et al., 2000; Le
Roux et al., 2008; Le Roux et al., 2011) are just a few of such recently proposed algorithms. They
usually can be split in two different categories: those which make use of second order information
and those which use the geometry of the underlying parameter manifold (natural gradient).
One particularly interesting pipeline to scale up such algorithms was originally proposed in Pearl-
mutter (1994), finetuned in Schraudolph (2001) and represents the backbone behind both Hessian-
Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012). The
core idea behind it is to make use of the forward (renamed toR-operator in Pearlmutter (1994)) and
backward pass of automatic differentiation to compute efficient products between Jacobian or Hes-
sian matrices and vectors. These products are used within a truncated-Newton approach (Nocedal
and Wright, 2000) which considers the exact Hessian and only inverts it approximately without the
need for explicitly storing the matrix in memory, as opposed to other approaches which perform a
more crude approximation of the Hessian (or Fisher) matrix (either diagonal or block-diagonal).
The contributions of this paper to the study of the natural gradient are as follows. We provide a de-
tailed derivation of the natural gradient, avoiding elements of information geometry. We distinguish
natural gradient descent from TONGA and provide arguments suggesting that natural gradient may
also benefits from a form of robustness that should yield better generalization. The arguments for
this robustness are different from those invoked for TONGA. We show experimentally the effects
of this robustness when we increase the accuracy of the metric using extra unlabeled data. We also
provide evidence that the natural gradient is robust to the order of training examples, resulting in
lower variance as we change the order. The final contribution of the paper is to show that Martens’
Hessian-Free approach of Martens (2010) (and implicitly Krylov Subspace Descent (KSD) algo-
rithm) can be cast into the framework of the natural gradient, showing how these methods can be
seen as doing natural gradient rather then second order optimization.
1
arXiv:1301.3584v4 [cs.LG] 13 Mar 2013
2 Natural Gradient
Natural gradient can be traced back to Amari’s work on information geometry (Amari, 1985) and
its application to various neural networks (Amariet al., 1992; Amari, 1997), though a more in depth
introduction can be found in Amari (1998); Park et al. (2000); Arnold et al. (2011). The algorithm
has also been successfully applied in the reinforcement learning community (Kakade, 2001; Peters
and Schaal, 2008) and for stochastic search (Sun et al., 2009). Le Roux et al. (2007) introduces a
different formulation of the algorithm for deep models. Although similar in name, the algorithm is
motivated differently and is not equivalent to Amari’s version, as will be shown in section 4.1.
Let us consider a family of density functions F: RP →(B →[0,1]), where for every θ ∈RP,
F(θ) defines a density function from B →[0,1] over the random variable z ∈B, where B is some
suitable numeric set of values, for e.g. B = RN. We also define a loss function that we want to
minimize L: RP →R. Any choice of θ ∈RP defines a particular density function pθ(z) = F(θ)
and by considering all possible θ values, we explore the set F, which is our functional manifold.
Because we can define a similarity measures between nearby density functions, given by the KL-
divergence which in its infinitesimal form behaves like a distance measure, we are dealing with a
Riemannian manifold whose metric is given by the Fisher Information matrix. Natural gradient
attempts to move along the manifold by correcting the gradient ofLaccording to the local curvature
of the KL-divergence surface 1:
∇NL(θ) = ∂L(θ)
∂θ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]−1
= ∂L(θ)
∂θ G−1 (1)
We can derive this resultwithout relying on information geometry. We consider the natural gradient
to be defined as the algorithm which, at each step, picks a descent direction such that the KL-
divergence between pθ and pθ+∆θ is constant. At each step, we need to find ∆θsuch that:
arg min∆θL(θ+ ∆θ)
s. t. KL(pθ||pθ+∆θ) = constant (2)
Using this constraint we ensure that we move along the functional manifold with constant speed,
without being slowed down by its curvature. This also makes learning robust to re-parametrizations
of the model, as the functional behaviour of pdoes not depend on how it is parametrized.
Assuming ∆θ→0, we can approximate the KL divergence by its Taylor series:
KL(pθ(z) ∥pθ+∆θ(z)) ≈ (Ez [log pθ] −Ez [log pθ]) −Ez
[∂log pθ
∂θ
]
∆θ−1
2∆θTEz
[∂2 log pθ
∂θ2
]
∆θ
= 1
2∆θTEz
[
−∂2 log pθ(z)
∂θ2
]
∆θ (3)
= 1
2∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ (4)
The first term cancels out and because Ez
[
∂log pθ(z)
∂θ
]
= 0, 2 we are left with only the last term.
The Fisher Information Matrix form can be obtain from the expected value of the Hessian through
algebraic manipulations (see the Appendix).
We now express equation (2) as a Lagrangian, where the KL divergence is approximated by (4) and
L(θ+ ∆θ) by its first order Taylor series L(θ) + ∂L(θ)
∂θ ∆θ:
1 Throughout this paper we use the mathematical convention that a partial derivative∂log pθ
∂θ is a row-vector
2Proof: Ez
[
∂log pθ(z)
∂θ
]
= ∑
z
(
pθ(z) 1
pθ(z)
∂pθ(z)
∂θ
)
= ∂
∂θ
(∑
θpθ(z)
)
= ∂1
∂θ = 0. The proof holds for
the continuous case as well, replacing sums for integrals.
2
L(θ) + ∂L(θ)
∂θ ∆θ+ 1
2λ∆θTEz
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
∆θ= 0 (5)
Solving equation (5) for ∆θ gives us the natural gradient formula (1). Note that we get a scalar
factor of 2 1
λ times the natural gradient. We fold this scalar into the learning rate, and hence the
learning rate also controls the difference between pθ and pθ+∆θ that we impose at each step. Also
the approximations we make are meaningful only around θ. Schaul (2012) suggests that using a
large step size might be harmful for convergence. We deal with such issues both by using damping
(i.e. setting a trust region around θ) and by properly selecting a learning rate.
3 Natural Gradient for Neural Networks
The natural gradient for neural networks relies on their probabilistic interpretation (which induces a
similarity measure between different parametrization of the model) given in the form of conditional
probabilities pθ(t|x), with x representing the input and t the target.
We make use of the following notation. q(x) describes the data generating distribution of x and
q(t|x) is the distribution we want to learn. y is the output of the model, and by an abuse of no-
tation, it will refer to either the function mapping inputs to outputs, or the vector of output acti-
vations. r is the output of the model before applying the output activation function σ. t(i) and
x(i) are the i-th target and input samples of the training set. Jy stands for the Jacobian matrix
Jy =
∂y1
∂θ1
.. ∂y1
∂θP
.. .. ..
∂yo
∂θ1
.. ∂y0
∂θP
. Finally, lower indices such as yi denote the i-th element of a vector.
We define the neural network loss as follows:
L(θ) = 1
n
n∑
i
[
log pθ(t(i)|y(x(i)))
]
= 1
n
n∑
i
[
log pθ(t(i)|σ(r(x(i))))
]
(6)
Because we have a conditional density function pθ(t|x) the formulation for the natural gradient
changes slightly. Each value of x now defines a different family of density functions pθ(t|x), and
hence a different manifold. In order to measure the functional behaviour of pθ(t|x) for different
values of x, we use the expected value (with respect to x ∼˜q(x)) of the KL-divergence between
pθ(t|x) and pθ+∆θ(t|x).
arg min∆θL(θ+ ∆θ)
s. t. Ex∼˜q(x) [KL(pθ(t|x)||pθ+∆θ(t|x))] = constant (7)
The metric G is now an expectation over ˜q(x) of an expectation over p(t|x). The former aver-
ages over possible manifolds generated by different choices of x, while the latter comes from the
definition of the Fisher Information Matrix.
∇NL(θ) = ∂L(θ)
∂θ Ex∼˜q(x)
[
Et∼p(t|x)
[(∂log pθ(t|x)
∂θ
)T (∂log pθ(t|x)
∂θ
)]]−1
= ∂L(θ)
∂θ G−1
(8)
Note that we use the distribution ˜qinstead of the empirical q. This is done in order to emphesis that
the theory does not force us to use the empirical distribution. However, in practice, we do want ˜qto
be as close as possible to q such that the curvature of the KL-divergence matches (in some sense)
the curvature of the error surface. To clarify the effects of ˜q let us consider an example. Assume
that ˜qis unbalanced with respect to q. Namely it contains twice the amount of elements of a classA
versus the other B. This means that a change inθthat affects elements of classA is seen as having a
larger impact on p(in the KL sense) than a change that affects the prediction of elements in B. Due
to the formulation of natural gradient, we will move slower along any direction that affectsA at the
expense of B landing with higher probability on solutions θ∗that favour predicting A. In practice
we approximate this expectation over ˜qby a sample average over minibatches.
3
In what follows we consider typical output activation functions and the metrics G they induce. In
the Appendix we provide a detailed description of how these matrices were obtained starting from
equation (8). Similar derivations were done in Park et al. (2000), which we repeat for convenience.
The formulas we get for the linear, sigmoid and softmax activation functions are:
Glinear = β2Ex∼˜q
[
∂y
∂θ
T ∂y
∂θ
]
= β2Ex∼˜q
[
JT
y Jy
]
(9)
Gsigmoid = Ex∼˜q
[
JT
y diag( 1
y(1 −y))Jy
]
(10)
Gsoftmax = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(11)
To efficiently implement the natural gradient, we use a truncated Newton approach following the
same pipeline as Hessian-Free (Martens, 2010) (more details are provided in the Appendix). We
rely on Theano (Bergstra et al., 2010) for both flexibility and in order to use GPUs to speed up.
The advantages of this pipeline are two-fold: (1) it uses the full-rank matrix, without the need for
explicitely storing it in memory and (2) it does not rely on a smoothness assumption of the metric.
Unlike other algorithms such as nonlinear conjugate gradient or BFGS, it does not assume that the
curvature changes slowly as we change θ. This seems to be important for recurrent neural networks
(as well as probably for deep models) where the curvature can change quickly (Pascanuet al., 2013).
4 Insights into natural gradient
Figure 1 considers a one hidden unit auto-encoder, where we minimize the error
(x−w·sigmoid(wx+ b) + b)2 and shows the path taken by Newton method (blue), natural gradi-
ent (gray), Le Roux’s version of natural gradient (orange) and gradient descent (purple). On the left
(larger plot) we show the error surface as a contour plot, where the x-axis represents band y-axis is
w. We consider two different starting points ([1] and [3]) and draw the first 100 steps taken by each
algorithm towards a local minima. The length of every other step is depicted by a different shade
of color. Hyper-parameters, like learning rate and damping constant, were chosen such to improve
convergence speed while maintaining stability (i.e. we looked for a smooth path). Values are pro-
vided in the Appendix. At every point θduring optimization, natural gradient considers a different
KL divergence surface, KL(pθ||pθ+∆θ) parametrized by ∆θ, which has a minima at origin. On the
right we have contour plots of four different KL surfaces. They correspond to locations indicated by
black arrows on the path of natural gradient. The x-axis is ∆band y-axis is ∆wfor the KL surfaces
subplots. On top of these contour plots we show the direction and length of the steps proposed by
each of the four considered algorithms.
The point of this plot is to illustrate that each algorithm can take a different path in the parame-
ter space towards local minima. In a regime where we have a non-convex problem, with limited
resources, these path can result in qualitatively different kinds of minima. We can not draw any
general conclusions about what kind of minima each algorithm finds based on this toy example,
however we make two observations. First, as showed on the KL-surface plot for [3] the step taken
by natural gradient can be smaller than gradient descent (i.e. the KL curvature is high) even though
the error surface curvature is not high (i.e. Newton’s method step is larger than gradient descent
step). Secondly, the direction chosen by natural gradient can be quite different from that of gradient
descent (see for example in [3] and [4]), which can result in finding a different local minima than
gradient descent (for e.g. when the model starts at [3]).
4.1 A comparison between Amari’s and Le Roux’s natural gradient
In Le Roux et al. (2007) a different approach is taken to derive natural gradient. Specifically one
assumes that the gradients computed over different minibatches are distributed according to a Gaus-
sian centered around the true gradient with some covariance matrix C. By using the uncertainty
provided by C we can correct the step that we are taking to maximize the probability of a downward
move in generalization error (expected negative log-likelihood), resulting in a formula similar to that
4
Figure 1: Path taken by four different learning algorithms towards a local minima. Newton method
(blue), natural gradient (gray), Le Roux’s natural gradient (orange) and gradient descent (purple).
See text for details.
of natural gradient. If g = ∂L
∂θ is the gradient, then Le Roux et al. (2007) proposes following the
direction ˜g= ∂L(θ)
∂θ C−1 where C is:
C = 1
n
∑
i(g −⟨g⟩)T (g −⟨g⟩) (12)
While the probabilistic derivation requires the use of the centered covariance, equation (12), in
Le Roux et al. (2007) it is argued that using the uncentered covariance U is equivalent up to a
constant resulting in a simplified formula which is sometimes confused with the metric derived by
Amari.
U = 1
n
∑
igTg ≈E(x,t)∼q
[(
∂log p(t|x)
∂θ
)T (
∂log p(t|x)
∂θ
)]
(13)
The misunderstanding comes from the fact that the equation has the form of an expectation, though
the expectation is over the empirical distribution q(x,t). It is therefore not clear if U tells us how
pθ would change, whereas it is clear that G does. The two methods are just different, and one can
not straightforwardly borrow the interpretation of one for the other. However, we believe that there
is an argument strongly suggesting that the protection against drops in generalization error afforded
by Le Roux’sU is also a property shared by the natural gradient’sG.
If KL(p∥q) is small, than U can be seen as an approximation to G. Specifically we approximate
the second expectation from equation (8), i.e. the expectation overt ∼pθ(t|x), by a single point, the
corresponding t(i). This approximation makes sense when t(i) is a highly probable sample under p
which happens when we converge. Note that at convergence,U,G and the Hessian are very similar,
hence both versions of natural gradient and most second order methods would behave similarly.
An interesting question is if these different paths taken by each algorithm represent qualitatively dif-
ferent kinds of solutions. We will address this question indirectly by enumerating what implications
each choice has.
The first observation has to do with numerical stability. One can express G as a sum of n×oouter
products (where nis the size of the minibatch over which we estimate the matrix andois the number
5
of output units) while U is a sum of only nouter products. Since the number of terms in these sums
provides an upper bound on the rank of each matrix, it follows that one could expect that U will be
lower rank than G for the same size of the minibatch n. This is also pointed out by Schraudolph
(2002) to motivate the extended Gauss-Newton matrix as middle ground between natural gradient
and the true Hessian3
A second difference regards plateaus of the error surface. Given the formulation of our error function
in equation (6) (which sums the log of pθ(t|x) for specific values of t and x), flat regions of the
objective function are intrinsically flat regions of the functional manifold4. Moving at constant speed
in the functional space means we should not get stalled near such plateaus. In Parket al. (2000) such
plateaus are found near singularities of the functional manifold, providing a nice framework to study
them (as is done for example in Rattray et al. (1998) where they hypothesize that such singularities
behave like repellors for the dynamics of natural gradient descent). An argument can also be made
in favour of U at plateaus. If a plateau at θ exists for most possible inputs x, than the covariance
matrix will have a small norm (because the vectors in each outer product will be small in value). The
inverse of U consequentially will be large, meaning that we will take a large step, possibly out of
the plateau region. This suggest both methods should be able to escape from some plateaus, though
the reasoning behind the functional manifold approach more clearly motivates this advantage.
Another observation that is usually made regarding the functional manifold interpretation is that it
is parametrization-independent. That means that regardless of how we parametrize our model we
should move at the same speed, property assured by the constraint on the KL-divergence betweenpθ
and pθ+∆θ. In Sohl-Dickstein (2012), following this idea, a link is made between natural gradient
and whitening in parameter space. This property does not transfer directly to the covariance matrix.
On the other hand Le Roux’s method is designed to obtain better generalization errors by moving
mostly in the directions agreed upon by the gradients on most examples. We will argue that the
functional manifold approach can also provide a similar property.
One argument relies on large detrimental changes of the expected log-likelihood, which is what Le
Roux’s natural gradient step protects us from with higher probability. The metric of Amari’s natural
gradient measures the expected (over x) KL-divergence curvature. We argue that if ∆θ induces a
large change in log-likelihood computed over x ∈D, where D corresponds to some minibatch, then
it produces a large change in pθ (in the KL sense), i.e. it results in a high KL-curvature. Because
we move at constant speed on the manifold, we slow down in these high KL-curvature regions,
and hence we do not allow large detrimental changes to happen. This intuition becomes even more
suitable when D is larger than the training set, for example by incorporating unlabeled data, and
hence providing a more accurate measure of how pθ changes (in the KL sense). This increase in
accuracy should allow for better predictions of large changes in the generalization error as opposed
to only the training error.
A second argument comes from looking at the Fisher Information matrix
which has the form of an uncentered weighted covariance matrix of gradients,
Ex
[∑
t pθ(t|x)
(
∂log pθ(t|x)
∂θ
)T (
∂log pθ(t|x)
∂θ
)]
. Note that these are not the gradients ∂L
∂θ
that we follow towards a local minima. By using this matrix natural gradient moves in the expected
direction of low variance for pθ. As the cost Ljust evaluates pθ at certain points t(i) for a given
x(i), we argue that with high probability expected directions of low variance for pθ correspond to
directions of low variance for L. Note that directions of high variance for Lindicates direction in
which pθ changes quickly which should be reflected in large changes of the KL. Therefore, in the
same sense as TONGA, natural gradient avoids directions of high variance that can lead to drops in
generalization error.
3Note that Schraudolph (2002) assumes a form of natural gradient that uses U as a metric, similar to the
Le Roux et al. (2007) proposed, an assumption made in Martens (2010) as well.
4One could argue that pmight be such that L has a low curvature while the curvature of KL is much larger.
This would happen for example if pis not very sensitive to θfor the values x(i),t(i) provided in the training
set, but it is for other pairings of xand t. However we believe that in such a scenario is more useful to move
slowly, as the other parings of xand tmight be relevant for the generalization error
6
4.2 Natural gradient descent versus second order methods
Even though natural gradient is usually assumed to be a second order method it is more useful, and
arguably more correct to think of it as a first order method. While it makes use of curvature, it is
the curvature of the functional manifold and not that of the error function we are trying to minimize.
The two quantities are different. For example the manifold curvature matrix is positive semi-definite
by construction while for the Hessian we can have negative curvature.
To make this distinction clear we can try to see what information carries the metric that we invert
(as it was done in Roux and Fitzgibbon (2010) for Newton’s and Le Roux’s methods).
The functional manifold metric can be written as either the expectation of the Hessian ∂2pθ
∂θ2 or the
expectation of the Fisher Information Matrix
[(
∂pθ
∂θ
)T ∂pθ
∂θ
]
(see (3) and (4)). The first form tells us
the that the matrix measures how a change inθaffects the gradients ∂pθ
∂θ of pθ (as the Hessian would
do for the error). The second form tells us how the change in the input affects the gradients ∂pθ
∂θ , as
the covariance matrix would do for Le Roux’s TONGA. However, while the matrix measures both
the effects of a change in the input and θit does so on the functional behaviour of pθ who acts as a
surrogate for the training error. As a consequence we need to look for density functions pθ which
are correlated with the training error, as we do in the examples discussed here.
Lastly, compared to second order methods, natural gradient lends itself very well to the online
optimization regime. In principle, in order to apply natural gradient we need an estimate of the
gradient, which can be the stochastic gradient over a single sample and some reliable measure of
how our model, through pθ, changes with θ (in the KL sense), which is given by the metric. For
e.g. in case of probabilistic models like DBMs, the metric relies only on negative samples obtained
from pθ and does not depend on the empirical distribution q at al Desjardins et al. (2013), while
for a second order method the Hessian would depend on q. For conditional distributions (as is the
case for neural networks), one good choice is to compute the metric on a held out subset of input
samples, offering this way an unbiased estimate of how p(t|x) changes with θ. This can easily be
done in an online regime. Given that we do not even need to have targets for the data over which we
compute the metric, as G integrates out the random variable t, we could even use unlabeled data to
improve the accuracy as long as it comes from the same distribution q, which can not be done for
second order methods.
5 Natural gradient robustness to overfitting
We explore the robustness hypothesis from section 4.1 empirically. The results of all experiments
carried out are summarized in table 1 present in the Appendix. Firstly we consider the effects of
using extra unlabeled data to improve the accuracy of the metric . A similar idea was proposed
in Sun et al. (2009). The idea is that for G to do a good job in this robustness sense, it has to
accurately predict the change in KL divergence in every direction. If G is estimated from too little
data (e.g., a small labeled set) and that data happens to be the training set, then it might “overfit” and
underestimate the effect of a change in some directions where the training data would tend to push
us. To protect us against this, what we propose here is the use alarge unlabeled set to obtain a more
generalization-friendly metric G.
Figure 2 describes the results on the Toronto Face Dataset (TFD), where using unlabeled data results
in 83.04% accuracy vs 81.13% without. State of the art is 85%Rifaiet al. (2012), though this result is
obtained by a larger model that is pre-trained. Hyper-parameters were validated using a grid-search
(more details in the Appendix).
As you can see from the plot, it suggests that using unlabeled data helps to obtain better testing error,
as predicted by our argument in Sec. 4.1. This comes at a price. Convergence (on the training error)
is slower than when we use the same training batch.
Additionally we explore the effect of using different batches of training data to compute the metric.
The full results as well as experimental setup are provided in the Appendix. It shows that, as most
second order methods, natural gradient has a tendency to overfit the current minibatch if both the
metric and the gradient are computed on it. However, as suggested in Vinyals and Povey (2012)
using different minibatches for the metric helps as we tend not to ignore directions relevant for other
minibatches.
7
Figure 2: (left) train error (cross entropy over the entire training set) on a log scale and (right) test
error (percentage of misclassified examples) as a function of number of updates for the Toronto
Faces Dataset. ‘kl, unlabeled‘ stands for the functional manifold version of natural gradient, where
the metric is computed over unlabeled data. for ’KL, different training minibatch’ we compute
the metric on a different minibatch from the training set, while ’KL, same minibatch’ we compute
the metric over the same minibatch we computed the gradient hence matching the standard use of
hessian-free. ’covariance’ stands for tonga that uses the covariance matrix as a metric, while msgd
is minibatch stochastic gradient descent. note that the x axis was interrupted, in order to improve the
visibility of how the natural gradient methods behave.
Figure 3: The plot describes how much the model is influenced by different parts of an online
training set, for the two learning strategies compared (minibatch stochastic gradient descent and
natural gradient descent). The x-axis indicates which part (1st 10th, 2nd 10th, etc.) of the first half
of the data was randomly resampled, while the y-axis measures the resulting variance of the output
due to the change in training data.
6 Natural gradient is robust to the order of the training set
We explore the regularization effects of natural gradient descent by looking at the variance of the
trained model as a function of training samples that it sees. To achieve this we repeat the experiment
described in Erhan et al. (2010) which looks at how resampling different fraction of the training set
affects the variance of the model and focuses specifically to the relative higher variance of the early
examples. Our intuition is that by forbidding large jumps in the KL divergence of pθ and following
the direction of low variance natural gradient will try to limit the amount of overfitting that occurs
at any stage of learning.
We repeat the experiment from Erhan et al. (2010), using the NISTP dataset introduced in Bengio
et al. (2011) (which is just the NIST dataset plus deformations) and use 32.7M samples of this data.
We divide the first 16.3M data into 10 equal size segments. For each data point in the figure, we fix
9 of the 10 data segments, and over 5 different runs we replace the 10th with 5 different random sets
8
of samples. This is repeated for each of the 10 segments to produce the down curves. By looking
at the variance of the model outputs on a held out dataset (of 100K samples) after the whole 32.7M
online training samples, we visualize the influence of each of the 10 segments on the function learnt
(i.e., at the end of online training). The curves can be seen in figure 3.
There are two observation to be made regarding this plot. Firstly, it seems that early examples have a
relative larger effect on the behaviour of the function than latter ones (phenomena sometimes called
early-overfitting). This happens for both methods, natural gradient and stochastic gradient descent.
The second observation regards the overall variance of the learnt model.
Note that the variance at each point on the curve depends on the speed with which we move in
functional space. For a fixed number of examples one can artificially tweak the curves for e.g. by
decreasing the learning rate. With a smaller learning rate we move slower, and since the model,
from a functional point of view, does not change by much, the variance is lower. In the limit, with
a learning rate of 0, the model always stays the same. If we increase the number of steps we take
(i.e. measure the variance after ktimes more samples) the curve recovers some of its shape.This is
because we allow the model to move further away from the starting point.
In order to be fair to the two algorithms, we use the validation error as a measure of how much we
moved in the functional space. This helps us to chose hyper-parameters such that after 32.7M sam-
ples both methods achieve the same validation error of 49.8% (see Appendix for hyper-parameters).
The results are consistent with our hypothesis that natural gradient avoids making large steps in
function space during training, staying on the path that induces least variance. Such large steps
may be present with SGD, possibly yielding the model to overfit (e.g. getting forced into some
quadrant of parameter space based only on a few examples) resulting in different models at the end.
By reducing the variance overall the natural gradient becomes more invariant to the order in which
examples are presented. Note that the relative variance of early examples to the last re-sampled
fraction is about the same for both natural gradient and stochastic gradient descent. However, the
amount of variance induced in the learnt model by the early examples for natural gradient is on the
same magnitude as the variance induce by the last fraction of examples for MSGD (i.e. in a global
sense natural gradient is less sensitive the order of samples it sees).
7 The relationship between Hessian-Free and natural gradient
Hessian-Free as well as Krylov Subspace Descent rely on the extended Gauss-Newton approxima-
tion of the Hessian, GN instead of the actual Hessian (see Schraudolph (2002)).
GN = 1
n
∑
i
[(∂r
∂θ
)T ∂2 log p(t(i)|x(i))
∂r2
(∂r
∂θ
)]
= Ex∼˜q
[
JT
r
(
Et∼˜q(t|x) [HL◦r]
)
Jr
]
(14)
The reason is not computational, as computing both can be done equally fast, but rather better
behaviour during learning. This is usually assumed to be caused by the fact that the Gauss-Newton
is positive semi-definite by construction, so one needs not worry about negative curvature issues.
In this section we show that in fact the extended Gauss-Newton approximation matches perfectly
the natural gradient metric, and hence by choosing this specific approximation, one can view both
algorithms as being implementations of natural gradient rather than typical second order methods.
The last step of equation (14) is obtained by using the normal assumption that (x(i),t(i)) are i.i.d
samples. We will consider the three activation functions and corresponding errors for which the
extended Gauss-Newton is defined and show it matches perfectly the natural gradient metric for the
same activation.
For the linear output units with square errors we can derive the matrix HL◦r as follows:
HL◦rij,i̸=j = ∂2 ∑
k(rk−tk)2
∂ri∂rj
= ∂2(ri−ti)
∂rj
= 0
HL◦rii = ∂2 ∑
k(rk−tk)2
∂ri∂ri
= ∂2(ri−ti)
∂ri
= 2
(15)
9
GN = 1
n
∑
x(i),t(i)
JT
r HL◦rJr = 1
n
∑
x(i),t(i)
JT
y HL◦yJy = 1
n
∑
x(i)
JT
y (2I) Jy = 2Ex∈q(x)
[
JT
y Jy
]
(16)
The result is summarized in equation 16, where we make use of the fact that r = y. It matches the
corresponding natural gradient metric, equation (24) from section 3, up to a constant.
In the case of sigmoid units with cross-entropy objective (σis the sigmoid function), HL◦r is
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(σ(rk))−(1−tk) log(1−σ(rk)))
∂ri∂rj
=
∂
(
−ti 1
σ(ri) σ(ri)(1−σ(ri))+(1−ti) 1
1−σ(ri) σ(ri)(1−σ(ri))
)
∂rj
= ∂σ(ri)−ti
∂rj
= 0
HL◦rii = ...= ∂σ(ri)−ti
∂ri
= σ(ri)(1 −σ(ri))
(17)
If we insert this back into the Gauss-Newton approximation of the Hessian and re-write the equation
in terms of Jy instead of Jr, we get, again, the corresponding natural gradient metric, equation (10).
GN = 1
n
∑
x(i),t(i) JT
r HL◦rJr = 1
n
∑
x(i) JT
r diag (y(1 −y)) diag
(
1
y(1−y)
)
diag (y(1 −y)) Jr
= Ex∼˜q
[
JT
y diag
(
1
y(1−y)
)
Jy
]
(18)
The last matching activation and error function that we consider is the softmax with cross-entropy.
HL◦rij,i̸=j = ∂2 ∑
k(−tklog(φ(rk)))
∂ri∂rj
= ∂∑
k(tkφ(ri))−ti
∂rj
= −φ(ri)φ(rj)
HL◦rii = ...= ∂φ(ri)−ti
∂ri
= φ(ri) −φ(ri)φ(ri)
(19)
Equation (20) starts from the natural gradient metric and singles out a matrixM in the formula such
that the metric can be re-written as the productJT
r MJr (similar to the formula for the Gauss-Newton
approximation). In (21) we show that indeed M equals HL◦r and hence the natural gradient metric
is the same as the extended Gauss-Newton matrix for this case as well. Note that δis the Kronecker
delta, where δij,i̸=j = 0 and δii = 1.
G = Ex∼˜q
[∑o
k=1
1
yk
(
∂yk
∂θ
)T ∂yk
∂θ
]
= Ex∼˜q
[
JT
r
(∑o
k=1
1
yk
(
∂yk
∂r
)T (
∂yk
∂r
))
Jr
]
= 1
N
∑
x(i)
(
JT
r MJr
) (20)
Mij,i̸=j = ∑o
k=1
1
yk
∂yk
∂ri
∂yk
∂rj
= ∑o
k=1(δki −yi)yk(δkj −yj) = yiyj −yiyj −yiyj = −φ(ri)φ(rj)
Mii = ∑o
k=1
1
yk
∂yk
∂yi
∂yk
∂rj
= y2
i (∑o
k=1 yk) + yi −2y2
i = φ(ri) −φ(ri)φ(ri)
(21)
8 Conclusion
In this paper we re-derive natural gradient, by imposing that at each step we follow the direction
that minimizes the error function while resulting in a constant change in the KL-divergence of the
probability density function that represents the model. This approach minimizes the amount of
differential geometry needed, making the algorithm more accessible.
We show that natural gradient, as proposed by Amari, is not the same as the algorithm proposed by
Le Roux et al, even though it has the same name. We highlight a few differences of each algorithm
and hypothesis that Amari’s natural gradient should exhibit the same robustness against overfitting
that Le Roux’s algorithm has, but for different reasons.
10
We explore empirically this robustness hypothesis, by proving better test errors whenunlabeled data
is used to improve the accuracy of the metric. We also show that natural gradient may reduce the
worrisome early specialization effect previously observed with online stochastic gradient descent
applied to deep neural nets, and reducing the variance of the resulting learnt function (with respect
to the sampled training data).
By computing the specific metrics needed for standard output activation functions we showed that
the extended Gauss-Newton approximation of the Hessian coincides with the natural gradient metric
(provided that the metric is estimated over the same batch of data as the gradient). Given this identity
one can re-interpret the recently proposed Hessian-Free and Krylov Subspace Descent as natural
gradient.
Finally we point out a few differences between typical second order methods and natural gradient.
The latter seems more suitable for online or probabilistic models, and relies on a surrogate probabil-
ity density function pθ in place of the error function in case of deterministic models.
Acknowledgements
We would like to thank Guillaume Desjardens, Aaron Courville, Li Yao, David Warde-Farley and
Ian Goodfellow for the interesting discussion on the topic, or for any help provided during the
development of this work. Reviewers at ICLR were particularly helpful, and we want to thank
them, especially one of the reviewers that suggested several links with work from the reinforcement
learning community. Also special thanks goes to the Theano development team as well (particularly
to Frederic Bastien, Pascal Lamblin and James Bergstra) for their help.
We acknowledge NSERC, FQRNT, CIFAR, RQCHP and Compute Canada for the resources they
provided.
References
Amari, S. (1985). Differential geometrical methods in statistics. Lecture notes in statistics, 28.
Amari, S. (1997). Neural learning in structured parameter spaces - natural Riemannian gradient. InIn Advances
in Neural Information Processing Systems, pages 127–133. MIT Press.
Amari, S., Kurata, K., and Nagaoka, H. (1992). Information geometry of Boltzmann machines. IEEE Trans.
on Neural Networks, 3, 260–271.
Amari, S.-I. (1998). Natural gradient works efficiently in learning. Neural Comput., 10(2), 251–276.
Arnold, L., Auger, A., Hansen, N., and Olivier, Y . (2011). Information-geometric optimization algorithms: A
unifying picture via invariance principles. CoRR, abs/1106.3708.
Bengio, Y ., Bastien, F., Bergeron, A., Boulanger-Lewandowski, N., Breuel, T., Chherawala, Y ., Cisse, M., Cˆot´e,
M., Erhan, D., Eustache, J., Glorot, X., Muller, X., Pannetier Lebeuf, S., Pascanu, R., Rifai, S., Savard, F.,
and Sicard, G. (2011). Deep learners benefit more from out-of-distribution examples. In JMLR W&CP:
Proc. AISTATS’2011.
Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D.,
and Bengio, Y . (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python
for Scientific Computing Conference (SciPy).
Chapelle, O. and Erhan, D. (2011). Improved Preconditioner for Hessian Free Optimization. InNIPS Workshop
on Deep Learning and Unsupervised Feature Learning.
Choi, S.-C. T., Paige, C. C., and Saunders, M. A. (2011). MINRES-QLP: A Krylov subspace method for
indefinite or singular symmetric systems. 33(4), 1810–1836.
Desjardins, G., Pascanu, R., Courville, A., and Bengio, Y . (2013). Metric-free natural gradient for joint-training
of boltzmann machines. CoRR, abs/1301.3545.
Erhan, D., Courville, A., Bengio, Y ., and Vincent, P. (2010). Why does unsupervised pre-training help deep
learning? In JMLR W&CP: Proc. AISTATS’2010, volume 9, pages 201–208.
Kakade, S. (2001). A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,NIPS,
pages 1531–1538. MIT Press.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2007). Topmoumoute online natural gradient algorithm. Tech-
nical Report 1299, D´epartement d’informatique et recherche op´erationnelle, Universit´e de Montr´eal.
Le Roux, N., Manzagol, P.-A., and Bengio, Y . (2008). Topmoumoute online natural gradient algorithm. In
NIPS’07.
11
Le Roux, N., Bengio, Y ., and Fitzgibbon, A. (2011). Improving first and second-order methods by modeling
uncertainty. In Optimization for Machine Learning. MIT Press.
Martens, J. (2010). Deep learning via hessian-free optimization. In ICML, pages 735–742.
Nocedal, J. and Wright, S. J. (2000). Numerical Optimization. Springer.
Park, H., Amari, S.-I., and Fukumizu, K. (2000). Adaptive natural gradient learning algorithms for various
stochastic models. Neural Networks, 13(7), 755 – 764.
Pascanu, R., Mikolov, T., and Bengio, Y . (2013). On the difficulty of training recurrent neural networks.CoRR,
abs/1211.5063.
Pearlmutter, B. A. (1994). Fast exact multiplication by the hessian. Neural Computation, 6, 147–160.
Peters, J. and Schaal, S. (2008). Natural actor-critic. (7-9), 1180–1190.
Rattray, M., Saad, D., and Amari, S. I. (1998). Natural Gradient Descent for On-Line Learning. Physical
Review Letters, 81(24), 5461–5464.
Rifai, S., Bengio, Y ., Courville, A., Vincent, P., and Mirza, M. (2012). Disentangling factors of variation for
facial expression recognition. In Proceedings of the European Conference on Computer Vision (ECCV 6) ,
pages 808–822.
Roux, N. L. and Fitzgibbon, A. W. (2010). A fast natural newton method. In J. F ¨urnkranz and T. Joachims,
editors, ICML, pages 623–630. Omnipress.
Schaul, T. (2012). Natural evolution strategies converge on sphere functions. In Genetic and Evolutionary
Computation Conference (GECCO).
Schraudolph, N. N. (2001). Fast curvature matrix-vector products. In ICANN, pages 19–26.
Schraudolph, N. N. (2002). Fast curvature matrix-vector products for second-order gradient descent. Neural
Computation, 14(7), 1723–1738.
Sohl-Dickstein, J. (2012). The natural gradient by analogy to signal whitening, and recipes and tricks for its
use. CoRR, abs/1205.1828.
Sun, Y ., Wierstra, D., Schaul, T., and Schmidhuber, J. (2009). Stochastic search using the natural gradient. In
ICML, page 146.
Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In ICML,
pages 1017–1024.
Vinyals, O. and Povey, D. (2012). Krylov Subspace Descent for Deep Learning. In AISTATS.
Appendix
8.1 Expected Hessian to Fisher Information Matrix
The Fisher Information Matrix form can be obtain from the expected value of the Hessian :
Ez
[
−∂2 log pθ
∂θ
]
= Ez
[
−
∂ 1
pθ
∂pθ
∂θ
∂θ
]
= Ez
[
− 1
pθ(z)
∂2pθ
∂θ2 +
(1
pθ
∂pθ
∂θ
)T (1
pθ
∂pθ
∂θ
)]
= −∂2
∂θ2
(∑
z
pθ(z)
)
+ Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
= Ez
[(∂log pθ(z)
∂θ
)T (∂log pθ(z)
∂θ
)]
(22)
8.2 Derivation of the natural gradient metrics
8.2.1 Linear activation function
In the case of linear outputs we assume that each entry of the vector t, ti comes from a Gaussian
distribution centered around yi(x) with some standard deviation β. From this it follows that:
pθ(t|x) =
o∏
i=1
N(ti|y(x,θ)i,β2) (23)
12
G = Ex∼˜q
[
Et∼N(t|y(x,θ),β2I)
[∑o
i=1
(
∂logθp(ti|y(x)i
∂θ
)T (
∂log pθ(ti|y(x)i
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[(
∂(ti−yi)2
∂θ
)T (
∂(ti−yi)2
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2
(
∂yi
∂θ
)T (
∂yi
∂θ
)]]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),βI)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= Ex∼˜q
[∑o
i=1
[
Et∼N(t|y(x,θ),β2I)
[
(ti −yi)2](
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[∑o
i=1
[(
∂yi
∂θ
)T (
∂yi
∂θ
)]]
= β2Ex∼˜q
[
JT
y Jy
]
(24)
8.2.2 Sigmoid activation function
In the case of the sigmoid units, i,e,y = sigmoid(r), we assume a binomial distribution which gives
us:
p(t|x) =
∏
i
yti
i (1 −yi)1−ti (25)
log p gives us the usual cross-entropy error used with sigmoid units. We can compute the Fisher
information matrix as follows:
G = Ex∼˜q
[
Et∼p(t|x)
[∑o
i=1
(ti−yi)2
y2
i(1−yi)2
(
∂yi
∂θ
)T ∂yi
∂θ
]]
= Ex∼˜q
[∑o
i=1
1
yi(1−yi)
(
∂yi
∂θ
)T ∂yi
∂θ
]
= Ex∼˜q
[
JT
y diag( 1
y(1−y) )Jy
]
(26)
8.2.3 Softmax activation function
For the softmax activation function, y = softmax(r), p(t|x) takes the form of a multinomial:
p(t|x) =
o∏
i
yti
i (27)
G = Ex∼˜q
[ o∑
i
1
yi
(∂yi
∂θ
)T ∂yi
∂θ
]
(28)
8.3 Implementation Details
We have implemented natural gradient descent using a truncated Newton approach similar to the
pipeline proposed by Pearlmutter (1994) and used by Martens (2010). In order to better deal with
singular and ill-conditioned matrices we use the MinRes-QLP algorithm (Choi et al., 2011) instead
of linear conjugate gradient. Both Minres-QLP as well as linear conjugate gradient can be found im-
plemented in Theano at https://github.com/pascanur/theano optimize. We used the Theano library
(Bergstra et al., 2010) which allows for a flexible implementation of the pipeline, that can automat-
ically generate the computational graph of the metric times some vector for different models:
13
import theano.tensor as TT
# ‘params‘ is the list of Theano variables containing the parameters
# ‘vs‘ is the list of Theano variable representing the vector ‘v‘
# with whom we want to multiply the metric
# ‘Gvs‘ is the list of Theano expressions representing the product
# between the metric and ‘vs‘
# ‘out_smx‘ is the output of the model with softmax units
Gvs = TT.Lop(out_smx,params,
TT.Rop(out_smx,params,vs)/(out_smx*out_smx.shape[0]))
# ‘out_sig‘ is the output of the model with sigmoid units
Gvs = TT.Lop(out_sig,params,
TT.Rop(out_sig,params,vs)/(out_sig*
(1-out_sig)*
out_sig.shape[0]))
# ‘out‘ is the output of the model with linear units
Gvs = TT.Lop(out,params,TT.Rop(out,params,vs)/out.shape[0])
The full pseudo-code of the algorithm (which is very similar to the one for Hessian-Free) is given
below. The full Theano implementation can be retrieved from https://github.com/pascanur/natgrad.
Algorithm 1 Pseudocode for natural gradient algorithm
# ‘gfn‘ is a function that computes the metric times some vector
gfn ←(lambda v→Gv)
while not early stopping condition do
g ←∂L
∂θ
# linear cg solves the linear system Gx= ∂L
∂θ
ng←linear cg(gfn, g, max iters = 20, rtol=1e-4)
# γis the learning rate
θ←θ−γng
end while
Even though we are ensured that G is positive semi-definite by construction, and MinRes-QLP is
able to find a suitable solutions in case of singular matrices, we still use a damping strategy for two
reasons. The first one is that we want to take in consideration the inaccuracy of the metric (which
is approximated only over a small minibatch). The second reason is that natural gradient makes
sense only in the vicinity of θ as it is obtained by using a Taylor series approximation, hence (as
for ordinary second order methods) it is appropriate to enforce a trust region for the gradient. See
Schaul (2012), where the convergence properties of natural gradient (in a specific case) are studied.
Following the functional manifold interpretation of the algorithm, we can recover the Levenberg-
Marquardt heuristic used in Martens (2010) by considering a first order Taylor approximation, where
for any function f,
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
≈f(θt) −η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T
(29)
This gives as the reduction ratio given by equation (30) which can be shown to behave identically
with the one in Martens (2010).
ρ=
f
(
θt −ηG−1 ∂f(θt)
∂θt
T)
−f(θt)
−η∂f(θt)
∂θt
G−1 ∂f(θt)
∂θt
T (30)
14
8.4 Additional experimental results
For the one hidden unit auto-encoder we selected hyper-parameters such to ensure stability of train-
ing, while converging as fast as possible to a minima. We compute the inverse of the metric or
Hessian exactly (as it is just a 2 by 2 matrix). The learning rate for SGD is set to .1, for Amari’s
natural gradient .5 and for the covariance of gradience 1. (Newton’s method usually does not use
a learning rate). We damped the Hessian and the covariance of gradients by adding I and Amari’s
metric using 0.01 ·I.
8.5 Restricted MNIST experiment
For the restricted MNIST, we train a one hidden layer MLP of 1500 hidden units. The hyper-
parameters where chosen based on a grid search over learning rate, damping factor and damping
strategy. Note that beside using unlabeled data, the regularization effect of natural gradient is
strongly connected to the damping factor which accounts for the uncertainty in the metric (in a
similar way to how it does in the uncentered covariance version of natural gradient). The minibatch
size was kept constant to 2500 samples for natural gradient methods and 250 for MSGD. We used a
constant learning rate and used a budged of 2000 iterations for natural gradient and 40000 iterations
for MSGD.
We used a learning rate of 1.0 for MSGD and 5.0 for the functional manifold NGD using unlabeled
data or the covariance based natural gradient. For the functional manifold NGD using either the
same training minibatch or a different batch from the training set for computing the metric we set
the learning rate to 0.1. We use a Levenberg-Marquardt heuristic only when using unlabeled data,
otherwise the damping factor was kept constant. Its initial value was 2.0 for when using unlabeled
data, and 0.01 for every case except when using the covariance of the gradients as the metric, when
is set to 0.1.
Figure 4: (left) train error (cross entropy over the entire training set) on a log scale in order to im-
prove visibility and (right) test error (percentage of misclassified examples) as a function of number
of updates for the restricted mnist dataset.
8.6 MNIST experiment
The model used has 3 layers, where the first two are convolutional layers both with filters of size
5x5. We used 32 filters on the first layer and 64 on the second. The last layer forms an MLP with 750
hidden units. We used minibatches of 10000 examples (for both the gradient and the metric), and a
1
t decaying learning rate strategy. The learning rate was kept constant for the first 200 updates and
then it was computed based on the formula l0
1+ t−200
20
, where tis the number of the current update.
We used a budged ot 2000 update.
The learning rate was set to 0.5 for the functional manifold approach when using a different batch
for computing the metric and 1.0 when using the same batch for computing the metric, or for using
the covariance of gradients as metric. We use a Levenberg-Marquardt heuristic to adapt the damping
15
Table 1: Results on the three datasets considered (restricted MNIST, MNIST and TFD). Note that
different models are used for different datasets. The training error is given as cross-entropy error,
while the test error is percentage of miss-classified examples. The algorithms name are the same as
in the legend of figure 2
DATA SET DATA FOLD MSGD KL, UNLABELED KL, DIFFERENT KL, SAME COVARIANCE
BATCH BATCH
RESTRICTED TRAIN 0.0523 0.0017 0.0012 0.0023 0.0006
MNIST TEST 5.22% 4.63% 4.89% 4.91% 4.74%
MNIST TRAIN 0.00010 0.0011 0.024
TEST 0.78% 0.82% 1.07%
TFD TRAIN 0.054 0.098
TEST 16.96% 18.87%
factor which initially is 5.0 for the functional manifold approach, and a constant damping factor of
0.1 for using the covariance as metric. These values were validated by a grid search.
8.7 TFD experiment
The Toronto Face Dataset (TFD), has a large amount of unlabeled data of poorer quality than the
training set. To ensure that the noise in the unlabeled data does not affect the metric, we compute the
metric over the training batch plus unlabeled samples. We used a three hidden layer model, where
the first layer is a convolutional layer of 300 filters of size 12x12. The second two layers from a 2
hidden layer MLP of 2048 and 1024 hidden units respectively.
For the TFD experiment we used the same decaying learning rate strategy introduced above, in
subsection 8.6, where we computed gradients over the minibatch of 960 examples. When using the
unlabeled data, we added 480 unlabeled examples to the 960 used to compute the gradient (therefore
the metric was computed over 1440 examples) otherwise we used the same 960 examples for the
metric. In both cases we used an initial damping factor of 8, and the Levenberg-Marquardt heuristic
to adapt this damping value. Initial learning rate l0 was set to 1 in both cases.
Note that we get only 83.04% accuracy on this dataset, when the state of the art is 85.0% Rifaiet al.
(2012), but our first layer is roughly 3 times smaller (300 filters versus 1024).
8.8 NISTP exepriment (robustness to the order of training samples)
The model we experimented with was an MLP of only 500 hidden units. We compute the gradients
for both MSGD and natural gradient over minibatches of 512 examples. In case of natural gradient
we compute the metric over the same input batch of 512 examples. Additionally we use a constant
damping factor of 3 to account for the noise in the metric (and ill-conditioning since we only use
batches of 512 samples). The learning rates were kept constant, and we use .2 for the natural gradient
and .1 for MSGD.
16
Figure 5: Train and test error (cross entropy) on a log scale as a function of number of updates for
the MNIST dataset. The legend is similar to figure 2
17
|
Razvan Pascanu, Yoshua Bengio
|
Unknown
| 2,013
|
{"id": "jbLdjjxPd-b2l", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358454600000, "tmdate": 1358454600000, "ddate": null, "number": 54, "content": {"title": "Natural Gradient Revisited", "decision": "conferencePoster-iclr2013-workshop", "abstract": "The aim of this paper is two-folded. First we intend to show that Hessian-Free optimization (Martens, 2010) and Krylov Subspace Descent (Vinyals and Povey, 2012) can be described as implementations of Natural Gradient Descent due to their use of the extended Gauss-Newton approximation of the Hessian. Secondly we re-derive Natural Gradient from basic principles, contrasting the difference between the two version of the algorithm that are in the literature.", "pdf": "https://arxiv.org/abs/1301.3584v4", "paperhash": "pascanu|natural_gradient_revisited", "keywords": [], "conflicts": [], "authors": ["Razvan Pascanu", "Yoshua Bengio"], "authorids": ["r.pascanu@gmail.com", "yoshua.bengio@gmail.com"]}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["r.pascanu@gmail.com"], "writers": []}
|
[Review]:
As the previous reviewer states, there are very large improvements in the paper. Clarity and mathematical precision are both greatly increased, and reading it now gives useful insight into the relationship between different perspectives and definitions of the natural gradient, and Hessian based methods. Note, I did not check the math in Section 7 upon this rereading.
It's misleading to suggest that the author's derivation in terms of minimizing the objective on a fixed-KL divergence shell around the current location (approximated as a fixed value of the second order expansion of the Fisher information) is novel. This is something that Amari also did (see for instance the proof of Theorem 1 on page 4 in Amari, S.-I. (1998). Natural Gradient Works Efficiently in Learning. Neural Computation, 10(2), 251–276. doi:10.1162/089976698300017746. This claim should be removed.
It could still use an editing pass, and especially improvements in the figure captions, but these are nits as opposed to show-stoppers (see specific comments below). This is a much nicer paper. My only significant remaining concerns are in terms of the Lagrange-multiplier derivation, and in terms of precedent setting. It would be that it's a dangerous precedent to set (and promises to make much more work for future reviewers!) to base acceptance decisions on rewritten manuscripts that differ significantly from the version initially submitted. So -- totally an editorial decision.
p. 2, footnote 2 -- 3rd expression should still start with sum_z
'emphesis' -> emphasize'
'to speed up' -> 'to speed up computations'
'train error' -> 'training error'
Figure 2 -- label panes (a) and (b) and reference as such. 'KL, different training minibatch' appears to be missing from Figure. In latex, use ` for open quote and ' for close quote. capitalize kl. So, for instance, `KL, unlabeled'
Figure 3 -- Caption has significant differences from figure
in most places where it occurs, should refer to 'the natural gradient' rather than 'natural gradient'
'equation (24) from section 3' -- there is no equation 24 in section 3. Equation and Section should be capitalized.
|
anonymous reviewer 1939
| null | null |
{"id": "0mPCmj67CX0Ti", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1364262660000, "tmdate": 1364262660000, "ddate": null, "number": 6, "content": {"title": "", "review": "As the previous reviewer states, there are very large improvements in the paper. Clarity and mathematical precision are both greatly increased, and reading it now gives useful insight into the relationship between different perspectives and definitions of the natural gradient, and Hessian based methods. Note, I did not check the math in Section 7 upon this rereading.\r\n\r\nIt's misleading to suggest that the author's derivation in terms of minimizing the objective on a fixed-KL divergence shell around the current location (approximated as a fixed value of the second order expansion of the Fisher information) is novel. This is something that Amari also did (see for instance the proof of Theorem 1 on page 4 in Amari, S.-I. (1998). Natural Gradient Works Efficiently in Learning. Neural Computation, 10(2), 251\u2013276. doi:10.1162/089976698300017746. This claim should be removed.\r\n\r\nIt could still use an editing pass, and especially improvements in the figure captions, but these are nits as opposed to show-stoppers (see specific comments below). This is a much nicer paper. My only significant remaining concerns are in terms of the Lagrange-multiplier derivation, and in terms of precedent setting. It would be that it's a dangerous precedent to set (and promises to make much more work for future reviewers!) to base acceptance decisions on rewritten manuscripts that differ significantly from the version initially submitted. So -- totally an editorial decision.\r\n\r\np. 2, footnote 2 -- 3rd expression should still start with sum_z\r\n\r\n'emphesis' -> emphasize'\r\n\r\n'to speed up' -> 'to speed up computations'\r\n\r\n'train error' -> 'training error'\r\n\r\nFigure 2 -- label panes (a) and (b) and reference as such. 'KL, different training minibatch' appears to be missing from Figure. In latex, use ` for open quote and ' for close quote. capitalize kl. So, for instance, `KL, unlabeled'\r\n\r\nFigure 3 -- Caption has significant differences from figure\r\n\r\nin most places where it occurs, should refer to 'the natural gradient' rather than 'natural gradient'\r\n\r\n'equation (24) from section 3' -- there is no equation 24 in section 3. Equation and Section should be capitalized."}, "forum": "jbLdjjxPd-b2l", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "jbLdjjxPd-b2l", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 1939"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 3,
"importance_and_relevance": 2,
"materials_and_methods": 2,
"praise": 3,
"presentation_and_reporting": 9,
"results_and_discussion": 1,
"suggestion_and_solution": 7,
"total": 22
}
| 1.409091
| 0.130714
| 1.278377
| 1.425665
| 0.214604
| 0.016574
| 0.181818
| 0.136364
| 0.090909
| 0.090909
| 0.136364
| 0.409091
| 0.045455
| 0.318182
|
{
"criticism": 0.18181818181818182,
"example": 0.13636363636363635,
"importance_and_relevance": 0.09090909090909091,
"materials_and_methods": 0.09090909090909091,
"praise": 0.13636363636363635,
"presentation_and_reporting": 0.4090909090909091,
"results_and_discussion": 0.045454545454545456,
"suggestion_and_solution": 0.3181818181818182
}
| 1.409091
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.
Quality rating: Strong reject
Confidence: Reviewer is knowledgeable
|
anonymous reviewer f5bf
| null | null |
{"id": "sJxHJpdSKIJNL", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363326840000, "tmdate": 1363326840000, "ddate": null, "number": 4, "content": {"title": "", "review": "The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.\r\n\r\nQuality rating: Strong reject \r\nConfidence: Reviewer is knowledgeable"}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f5bf"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 3
}
| 1
| -0.578243
| 1.578243
| 1.002566
| 0.032246
| 0.002566
| 0.666667
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
|
{
"criticism": 0.6666666666666666,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0.3333333333333333,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.
Quality rating: Strong reject
Confidence: Reviewer is knowledgeable
|
anonymous reviewer f5bf
| null | null |
{"id": "qX8Cq3hI2EXpf", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363279380000, "tmdate": 1363279380000, "ddate": null, "number": 10, "content": {"title": "", "review": "The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.\r\n\r\nQuality rating: Strong reject \r\nConfidence: Reviewer is knowledgeable"}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f5bf"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 3
}
| 1
| -0.578243
| 1.578243
| 1.002566
| 0.032246
| 0.002566
| 0.666667
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
|
{
"criticism": 0.6666666666666666,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0.3333333333333333,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.
Quality rating: Strong reject
Confidence: Reviewer is knowledgeable
|
anonymous reviewer f5bf
| null | null |
{"id": "mmlAm0ZawBraS", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363279380000, "tmdate": 1363279380000, "ddate": null, "number": 7, "content": {"title": "", "review": "The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.\r\n\r\nQuality rating: Strong reject \r\nConfidence: Reviewer is knowledgeable"}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f5bf"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 3
}
| 1
| -0.578243
| 1.578243
| 1.002566
| 0.032246
| 0.002566
| 0.666667
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
|
{
"criticism": 0.6666666666666666,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0.3333333333333333,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.
Quality rating: Strong reject
Confidence: Reviewer is knowledgeable
|
anonymous reviewer f5bf
| null | null |
{"id": "ddu0ScgIDPSxi", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363279380000, "tmdate": 1363279380000, "ddate": null, "number": 5, "content": {"title": "", "review": "The revision and rebuttal failed to address the issues raised by the reviewers. I do not think the paper should be accepted in its current form.\r\n\r\nQuality rating: Strong reject \r\nConfidence: Reviewer is knowledgeable"}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f5bf"], "writers": ["anonymous"]}
|
{
"criticism": 2,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 1,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 3
}
| 1
| -0.578243
| 1.578243
| 1.002566
| 0.032246
| 0.002566
| 0.666667
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
|
{
"criticism": 0.6666666666666666,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0.3333333333333333,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
The paper studies the problem of learning vector representations for words based on large text corpora using 'neural language models' (NLMs). These models learn a feature vector for each word in such a way, that the feature vector of the current word in a document can be predicted from the feature vectors of the words that precede (and/or succeed) that word. Whilst a number of studies have developed techniques to make the training of NLMs more efficient, scaling NLMs up to today's multi-billion-words text corpora is still a challenge.
The main contribution of the paper comprises two new NLM architectures that facilitate training on massive data sets. The first model, CBOW, is essentially a standard feed-forward NLM without the intermediate projection layer (but with weight sharing + averaging before applying the non-linearity in the hidden layer). The second model, skip-gram, comprises a collection of simple feed-forward nets that predict the presence of a preceding or succeeding word from the current word. The models are trained on a massive Google News corpus, and tested on a semantic and syntactic question-answering task. The results of these experiments look promising.
Whilst I think this line of research is interesting and the presented results look promising, I do have three main concerns with this paper:
(1) The choice for the proposed models (CBOW and skip-gram) are not clearly motivated. The authors' only motivation appears to be for computational reasons. However, the experiments do not convincingly show that this indeed leads to performance improvements on the task at hand. In particular, the 'vanilla' NLM implementation of the authors actually gives the best performance on the syntactic question-answering task. Faster training speed is mainly useful when you can throw more data at the model, and the model can effectively learn from this new data (as the authors argue themselves in the introduction). The experiments do not convincingly show that this happens. In addition, the comparisons with the models by Collobert-Weston, Turian, Mnih, Mikolov, and Huang appear to be unfair: these models were trained on much smaller corpora. A fair experiment would re-train the models on the same data to show that they learn slower (which is the authors' hypothesis), e.g., by showing learning curves or by showing a graph that shows performance as a function of training time.
(2) The description of the models that are developed is very minimal, making it hard to determine how different they are from, e.g., the models presented in [15]. It would be very helpful if the authors included some graphical representations and/or more mathematical details of their models. Given that the authors still almost have one page left, and that they use a lot of space for the (frankly, somewhat superfluous) equations for the number of parameters of each model, this should not be a problem.
(3) Throughout the paper, the authors assume that the computational complexity of learning is proportional to the number of parameters in the model. However, their experimental results show that this assumption is incorrect: doubling the number of parameters in the CBOW and skip-gram models only leads to a very modest increase in training time (see Table 4).
Detailed comments
===============
- The paper contains numerous typos and small errors. Specifically, I noticed a lot of missing articles throughout the paper.
- 'For many tasks, the amount of … focus on more advanced techniques.' -> This appears to be a contradiction. If speech recognition performance is largely governed by the amount of data we have, than simply scaling up the basic techniques should help a lot!
- 'solutions were proposed for avoiding it' -> For avoiding what? Computation of the full output distribution over words of length V?
- 'multiple degrees of similarities' -> What is meant by degrees here? Different dimensions of similarity? (For instance, Fiat is like Ferrari because they're both Italian but unlike Ferrari because it's not a sports car.) Or different strengths of the similarity? (For instance, Denmark is more like Germany than like Spain.) What about the fact that semantic similarities are intransitive? (Tversky's famous example of the similarity between China and North Korea.)
- 'Moreover, we discuss hyper-parameter selection … millions of words in the vocabulary.' -> I fail to see the relation between hyperparameter selection and training speed. Moreover, the paper actually does not say anything about hyperparameter selection! It only states the initial learning rate is 0.025, and that is linearly decreased (but not how fast).
- Table 2: It appears that the performance of the CBOW model is still improving. How does it perform when D = 1000 or 2000? Why not make a learning curve here (plot performance as a function of D or of training time)?
- Table 3: Why is 'our NNLM' so much better than the other NNLMs? Just because it was trained on more data? What model is implemented by 'our NNLM' anyway?
- Tables 3 and 4: Why is the NNLM trained on 6 billion examples and the others on just 0.7 or 1.6 billion examples? The others should be faster, so easier to train on more data, right?
- It would be interesting if the authors could say something about how these models deal with intransitive semantic similarities, e.g., with the similarities between 'river', 'bank', and 'bailout'. People like Tversky have advocated against the use of semantic-space models like NLMs because they cannot appropriately model intransitive similarities.
- Instead of looking at binary question-answering performance, it may also be interesting to look whether a hitlist of answers contains the correct answer.
- The number of self-citations seems somewhat excessive.
- I tried to find reference [14] to see how it differs from the present paper, but I was not able to find it anywhere.
|
anonymous reviewer f5bf
| null | null |
{"id": "bf2Dnm5t9Ubqe", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1360865940000, "tmdate": 1360865940000, "ddate": null, "number": 8, "content": {"title": "review of Efficient Estimation of Word Representations in Vector Space", "review": "The paper studies the problem of learning vector representations for words based on large text corpora using 'neural language models' (NLMs). These models learn a feature vector for each word in such a way, that the feature vector of the current word in a document can be predicted from the feature vectors of the words that precede (and/or succeed) that word. Whilst a number of studies have developed techniques to make the training of NLMs more efficient, scaling NLMs up to today's multi-billion-words text corpora is still a challenge.\r\n\r\nThe main contribution of the paper comprises two new NLM architectures that facilitate training on massive data sets. The first model, CBOW, is essentially a standard feed-forward NLM without the intermediate projection layer (but with weight sharing + averaging before applying the non-linearity in the hidden layer). The second model, skip-gram, comprises a collection of simple feed-forward nets that predict the presence of a preceding or succeeding word from the current word. The models are trained on a massive Google News corpus, and tested on a semantic and syntactic question-answering task. The results of these experiments look promising.\r\n\r\nWhilst I think this line of research is interesting and the presented results look promising, I do have three main concerns with this paper:\r\n\r\n(1) The choice for the proposed models (CBOW and skip-gram) are not clearly motivated. The authors' only motivation appears to be for computational reasons. However, the experiments do not convincingly show that this indeed leads to performance improvements on the task at hand. In particular, the 'vanilla' NLM implementation of the authors actually gives the best performance on the syntactic question-answering task. Faster training speed is mainly useful when you can throw more data at the model, and the model can effectively learn from this new data (as the authors argue themselves in the introduction). The experiments do not convincingly show that this happens. In addition, the comparisons with the models by Collobert-Weston, Turian, Mnih, Mikolov, and Huang appear to be unfair: these models were trained on much smaller corpora. A fair experiment would re-train the models on the same data to show that they learn slower (which is the authors' hypothesis), e.g., by showing learning curves or by showing a graph that shows performance as a function of training time.\r\n\r\n(2) The description of the models that are developed is very minimal, making it hard to determine how different they are from, e.g., the models presented in [15]. It would be very helpful if the authors included some graphical representations and/or more mathematical details of their models. Given that the authors still almost have one page left, and that they use a lot of space for the (frankly, somewhat superfluous) equations for the number of parameters of each model, this should not be a problem.\r\n\r\n(3) Throughout the paper, the authors assume that the computational complexity of learning is proportional to the number of parameters in the model. However, their experimental results show that this assumption is incorrect: doubling the number of parameters in the CBOW and skip-gram models only leads to a very modest increase in training time (see Table 4).\r\n\r\n\r\nDetailed comments\r\n===============\r\n- The paper contains numerous typos and small errors. Specifically, I noticed a lot of missing articles throughout the paper.\r\n\r\n- 'For many tasks, the amount of \u2026 focus on more advanced techniques.' -> This appears to be a contradiction. If speech recognition performance is largely governed by the amount of data we have, than simply scaling up the basic techniques should help a lot!\r\n\r\n- 'solutions were proposed for avoiding it' -> For avoiding what? Computation of the full output distribution over words of length V?\r\n\r\n- 'multiple degrees of similarities' -> What is meant by degrees here? Different dimensions of similarity? (For instance, Fiat is like Ferrari because they're both Italian but unlike Ferrari because it's not a sports car.) Or different strengths of the similarity? (For instance, Denmark is more like Germany than like Spain.) What about the fact that semantic similarities are intransitive? (Tversky's famous example of the similarity between China and North Korea.)\r\n\r\n- 'Moreover, we discuss hyper-parameter selection \u2026 millions of words in the vocabulary.' -> I fail to see the relation between hyperparameter selection and training speed. Moreover, the paper actually does not say anything about hyperparameter selection! It only states the initial learning rate is 0.025, and that is linearly decreased (but not how fast).\r\n\r\n- Table 2: It appears that the performance of the CBOW model is still improving. How does it perform when D = 1000 or 2000? Why not make a learning curve here (plot performance as a function of D or of training time)?\r\n\r\n- Table 3: Why is 'our NNLM' so much better than the other NNLMs? Just because it was trained on more data? What model is implemented by 'our NNLM' anyway? \r\n\r\n- Tables 3 and 4: Why is the NNLM trained on 6 billion examples and the others on just 0.7 or 1.6 billion examples? The others should be faster, so easier to train on more data, right?\r\n\r\n- It would be interesting if the authors could say something about how these models deal with intransitive semantic similarities, e.g., with the similarities between 'river', 'bank', and 'bailout'. People like Tversky have advocated against the use of semantic-space models like NLMs because they cannot appropriately model intransitive similarities.\r\n\r\n- Instead of looking at binary question-answering performance, it may also be interesting to look whether a hitlist of answers contains the correct answer.\r\n\r\n- The number of self-citations seems somewhat excessive.\r\n\r\n- I tried to find reference [14] to see how it differs from the present paper, but I was not able to find it anywhere."}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer f5bf"], "writers": ["anonymous"]}
|
{
"criticism": 13,
"example": 4,
"importance_and_relevance": 4,
"materials_and_methods": 37,
"praise": 3,
"presentation_and_reporting": 12,
"results_and_discussion": 6,
"suggestion_and_solution": 9,
"total": 52
}
| 1.692308
| -22.312768
| 24.005076
| 1.762329
| 0.657661
| 0.070021
| 0.25
| 0.076923
| 0.076923
| 0.711538
| 0.057692
| 0.230769
| 0.115385
| 0.173077
|
{
"criticism": 0.25,
"example": 0.07692307692307693,
"importance_and_relevance": 0.07692307692307693,
"materials_and_methods": 0.7115384615384616,
"praise": 0.057692307692307696,
"presentation_and_reporting": 0.23076923076923078,
"results_and_discussion": 0.11538461538461539,
"suggestion_and_solution": 0.17307692307692307
}
| 1.692308
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
The authors propose two log-linear language models for learning real-valued vector representations of words. The models are designed to be simple and fast and are shown to be scalable to very large datasets. The resulting word embeddings are evaluated on a number of novel word similarity tasks, on which they perform at least as well as the embeddings obtained using a much slower neural language model.
The paper is mostly clear and well executed. Its main contributions are a demonstration of scalability of the proposed models and a sensible protocol for evaluating word similarity information captured by such embeddings. The experimental section is convincing.
The log-linear language models proposed are not quite as novel or uniquely scalable as the paper seems to imply though. Models of this type were introduced in [R1] and further developed in [15] and [R2]. The idea of speeding up such models by eliminating matrix multiplication when combining the representations of context words was already implemented in [15] and [R2]. For example, the training complexity of the log-linear HLBL model from [15] is the same as that of the Continuous Bag-of-Words models. The authors should explain how the proposed log-linear models relate to the existing ones and in what ways they are superior. Note that Table 3 does contain a result obtained by an existing log-bilinear model, HLBL, which according to [18] was the model used to produce the 'Mhih NNLM' embeddings. These embeddings seem to perform considerably better then the 'Turian NNLM' embeddings obtained with a nonlinear NNLM on the same dataset, though of course not as well as the embeddings induced on much larger datasets. This result actually strengthens the authors argument for using log-linear models by suggesting that even if one could train a slow nonlinear model on the same amount of data it might not be worth it as it will not necessarily produce superior word representations.
The discussion of techniques for speeding up training of neural language models is incomplete, as the authors do not mention sampling-based approaches such as importance sampling [R3] and noise-contrastive estimation [R2].
The paper is unclear about the objective used for model selection. Was it a language-modeling objective (e.g. perplexity) or accuracy on the word similarity tasks?
In the interests of precision, it would be good to include the equations defining the models in the paper.
In Section 3, it might be clearer to say that the models are trained to 'predict' words, not 'classify' them.
Finally, in Table 3 'Mhih NNLM' should probably read 'Mnih NNLM'.
References:
[R1] Mnih, A., & Hinton G. (2007). Three new graphical models for statistical language modelling. ICML 2007.
[R2] Mnih, A., & Teh, Y. W. (2012). A fast and simple algorithm for training neural probabilistic language models. ICML 2012.
[R3] Bengio, Y., & Senecal, J. S. (2008). Adaptive importance sampling to accelerate training of a neural probabilistic language model. IEEE Transactions on Neural Networks, 19(4), 713-722.
|
anonymous reviewer 13e8
| null | null |
{"id": "QDmFD7aPnX1h7", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1360857420000, "tmdate": 1360857420000, "ddate": null, "number": 9, "content": {"title": "review of Efficient Estimation of Word Representations in Vector Space", "review": "The authors propose two log-linear language models for learning real-valued vector representations of words. The models are designed to be simple and fast and are shown to be scalable to very large datasets. The resulting word embeddings are evaluated on a number of novel word similarity tasks, on which they perform at least as well as the embeddings obtained using a much slower neural language model.\r\n\r\nThe paper is mostly clear and well executed. Its main contributions are a demonstration of scalability of the proposed models and a sensible protocol for evaluating word similarity information captured by such embeddings. The experimental section is convincing.\r\n\r\nThe log-linear language models proposed are not quite as novel or uniquely scalable as the paper seems to imply though. Models of this type were introduced in [R1] and further developed in [15] and [R2]. The idea of speeding up such models by eliminating matrix multiplication when combining the representations of context words was already implemented in [15] and [R2]. For example, the training complexity of the log-linear HLBL model from [15] is the same as that of the Continuous Bag-of-Words models. The authors should explain how the proposed log-linear models relate to the existing ones and in what ways they are superior. Note that Table 3 does contain a result obtained by an existing log-bilinear model, HLBL, which according to [18] was the model used to produce the 'Mhih NNLM' embeddings. These embeddings seem to perform considerably better then the 'Turian NNLM' embeddings obtained with a nonlinear NNLM on the same dataset, though of course not as well as the embeddings induced on much larger datasets. This result actually strengthens the authors argument for using log-linear models by suggesting that even if one could train a slow nonlinear model on the same amount of data it might not be worth it as it will not necessarily produce superior word representations.\r\n\r\nThe discussion of techniques for speeding up training of neural language models is incomplete, as the authors do not mention sampling-based approaches such as importance sampling [R3] and noise-contrastive estimation [R2].\r\n\r\nThe paper is unclear about the objective used for model selection. Was it a language-modeling objective (e.g. perplexity) or accuracy on the word similarity tasks?\r\n\r\nIn the interests of precision, it would be good to include the equations defining the models in the paper.\r\n\r\nIn Section 3, it might be clearer to say that the models are trained to 'predict' words, not 'classify' them.\r\n\r\nFinally, in Table 3 'Mhih NNLM' should probably read 'Mnih NNLM'.\r\n\r\nReferences:\r\n[R1] Mnih, A., & Hinton G. (2007). Three new graphical models for statistical language modelling. ICML 2007.\r\n[R2] Mnih, A., & Teh, Y. W. (2012). A fast and simple algorithm for training neural probabilistic language models. ICML 2012.\r\n[R3] Bengio, Y., & Senecal, J. S. (2008). Adaptive importance sampling to accelerate training of a neural probabilistic language model. IEEE Transactions on Neural Networks, 19(4), 713-722."}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 13e8"], "writers": ["anonymous"]}
|
{
"criticism": 4,
"example": 3,
"importance_and_relevance": 1,
"materials_and_methods": 21,
"praise": 4,
"presentation_and_reporting": 11,
"results_and_discussion": 4,
"suggestion_and_solution": 4,
"total": 30
}
| 1.733333
| -2.827789
| 4.561122
| 1.770894
| 0.366316
| 0.03756
| 0.133333
| 0.1
| 0.033333
| 0.7
| 0.133333
| 0.366667
| 0.133333
| 0.133333
|
{
"criticism": 0.13333333333333333,
"example": 0.1,
"importance_and_relevance": 0.03333333333333333,
"materials_and_methods": 0.7,
"praise": 0.13333333333333333,
"presentation_and_reporting": 0.36666666666666664,
"results_and_discussion": 0.13333333333333333,
"suggestion_and_solution": 0.13333333333333333
}
| 1.733333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
In light of the authors' response I'm changing my score for the paper to Weak Reject.
|
anonymous reviewer 13e8
| null | null |
{"id": "OOksUbLar_UGE", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363350360000, "tmdate": 1363350360000, "ddate": null, "number": 11, "content": {"title": "", "review": "In light of the authors' response I'm changing my score for the paper to Weak Reject."}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 13e8"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 1
}
| 0
| -2.27267
| 2.27267
| 0.001132
| 0.009817
| 0.001132
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 0,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 0
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
This paper introduces a linear word vector learning model and shows that it performs better on a linear evaluation task than nonlinear models. While the new evaluation experiment is interesting the paper has too many issues in its current form.
One problem that has already been pointed out by the other reviewers is the lack of comparison and proper acknowledgment of previous models. The log-linear models have already been introduced by Mnih et al. and the averaging of context vectors (though of a larger context) has already been introduced by Huang et al. Both are cited but the model similarity is not mentioned.
The other main problem is that the evaluation metric clearly favors linear models since it checks for linear relationships. While it is an interesting finding that this holds for any of the models, this phenomenon does not necessarily need to lead to better performance. Other non-linear models may have encoded all this information too but not on a linear manifold. The whole new evaluation metric is just showing that linear models have more linear relationships. If this was combined with some performance increase on a real task then non-linearity for word vectors would have been convincingly questioned.
Do these relationships hold for even simpler models like LSA or tf-idf vectors?
Introduction:
Many very broad and general statements are made without any citations to back them up.
The motivation talks about how simpler bag of words models are not sufficient anymore to make significant progress... and then the rest of the paper introduces a simpler bag of words model and argues that it's better. The intro and the first paragraph of section 3 directly contradict themselves.
The other motivation that is mentioned is how useful for actual tasks word vectors can be. I agree but this is not shown. This paper would have been significantly stronger if the vectors from the proposed (not so new) model would have been compared on any of the standard evaluation metrics that have been used for these words. For instance: Turian et al used NER, Huang et al used human similarity judgments, the author himself used them for language modeling. Why not show improvements on any of these tasks?
LDA and LSA are missing citations.
Citation [14] which is in submission seems an important paper to back up some of the unsubstantiated claims of this paper but is not available.
The hidden layer in Collobert et al's word vectors is usually around 100, not between 500 to 1000 as the authors write.
Section 2.2 is impossible to follow for people not familiar with this line of work.
Section 4:
Why cosine distance? A comparison with Euclidean distance would be interesting, or should all word vectors be length-normalized?
The problem with synonyms in the evaluation seems somewhat important but is ignored.
The authors claim that their evaluation metric 'should be positively correlated with' 'certain applications'. That's yet another unsubstantiated claim that could be made much stronger with showing such a correlation on the above mentioned tasks.
Mnih is misspelled in table 3.
The comparisons are lacking consistency. All the models are trained on different corpora and have different dimensionality. Looking at the top 3 previous models (Mikolov 2x and Huang) there seems to be a clear correlation between vector size and overall performance. If one wants to make a convincing argument that the presented models are better, it would be important to show that using the same corpus.
Given that the overall accuracy is around 50%, the examples in table 5 must have been manually selected? If not, it would be great to know how they were selected.
|
anonymous reviewer 3c5e
| null | null |
{"id": "ELp1azAY4uaYz", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362415140000, "tmdate": 1362415140000, "ddate": null, "number": 3, "content": {"title": "review of Efficient Estimation of Word Representations in Vector Space", "review": "This paper introduces a linear word vector learning model and shows that it performs better on a linear evaluation task than nonlinear models. While the new evaluation experiment is interesting the paper has too many issues in its current form.\r\n\r\nOne problem that has already been pointed out by the other reviewers is the lack of comparison and proper acknowledgment of previous models. The log-linear models have already been introduced by Mnih et al. and the averaging of context vectors (though of a larger context) has already been introduced by Huang et al. Both are cited but the model similarity is not mentioned.\r\n\r\nThe other main problem is that the evaluation metric clearly favors linear models since it checks for linear relationships. While it is an interesting finding that this holds for any of the models, this phenomenon does not necessarily need to lead to better performance. Other non-linear models may have encoded all this information too but not on a linear manifold. The whole new evaluation metric is just showing that linear models have more linear relationships. If this was combined with some performance increase on a real task then non-linearity for word vectors would have been convincingly questioned.\r\nDo these relationships hold for even simpler models like LSA or tf-idf vectors?\r\n\r\nIntroduction:\r\nMany very broad and general statements are made without any citations to back them up. \r\nThe motivation talks about how simpler bag of words models are not sufficient anymore to make significant progress... and then the rest of the paper introduces a simpler bag of words model and argues that it's better. The intro and the first paragraph of section 3 directly contradict themselves.\r\n\r\nThe other motivation that is mentioned is how useful for actual tasks word vectors can be. I agree but this is not shown. This paper would have been significantly stronger if the vectors from the proposed (not so new) model would have been compared on any of the standard evaluation metrics that have been used for these words. For instance: Turian et al used NER, Huang et al used human similarity judgments, the author himself used them for language modeling. Why not show improvements on any of these tasks? \r\n\r\nLDA and LSA are missing citations.\r\n\r\nCitation [14] which is in submission seems an important paper to back up some of the unsubstantiated claims of this paper but is not available.\r\n\r\nThe hidden layer in Collobert et al's word vectors is usually around 100, not between 500 to 1000 as the authors write.\r\n\r\nSection 2.2 is impossible to follow for people not familiar with this line of work.\r\n\r\nSection 4:\r\nWhy cosine distance? A comparison with Euclidean distance would be interesting, or should all word vectors be length-normalized?\r\n\r\nThe problem with synonyms in the evaluation seems somewhat important but is ignored.\r\n\r\nThe authors claim that their evaluation metric 'should be positively correlated with' 'certain applications'. That's yet another unsubstantiated claim that could be made much stronger with showing such a correlation on the above mentioned tasks.\r\n\r\nMnih is misspelled in table 3.\r\n\r\nThe comparisons are lacking consistency. All the models are trained on different corpora and have different dimensionality. Looking at the top 3 previous models (Mikolov 2x and Huang) there seems to be a clear correlation between vector size and overall performance. If one wants to make a convincing argument that the presented models are better, it would be important to show that using the same corpus.\r\n\r\nGiven that the overall accuracy is around 50%, the examples in table 5 must have been manually selected? If not, it would be great to know how they were selected."}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 3c5e"], "writers": ["anonymous"]}
|
{
"criticism": 14,
"example": 0,
"importance_and_relevance": 4,
"materials_and_methods": 24,
"praise": 4,
"presentation_and_reporting": 12,
"results_and_discussion": 9,
"suggestion_and_solution": 8,
"total": 36
}
| 2.083333
| -6.265572
| 8.348905
| 2.126464
| 0.439222
| 0.043131
| 0.388889
| 0
| 0.111111
| 0.666667
| 0.111111
| 0.333333
| 0.25
| 0.222222
|
{
"criticism": 0.3888888888888889,
"example": 0,
"importance_and_relevance": 0.1111111111111111,
"materials_and_methods": 0.6666666666666666,
"praise": 0.1111111111111111,
"presentation_and_reporting": 0.3333333333333333,
"results_and_discussion": 0.25,
"suggestion_and_solution": 0.2222222222222222
}
| 2.083333
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
We have updated the paper (new version will be visible on Monday):
- added new results with comparison of models trained on the same data with the same dimensionality of the word vectors
- additional comparison on a task that was used previously for comparison of word vectors
- added citations, more discussion about the prior work
- new results with parallel training of the models on many machines
- new state of the art result on Microsoft Research Sentence Completion Challenge, using combination of RNNLMs and Skip-gram
- published the test set
We welcome discussion about the paper. The main contribution (that seems to have been missed by some of the reviews) is that we can use very shallow models to compute good vector representation of words. This can be very efficient, compared to currently popular model architectures.
As we are very interested in the deep learning, we are also interested in how this term is being used. Unfortunately, there is an increasing amount of work that tries to associate itself with deep learning, although it has nothing to do with it. According to Bengio+LeCun's paper 'Scaling learning algorithms towards AI', deep architectures should be capable of representing and learning complex functions, composed of simpler functions. The complex functions at the same time cannot be efficiently represented and learned by shallow architectures (basically those that have only 1 or 0 non-linearities). Thus, any paper that claims to be about 'deep learning' should first prove that the given performance cannot be achieved with a shallow model. This has been already shown for deep neural networks for speech recognition and vision problems (one hidden layer is not enough to reach the same performance that more hidden layers can achieve). However, when it comes to NLP, the only such result known to me are the Recurrent neural networks, that have been shown to outperform shallow feed-forward networks on some tasks in language modeling.
When it comes to learning continuous representations of words, such thorough comparison is missing. In our current paper, we actually show that there might be nothing deep about the continuous word vectors - one cannot simply add few hidden layers and label some technique 'deep' to gain attraction. Correct comparison with shallow techniques is necessary.
Hopefully, our paper will improve common understanding of what deep learning is about, and will help to keep the track towards the original goals. We did not write our opinion directly in the paper, as we believe it belongs more to the discussion part of the conference, where people can react to our claims.
Detailed responses are below:
Reviewer Anonymous 13e8:
The log-linear language models proposed are not quite as novel or uniquely scalable as the paper seems to imply though. Models of this type were introduced in [R1] and further developed in [15] and [R2].
- We have added the citations and some discussion; however, note that we directly follow model architecture proposed earlier, in 'T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno University of Technology, 2007.', plus the hierarchical softmax proposed in 'F. Morin, Y. Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS, 2005.'; the novelty of our current approach is in the new architectures that work significantly better than the previous ones (we have added this comparison in the new version of the paper), and the Huffman tree based hierarchical softmax.
For example, the training complexity of the log-linear HLBL model from [15] is the same as that of the Continuous Bag-of-Words models
- Assuming one will use diagonal weight matrices as is mentioned in [15], the computational complexity will be similar. We have added this information to the paper. Our proposed architectures are however easier to implementation than HLBL, and also it does not seem that we would obtain better vectors with HLBL (just by looking at the table with results - HLBL seems to have performance close to NNLM, ie. does not capture the semantic regularities in words as well as the Skip-gram). Moreover, I was confused about computational complexity of the hierarchical log-bilinear model: in [R2], it is reported that training time for model with 100 hidden units on the Penn Treebank setup is 1.5 hours; for our CBOW model it is a few seconds. So I don't know if author uses the diagonal weight matrices always or not.
Additionally, the perplexity results in [R2] are rather weak, even worse than simple trigram model. My explanation of HLBL performance is this: the model does not have non-linearities, thus, it cannot model N-grams. An example of such feature is 'if word X and Y occurred after each other, predict word Z'; the linear model can only represent features such as 'X predicts Z, Y predicts Z'. This means that the HLBL language model will probably not scale up well to large data sets, as it can model only patterns such as bigram, skip-1-bigram, skip-2-bigram etc. (and will thus behave slightly as a cache model, and will improve with longer context - which was actually observed in [R1] and [15]). Also note that the comparison in [R1] with NNLM is flawed, as the result from (Bengio, 2003) is from model that was small and not fully trained (due to computational complexity).
To conclude, the HLBL is very interesting model by itself, but we have chosen simpler architecture that follows our earlier work that aims to solve simpler problem - we do not try to learn a language model, just the word vectors. Detailed discussion about HLBL is out of scope of our current paper.
The discussion of techniques for speeding up training of neural language models is incomplete, as the authors do not mention sampling-based approaches such as importance sampling [R3] and noise-contrastive estimation [R2].
- As our paper is already quite long, we do not plan to discuss speedup techniques that we did not use in our work. It can be a topic for future work.
The paper is unclear about the objective used for model selection. Was it a language-modeling objective (e.g. perplexity) or accuracy on the word similarity tasks?
- The cost function that we try to minimize during training is the usual one (cross-entropy), however we choose the best models based on the performance on the word similarity task.
In the interests of precision, it would be good to include the equations defining the models in the paper.
- Unfortunately the paper is already too long, so we just refer to prior work where similar models are properly defined. If we will extend the paper in the future, we will add the equations.
Reviewer Anonymous f5bf:
Concern (1): We added a table with comparison of models trained on the same data. The results strongly support our previous claims (we had some of these results already before the first version of the paper was submitted, but due to lack of time these did not appear in the paper).
(2): We added a Figure that illustrates the topology of the models, and kept the equations as we consider them important.
(3): No, see the equations and Table 4.
The paper contains numerous typos and small errors. Specifically, I noticed a lot of missing articles throughout the paper.
- We hope that small errors and missing articles are not the most important issue in research papers.
'For many tasks, the amount of … focus on more advanced techniques.'
- The introduction was updated.
What about the fact that semantic similarities are intransitive? (Tversky's famous example of the similarity between China and North Korea.)
- We are not aware of famous example of Tversky. Please provide reference.
'Moreover, we discuss hyper-parameter selection … millions of words in the vocabulary.' -> I fail to see the relation between hyperparameter selection and training speed. Moreover, the paper actually does not say anything about hyperparameter selection! It only states the initial learning rate is 0.025, and that is linearly decreased (but not how fast).
- Note that structure and size of the model is also hyper-parameter, as well as fraction of used training data; it is not just the learning rate. However, we simplified the text in the paper.
Table 2: It appears that the performance of the CBOW model is still improving. How does it perform when D = 1000 or 2000? Why not make a learning curve here (plot performance as a function of D or of training time)?
- That is an interesting experiment that we actually performed, but it would not fit into the paper.
Table 3: Why is 'our NNLM' so much better than the other NNLMs? Just because it was trained on more data? What model is implemented by 'our NNLM' anyway?
- Because it was trained in parallel using hundreds of CPUs. It is a feedforward NNLM.
Tables 3 and 4: Why is the NNLM trained on 6 billion examples and the others on just 0.7 or 1.6 billion examples? The others should be faster, so easier to train on more data, right?
- We did not have these numbers during submission of the paper, but these results were added to the actual version of the paper. The new model architectures are faster for training than NNLM, and provide better results in our word similarity tasks.
It would be interesting if the authors could say something about how these models deal with intransitive semantic similarities, e.g., with the similarities between 'river', 'bank', and 'bailout'. People like Tversky have advocated against the use of semantic-space models like NLMs because they cannot appropriately model intransitive similarities.
- We are not aware of Tversky's arguments.
Instead of looking at binary question-answering performance, it may also be interesting to look whether a hitlist of answers contains the correct answer.
- We performed this experiment as well; of course, top-5 accuracy is much better than top-1. However, it would be confusing to add these results into the paper (too many numbers).
The number of self-citations seems somewhat excessive.
- We added more citations.
I tried to find reference [14] to see how it differs from the present paper, but I was not able to find it anywhere.
- This paper should become available on-line soon.
Reviewer Anonymous 3c5e:
One problem that has already been pointed out by the other reviewers is the lack of comparison and proper acknowledgment of previous models. The log-linear models have already been introduced by Mnih et al. and the averaging of context vectors (though of a larger context) has already been introduced by Huang et al. Both are cited but the model similarity is not mentioned.
- As we explained earlier, we followed our own work that was published before these papers. We aim to learn word vectors, not language models. Note also that log-linear models and the bag-of-words representation are both very general and well known concepts, not unique to neural network language modeling. Also, Mnih introduced log-bilinear language model, not log-linear models - please read: http://en.wikipedia.org/wiki/Log-linear_model
and http://en.wikipedia.org/wiki/Bag-of-words_model
The other main problem is that the evaluation metric clearly favors linear models since it checks for linear relationships. While it is an interesting finding that this holds for any of the models, this phenomenon does not necessarily need to lead to better performance. Other non-linear models may have encoded all this information too but not on a linear manifold. The whole new evaluation metric is just showing that linear models have more linear relationships. If this was combined with some performance increase on a real task then non-linearity for word vectors would have been convincingly questioned.
- Note that projection layer in NNLM also does not have any non-linearity; Mnih's HLBL model does not have any non-linearity even in the hidden layer. We added more results in the paper, however can you be more specific what 'real task' means? The tasks we used are perfectly valid for a wide range of applications.
Do these relationships hold for even simpler models like LSA or tf-idf vectors?
- This is discussed in another paper. In general, linear operations do not work well for LSA vectors.
Many very broad and general statements are made without any citations to back them up.
- Please be more specific.
The motivation talks about how simpler bag of words models are not sufficient anymore to make significant progress... and then the rest of the paper introduces a simpler bag of words model and argues that it's better. The intro and the first paragraph of section 3 directly contradict themselves.
- This part of the paper was rewritten. However, N-gram models are mentioned in the introduction; not bag-of-words models. Also note that the paper is about computationally efficient continuous representations of words. We do not introduce simple bag of words model, but log-linear model with distributed representations of bag-of-words features (in case of CBOW model).
The other motivation that is mentioned is how useful for actual tasks word vectors can be. I agree but this is not shown. This paper would have been significantly stronger if the vectors from the proposed (not so new) model would have been compared on any of the standard evaluation metrics that have been used for these words. For instance: Turian et al used NER, Huang et al used human similarity judgments, the author himself used them for language modeling. Why not show improvements on any of these tasks?
- We believe that our task is very interesting by itself. The applications are very straightforward.
LDA and LSA are missing citations.
- We are not using LDA nor LSA in our paper. Moreover, these concepts are generally very well known.
The hidden layer in Collobert et al's word vectors is usually around 100, not between 500 to 1000 as the authors write.
- We do not claim that hidden layer in Collobert et al's word vectors is usually between 500-1000. We actually point out that 50 and 100-dimensional word vectors have insufficient capacity, and the same holds for size of the hidden layer. The 500 - 2000 dimensional hidden layers are mentioned for NNLMs. We also provide reference to our prior paper that shows empirically that you have to use more than 100 neurons in the hidden layer, unless your training data is tiny ('Strategies for training large scale neural network language models').
Section 2.2 is impossible to follow for people not familiar with this line of work.
- This section is not crucial for understanding of the paper. However, if you are interested in this part, we provided several references for that work.
Why cosine distance? A comparison with Euclidean distance would be interesting, or should all word vectors be length-normalized?
- We use normalized word vectors. Empirically, this works better.
The authors claim that their evaluation metric 'should be positively correlated with' 'certain applications'. That's yet another unsubstantiated claim that could be made much stronger with showing such a correlation on the above mentioned tasks.
- While we have also results on another tasks, the point of this paper is not to describe all possible applications, but to introduce techniques for efficient estimation of word vectors from large amounts of data.
The comparisons are lacking consistency. All the models are trained on different corpora and have different dimensionality. Looking at the top 3 previous models (Mikolov 2x and Huang) there seems to be a clear correlation between vector size and overall performance. If one wants to make a convincing argument that the presented models are better, it would be important to show that using the same corpus.
- Such comparison was added to the new version of the paper.
Given that the overall accuracy is around 50%, the examples in table 5 must have been manually selected? If not, it would be great to know how they were selected.
- Maybe this will sound surprising, but examples in Table 5 have accuracy only about 60%. We did choose several easy examples from our Semantic-Syntactic test set (so that it would be easy to judge correctness for the readers), and some manually by trying out what the vectors can represent. Note that we did not simply hand-pick the best examples; this is the real performance.
|
Tomas Mikolov
| null | null |
{"id": "C8Vn84fqSG8qa", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362716940000, "tmdate": 1362716940000, "ddate": null, "number": 2, "content": {"title": "", "review": "We have updated the paper (new version will be visible on Monday):\r\n\r\n- added new results with comparison of models trained on the same data with the same dimensionality of the word vectors\r\n\r\n- additional comparison on a task that was used previously for comparison of word vectors\r\n\r\n- added citations, more discussion about the prior work\r\n\r\n- new results with parallel training of the models on many machines\r\n\r\n- new state of the art result on Microsoft Research Sentence Completion Challenge, using combination of RNNLMs and Skip-gram\r\n\r\n- published the test set\r\n\r\n\r\nWe welcome discussion about the paper. The main contribution (that seems to have been missed by some of the reviews) is that we can use very shallow models to compute good vector representation of words. This can be very efficient, compared to currently popular model architectures.\r\n\r\nAs we are very interested in the deep learning, we are also interested in how this term is being used. Unfortunately, there is an increasing amount of work that tries to associate itself with deep learning, although it has nothing to do with it. According to Bengio+LeCun's paper 'Scaling learning algorithms towards AI', deep architectures should be capable of representing and learning complex functions, composed of simpler functions. The complex functions at the same time cannot be efficiently represented and learned by shallow architectures (basically those that have only 1 or 0 non-linearities). Thus, any paper that claims to be about 'deep learning' should first prove that the given performance cannot be achieved with a shallow model. This has been already shown for deep neural networks for speech recognition and vision problems (one hidden layer is not enough to reach the same performance that more hidden layers can achieve). However, when it comes to NLP, the only such result known to me are the Recurrent neural networks, that have been shown to outperform shallow feed-forward networks on some tasks in language modeling.\r\n\r\nWhen it comes to learning continuous representations of words, such thorough comparison is missing. In our current paper, we actually show that there might be nothing deep about the continuous word vectors - one cannot simply add few hidden layers and label some technique 'deep' to gain attraction. Correct comparison with shallow techniques is necessary.\r\n\r\nHopefully, our paper will improve common understanding of what deep learning is about, and will help to keep the track towards the original goals. We did not write our opinion directly in the paper, as we believe it belongs more to the discussion part of the conference, where people can react to our claims.\r\n\r\n\r\nDetailed responses are below:\r\n\r\nReviewer Anonymous 13e8:\r\n\r\nThe log-linear language models proposed are not quite as novel or uniquely scalable as the paper seems to imply though. Models of this type were introduced in [R1] and further developed in [15] and [R2].\r\n\r\n- We have added the citations and some discussion; however, note that we directly follow model architecture proposed earlier, in 'T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno University of Technology, 2007.', plus the hierarchical softmax proposed in 'F. Morin, Y. Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS, 2005.'; the novelty of our current approach is in the new architectures that work significantly better than the previous ones (we have added this comparison in the new version of the paper), and the Huffman tree based hierarchical softmax.\r\n\r\n\r\nFor example, the training complexity of the log-linear HLBL model from [15] is the same as that of the Continuous Bag-of-Words models\r\n\r\n- Assuming one will use diagonal weight matrices as is mentioned in [15], the computational complexity will be similar. We have added this information to the paper. Our proposed architectures are however easier to implementation than HLBL, and also it does not seem that we would obtain better vectors with HLBL (just by looking at the table with results - HLBL seems to have performance close to NNLM, ie. does not capture the semantic regularities in words as well as the Skip-gram). Moreover, I was confused about computational complexity of the hierarchical log-bilinear model: in [R2], it is reported that training time for model with 100 hidden units on the Penn Treebank setup is 1.5 hours; for our CBOW model it is a few seconds. So I don't know if author uses the diagonal weight matrices always or not.\r\n\r\nAdditionally, the perplexity results in [R2] are rather weak, even worse than simple trigram model. My explanation of HLBL performance is this: the model does not have non-linearities, thus, it cannot model N-grams. An example of such feature is 'if word X and Y occurred after each other, predict word Z'; the linear model can only represent features such as 'X predicts Z, Y predicts Z'. This means that the HLBL language model will probably not scale up well to large data sets, as it can model only patterns such as bigram, skip-1-bigram, skip-2-bigram etc. (and will thus behave slightly as a cache model, and will improve with longer context - which was actually observed in [R1] and [15]). Also note that the comparison in [R1] with NNLM is flawed, as the result from (Bengio, 2003) is from model that was small and not fully trained (due to computational complexity).\r\n\r\nTo conclude, the HLBL is very interesting model by itself, but we have chosen simpler architecture that follows our earlier work that aims to solve simpler problem - we do not try to learn a language model, just the word vectors. Detailed discussion about HLBL is out of scope of our current paper.\r\n\r\n\r\nThe discussion of techniques for speeding up training of neural language models is incomplete, as the authors do not mention sampling-based approaches such as importance sampling [R3] and noise-contrastive estimation [R2].\r\n\r\n- As our paper is already quite long, we do not plan to discuss speedup techniques that we did not use in our work. It can be a topic for future work.\r\n\r\n\r\nThe paper is unclear about the objective used for model selection. Was it a language-modeling objective (e.g. perplexity) or accuracy on the word similarity tasks?\r\n\r\n- The cost function that we try to minimize during training is the usual one (cross-entropy), however we choose the best models based on the performance on the word similarity task.\r\n\r\n\r\nIn the interests of precision, it would be good to include the equations defining the models in the paper.\r\n\r\n- Unfortunately the paper is already too long, so we just refer to prior work where similar models are properly defined. If we will extend the paper in the future, we will add the equations.\r\n\r\n\r\nReviewer Anonymous f5bf:\r\n\r\nConcern (1): We added a table with comparison of models trained on the same data. The results strongly support our previous claims (we had some of these results already before the first version of the paper was submitted, but due to lack of time these did not appear in the paper).\r\n\r\n(2): We added a Figure that illustrates the topology of the models, and kept the equations as we consider them important.\r\n\r\n(3): No, see the equations and Table 4.\r\n\r\n\r\nThe paper contains numerous typos and small errors. Specifically, I noticed a lot of missing articles throughout the paper.\r\n\r\n- We hope that small errors and missing articles are not the most important issue in research papers.\r\n\r\n\r\n'For many tasks, the amount of \u2026 focus on more advanced techniques.'\r\n\r\n- The introduction was updated.\r\n\r\n\r\nWhat about the fact that semantic similarities are intransitive? (Tversky's famous example of the similarity between China and North Korea.)\r\n\r\n- We are not aware of famous example of Tversky. Please provide reference.\r\n\r\n\r\n'Moreover, we discuss hyper-parameter selection \u2026 millions of words in the vocabulary.' -> I fail to see the relation between hyperparameter selection and training speed. Moreover, the paper actually does not say anything about hyperparameter selection! It only states the initial learning rate is 0.025, and that is linearly decreased (but not how fast).\r\n\r\n- Note that structure and size of the model is also hyper-parameter, as well as fraction of used training data; it is not just the learning rate. However, we simplified the text in the paper.\r\n\r\n\r\nTable 2: It appears that the performance of the CBOW model is still improving. How does it perform when D = 1000 or 2000? Why not make a learning curve here (plot performance as a function of D or of training time)?\r\n\r\n- That is an interesting experiment that we actually performed, but it would not fit into the paper.\r\n\r\n\r\nTable 3: Why is 'our NNLM' so much better than the other NNLMs? Just because it was trained on more data? What model is implemented by 'our NNLM' anyway? \r\n\r\n- Because it was trained in parallel using hundreds of CPUs. It is a feedforward NNLM.\r\n\r\n\r\nTables 3 and 4: Why is the NNLM trained on 6 billion examples and the others on just 0.7 or 1.6 billion examples? The others should be faster, so easier to train on more data, right?\r\n\r\n- We did not have these numbers during submission of the paper, but these results were added to the actual version of the paper. The new model architectures are faster for training than NNLM, and provide better results in our word similarity tasks.\r\n\r\n\r\nIt would be interesting if the authors could say something about how these models deal with intransitive semantic similarities, e.g., with the similarities between 'river', 'bank', and 'bailout'. People like Tversky have advocated against the use of semantic-space models like NLMs because they cannot appropriately model intransitive similarities.\r\n\r\n- We are not aware of Tversky's arguments.\r\n\r\n\r\nInstead of looking at binary question-answering performance, it may also be interesting to look whether a hitlist of answers contains the correct answer.\r\n\r\n- We performed this experiment as well; of course, top-5 accuracy is much better than top-1. However, it would be confusing to add these results into the paper (too many numbers).\r\n\r\n\r\nThe number of self-citations seems somewhat excessive.\r\n\r\n- We added more citations.\r\n\r\n\r\nI tried to find reference [14] to see how it differs from the present paper, but I was not able to find it anywhere.\r\n\r\n- This paper should become available on-line soon.\r\n\r\n\r\nReviewer Anonymous 3c5e:\r\n\r\nOne problem that has already been pointed out by the other reviewers is the lack of comparison and proper acknowledgment of previous models. The log-linear models have already been introduced by Mnih et al. and the averaging of context vectors (though of a larger context) has already been introduced by Huang et al. Both are cited but the model similarity is not mentioned.\r\n\r\n- As we explained earlier, we followed our own work that was published before these papers. We aim to learn word vectors, not language models. Note also that log-linear models and the bag-of-words representation are both very general and well known concepts, not unique to neural network language modeling. Also, Mnih introduced log-bilinear language model, not log-linear models - please read: http://en.wikipedia.org/wiki/Log-linear_model\r\n\r\nand http://en.wikipedia.org/wiki/Bag-of-words_model\r\n\r\n\r\nThe other main problem is that the evaluation metric clearly favors linear models since it checks for linear relationships. While it is an interesting finding that this holds for any of the models, this phenomenon does not necessarily need to lead to better performance. Other non-linear models may have encoded all this information too but not on a linear manifold. The whole new evaluation metric is just showing that linear models have more linear relationships. If this was combined with some performance increase on a real task then non-linearity for word vectors would have been convincingly questioned.\r\n\r\n- Note that projection layer in NNLM also does not have any non-linearity; Mnih's HLBL model does not have any non-linearity even in the hidden layer. We added more results in the paper, however can you be more specific what 'real task' means? The tasks we used are perfectly valid for a wide range of applications.\r\n\r\n\r\nDo these relationships hold for even simpler models like LSA or tf-idf vectors?\r\n\r\n- This is discussed in another paper. In general, linear operations do not work well for LSA vectors.\r\n\r\n\r\nMany very broad and general statements are made without any citations to back them up. \r\n\r\n- Please be more specific.\r\n\r\n\r\nThe motivation talks about how simpler bag of words models are not sufficient anymore to make significant progress... and then the rest of the paper introduces a simpler bag of words model and argues that it's better. The intro and the first paragraph of section 3 directly contradict themselves.\r\n\r\n- This part of the paper was rewritten. However, N-gram models are mentioned in the introduction; not bag-of-words models. Also note that the paper is about computationally efficient continuous representations of words. We do not introduce simple bag of words model, but log-linear model with distributed representations of bag-of-words features (in case of CBOW model).\r\n\r\n\r\nThe other motivation that is mentioned is how useful for actual tasks word vectors can be. I agree but this is not shown. This paper would have been significantly stronger if the vectors from the proposed (not so new) model would have been compared on any of the standard evaluation metrics that have been used for these words. For instance: Turian et al used NER, Huang et al used human similarity judgments, the author himself used them for language modeling. Why not show improvements on any of these tasks? \r\n\r\n- We believe that our task is very interesting by itself. The applications are very straightforward.\r\n\r\n\r\nLDA and LSA are missing citations.\r\n\r\n- We are not using LDA nor LSA in our paper. Moreover, these concepts are generally very well known.\r\n\r\n\r\nThe hidden layer in Collobert et al's word vectors is usually around 100, not between 500 to 1000 as the authors write.\r\n\r\n- We do not claim that hidden layer in Collobert et al's word vectors is usually between 500-1000. We actually point out that 50 and 100-dimensional word vectors have insufficient capacity, and the same holds for size of the hidden layer. The 500 - 2000 dimensional hidden layers are mentioned for NNLMs. We also provide reference to our prior paper that shows empirically that you have to use more than 100 neurons in the hidden layer, unless your training data is tiny ('Strategies for training large scale neural network language models').\r\n\r\n\r\nSection 2.2 is impossible to follow for people not familiar with this line of work.\r\n\r\n- This section is not crucial for understanding of the paper. However, if you are interested in this part, we provided several references for that work.\r\n\r\n\r\nWhy cosine distance? A comparison with Euclidean distance would be interesting, or should all word vectors be length-normalized?\r\n\r\n- We use normalized word vectors. Empirically, this works better.\r\n\r\n\r\nThe authors claim that their evaluation metric 'should be positively correlated with' 'certain applications'. That's yet another unsubstantiated claim that could be made much stronger with showing such a correlation on the above mentioned tasks.\r\n\r\n- While we have also results on another tasks, the point of this paper is not to describe all possible applications, but to introduce techniques for efficient estimation of word vectors from large amounts of data.\r\n\r\n\r\nThe comparisons are lacking consistency. All the models are trained on different corpora and have different dimensionality. Looking at the top 3 previous models (Mikolov 2x and Huang) there seems to be a clear correlation between vector size and overall performance. If one wants to make a convincing argument that the presented models are better, it would be important to show that using the same corpus.\r\n\r\n- Such comparison was added to the new version of the paper.\r\n\r\n\r\nGiven that the overall accuracy is around 50%, the examples in table 5 must have been manually selected? If not, it would be great to know how they were selected.\r\n\r\n- Maybe this will sound surprising, but examples in Table 5 have accuracy only about 60%. We did choose several easy examples from our Semantic-Syntactic test set (so that it would be easy to judge correctness for the readers), and some manually by trying out what the vectors can represent. Note that we did not simply hand-pick the best examples; this is the real performance."}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["Tomas Mikolov"], "writers": ["anonymous"]}
|
{
"criticism": 43,
"example": 8,
"importance_and_relevance": 15,
"materials_and_methods": 82,
"praise": 10,
"presentation_and_reporting": 59,
"results_and_discussion": 29,
"suggestion_and_solution": 29,
"total": 152
}
| 1.809211
| -303.123114
| 304.932325
| 1.990204
| 1.625794
| 0.180994
| 0.282895
| 0.052632
| 0.098684
| 0.539474
| 0.065789
| 0.388158
| 0.190789
| 0.190789
|
{
"criticism": 0.28289473684210525,
"example": 0.05263157894736842,
"importance_and_relevance": 0.09868421052631579,
"materials_and_methods": 0.5394736842105263,
"praise": 0.06578947368421052,
"presentation_and_reporting": 0.3881578947368421,
"results_and_discussion": 0.19078947368421054,
"suggestion_and_solution": 0.19078947368421054
}
| 1.809211
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
It is really unfortunate that the responding author seems to care
solely about every possible tweak to his model and combinations of his
models but shows a strong disregard for a proper scientific comparison
that would show what's really the underlying reason for the increase
in accuracy on (again) his own new task. For all we know, some of the
word vectors and models that are being compared to in table 4 may have
been trained on datasets that didn't even include the terms used in
the evaluation, or they may have been very rare in that corpus.
The models compared in table 4 still all have different word vector
sizes and are trained on different datasets, despite the clear
importance of word vector size and dataset size. Maybe the
hierarchical softmax on any of the existing models trained on the same
dataset would yield the same performance? There's no way of knowing if
this paper introduced a new model that works better or just a new
training dataset (which won't be published) or just a well selected
combination of existing methods.
The authors write that there are many obvious real tasks that their
word vectors should help but don't show or mention any. NER has been
used to compare word vectors and there are standard datasets out there
for a comparison on which many people train and test. There are human
similarity judgments tasks and datasets that several word vectors have
been compared on. Again, the author seems to prefer to ignore all but
his own models, dataset and tasks. It is still not clear to me what
part of the model gives the performance increase. Is it the top layer
task or is it the averaging of word vectors. Again, averaging word
vectors has already been done as part of the model of Huang et al.. A
link to a wikipedia article by the author is not as strong as an
argument as showing equations that point to the actual difference.
After a discussion among the reviewers, we unanimously feel that the revised version of paper and the accompanying rebuttal do not resolve many of the issues raised by the reviewers, and many of the reviewers' questions (e.g., on which models include nonlinearities) remain unanswered.
For instance, they say that the projection layer in a NNLM has no
nonlinearity but that was not the point, the next layer has one and
from the fuzzy definitions it seems like the proposed model does not.
Does that mean we could just get rid of the non-linearity of the
vector averaging part of Huang's model and get the same performance?
LDA might be in fashion now but papers in high quality conferences are
supposed to be understood in the future as well when some models may
not be so obviously known anymore.
The figure is much less clear in describing the model than the
equations all three reviewers asked for.
Again, there is one interesting bit in here which is the new
evaluation metric (which may or may not be introduced in reference
[14] soon) and the fact that any of these models capture these
relationships linearly. Unfortunately, the entire comparison to
previous work (table 4 and the writing) is unscientific and sloppy.
Furthermore, the possibly new models are not clearly enough defined by
their equations.
It is generally unclear where the improvements are coming from.
We hope the authors will clean up the writing and include proper
comparisons for a future submission.
|
anonymous reviewer 3c5e
| null | null |
{"id": "6NMO6i-9pXN8q", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363602720000, "tmdate": 1363602720000, "ddate": null, "number": 6, "content": {"title": "", "review": "It is really unfortunate that the responding author seems to care\r\nsolely about every possible tweak to his model and combinations of his\r\nmodels but shows a strong disregard for a proper scientific comparison\r\nthat would show what's really the underlying reason for the increase\r\nin accuracy on (again) his own new task. For all we know, some of the\r\nword vectors and models that are being compared to in table 4 may have\r\nbeen trained on datasets that didn't even include the terms used in\r\nthe evaluation, or they may have been very rare in that corpus.\r\nThe models compared in table 4 still all have different word vector\r\nsizes and are trained on different datasets, despite the clear\r\nimportance of word vector size and dataset size. Maybe the\r\nhierarchical softmax on any of the existing models trained on the same\r\ndataset would yield the same performance? There's no way of knowing if\r\nthis paper introduced a new model that works better or just a new\r\ntraining dataset (which won't be published) or just a well selected\r\ncombination of existing methods.\r\n\r\nThe authors write that there are many obvious real tasks that their\r\nword vectors should help but don't show or mention any. NER has been\r\nused to compare word vectors and there are standard datasets out there\r\nfor a comparison on which many people train and test. There are human\r\nsimilarity judgments tasks and datasets that several word vectors have\r\nbeen compared on. Again, the author seems to prefer to ignore all but\r\nhis own models, dataset and tasks. It is still not clear to me what\r\npart of the model gives the performance increase. Is it the top layer\r\ntask or is it the averaging of word vectors. Again, averaging word\r\nvectors has already been done as part of the model of Huang et al.. A\r\nlink to a wikipedia article by the author is not as strong as an\r\nargument as showing equations that point to the actual difference.\r\n\r\nAfter a discussion among the reviewers, we unanimously feel that the revised version of paper and the accompanying rebuttal do not resolve many of the issues raised by the reviewers, and many of the reviewers' questions (e.g., on which models include nonlinearities) remain unanswered.\r\nFor instance, they say that the projection layer in a NNLM has no\r\nnonlinearity but that was not the point, the next layer has one and\r\nfrom the fuzzy definitions it seems like the proposed model does not.\r\nDoes that mean we could just get rid of the non-linearity of the\r\nvector averaging part of Huang's model and get the same performance?\r\nLDA might be in fashion now but papers in high quality conferences are\r\nsupposed to be understood in the future as well when some models may\r\nnot be so obviously known anymore.\r\n\r\nThe figure is much less clear in describing the model than the\r\nequations all three reviewers asked for.\r\n\r\nAgain, there is one interesting bit in here which is the new\r\nevaluation metric (which may or may not be introduced in reference\r\n[14] soon) and the fact that any of these models capture these\r\nrelationships linearly. Unfortunately, the entire comparison to\r\nprevious work (table 4 and the writing) is unscientific and sloppy.\r\nFurthermore, the possibly new models are not clearly enough defined by\r\ntheir equations.\r\n\r\nIt is generally unclear where the improvements are coming from.\r\nWe hope the authors will clean up the writing and include proper\r\ncomparisons for a future submission."}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 3c5e"], "writers": ["anonymous"]}
|
{
"criticism": 11,
"example": 1,
"importance_and_relevance": 2,
"materials_and_methods": 19,
"praise": 1,
"presentation_and_reporting": 9,
"results_and_discussion": 4,
"suggestion_and_solution": 2,
"total": 22
}
| 2.227273
| 0.948896
| 1.278377
| 2.268101
| 0.398978
| 0.040828
| 0.5
| 0.045455
| 0.090909
| 0.863636
| 0.045455
| 0.409091
| 0.181818
| 0.090909
|
{
"criticism": 0.5,
"example": 0.045454545454545456,
"importance_and_relevance": 0.09090909090909091,
"materials_and_methods": 0.8636363636363636,
"praise": 0.045454545454545456,
"presentation_and_reporting": 0.4090909090909091,
"results_and_discussion": 0.18181818181818182,
"suggestion_and_solution": 0.09090909090909091
}
| 2.227273
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
idpCdOWtqXd60
|
Efficient Estimation of Word Representations in Vector Space
|
We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.
|
Efficient Estimation of Word Representations in
Vector Space
Tomas Mikolov
Google Inc., Mountain View, CA
tmikolov@google.com
Kai Chen
Google Inc., Mountain View, CA
kaichen@google.com
Greg Corrado
Google Inc., Mountain View, CA
gcorrado@google.com
Jeffrey Dean
Google Inc., Mountain View, CA
jeff@google.com
Abstract
We propose two novel model architectures for computing continuous vector repre-
sentations of words from very large data sets. The quality of these representations
is measured in a word similarity task, and the results are compared to the previ-
ously best performing techniques based on different types of neural networks. We
observe large improvements in accuracy at much lower computational cost, i.e. it
takes less than a day to learn high quality word vectors from a 1.6 billion words
data set. Furthermore, we show that these vectors provide state-of-the-art perfor-
mance on our test set for measuring syntactic and semantic word similarities.
1 Introduction
Many current NLP systems and techniques treat words as atomic units - there is no notion of similar-
ity between words, as these are represented as indices in a vocabulary. This choice has several good
reasons - simplicity, robustness and the observation that simple models trained on huge amounts of
data outperform complex systems trained on less data. An example is the popular N-gram model
used for statistical language modeling - today, it is possible to train N-grams on virtually all available
data (trillions of words [3]).
However, the simple techniques are at their limits in many tasks. For example, the amount of
relevant in-domain data for automatic speech recognition is limited - the performance is usually
dominated by the size of high quality transcribed speech data (often just millions of words). In
machine translation, the existing corpora for many languages contain only a few billions of words
or less. Thus, there are situations where simple scaling up of the basic techniques will not result in
any significant progress, and we have to focus on more advanced techniques.
With progress of machine learning techniques in recent years, it has become possible to train more
complex models on much larger data set, and they typically outperform the simple models. Probably
the most successful concept is to use distributed representations of words [10]. For example, neural
network based language models significantly outperform N-gram models [1, 27, 17].
1.1 Goals of the Paper
The main goal of this paper is to introduce techniques that can be used for learning high-quality word
vectors from huge data sets with billions of words, and with millions of words in the vocabulary. As
far as we know, none of the previously proposed architectures has been successfully trained on more
1
arXiv:1301.3781v3 [cs.CL] 7 Sep 2013
than a few hundred of millions of words, with a modest dimensionality of the word vectors between
50 - 100.
We use recently proposed techniques for measuring the quality of the resulting vector representa-
tions, with the expectation that not only will similar words tend to be close to each other, but that
words can have multiple degrees of similarity [20]. This has been observed earlier in the context
of inflectional languages - for example, nouns can have multiple word endings, and if we search for
similar words in a subspace of the original vector space, it is possible to find words that have similar
endings [13, 14].
Somewhat surprisingly, it was found that similarity of word representations goes beyond simple
syntactic regularities. Using a word offset technique where simple algebraic operations are per-
formed on the word vectors, it was shown for example that vector(”King”) - vector(”Man”) + vec-
tor(”Woman”) results in a vector that is closest to the vector representation of the wordQueen [20].
In this paper, we try to maximize accuracy of these vector operations by developing new model
architectures that preserve the linear regularities among words. We design a new comprehensive test
set for measuring both syntactic and semantic regularities 1, and show that many such regularities
can be learned with high accuracy. Moreover, we discuss how training time and accuracy depends
on the dimensionality of the word vectors and on the amount of the training data.
1.2 Previous Work
Representation of words as continuous vectors has a long history [10, 26, 8]. A very popular model
architecture for estimating neural network language model (NNLM) was proposed in [1], where a
feedforward neural network with a linear projection layer and a non-linear hidden layer was used to
learn jointly the word vector representation and a statistical language model. This work has been
followed by many others.
Another interesting architecture of NNLM was presented in [13, 14], where the word vectors are
first learned using neural network with a single hidden layer. The word vectors are then used to train
the NNLM. Thus, the word vectors are learned even without constructing the full NNLM. In this
work, we directly extend this architecture, and focus just on the first step where the word vectors are
learned using a simple model.
It was later shown that the word vectors can be used to significantly improve and simplify many
NLP applications [4, 5, 29]. Estimation of the word vectors itself was performed using different
model architectures and trained on various corpora [4, 29, 23, 19, 9], and some of the resulting word
vectors were made available for future research and comparison2. However, as far as we know, these
architectures were significantly more computationally expensive for training than the one proposed
in [13], with the exception of certain version of log-bilinear model where diagonal weight matrices
are used [23].
2 Model Architectures
Many different types of models were proposed for estimating continuous representations of words,
including the well-known Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA).
In this paper, we focus on distributed representations of words learned by neural networks, as it was
previously shown that they perform significantly better than LSA for preserving linear regularities
among words [20, 31]; LDA moreover becomes computationally very expensive on large data sets.
Similar to [18], to compare different model architectures we define first the computational complex-
ity of a model as the number of parameters that need to be accessed to fully train the model. Next,
we will try to maximize the accuracy, while minimizing the computational complexity.
1The test set is available at www.fit.vutbr.cz/˜imikolov/rnnlm/word-test.v1.txt
2http://ronan.collobert.com/senna/
http://metaoptimize.com/projects/wordreprs/
http://www.fit.vutbr.cz/˜imikolov/rnnlm/
http://ai.stanford.edu/˜ehhuang/
2
For all the following models, the training complexity is proportional to
O = E × T × Q, (1)
where E is number of the training epochs, T is the number of the words in the training set and Q is
defined further for each model architecture. Common choice is E = 3− 50 and T up to one billion.
All models are trained using stochastic gradient descent and backpropagation [26].
2.1 Feedforward Neural Net Language Model (NNLM)
The probabilistic feedforward neural network language model has been proposed in [1]. It consists
of input, projection, hidden and output layers. At the input layer, N previous words are encoded
using 1-of- V coding, where V is size of the vocabulary. The input layer is then projected to a
projection layer P that has dimensionality N × D, using a shared projection matrix. As only N
inputs are active at any given time, composition of the projection layer is a relatively cheap operation.
The NNLM architecture becomes complex for computation between the projection and the hidden
layer, as values in the projection layer are dense. For a common choice of N = 10, the size of the
projection layer (P) might be 500 to 2000, while the hidden layer size H is typically 500 to 1000
units. Moreover, the hidden layer is used to compute probability distribution over all the words in the
vocabulary, resulting in an output layer with dimensionalityV . Thus, the computational complexity
per each training example is
Q = N × D + N × D × H + H × V, (2)
where the dominating term is H × V . However, several practical solutions were proposed for
avoiding it; either using hierarchical versions of the softmax [25, 23, 18], or avoiding normalized
models completely by using models that are not normalized during training [4, 9]. With binary tree
representations of the vocabulary, the number of output units that need to be evaluated can go down
to around log2(V ). Thus, most of the complexity is caused by the term N × D × H.
In our models, we use hierarchical softmax where the vocabulary is represented as a Huffman binary
tree. This follows previous observations that the frequency of words works well for obtaining classes
in neural net language models [16]. Huffman trees assign short binary codes to frequent words, and
this further reduces the number of output units that need to be evaluated: while balanced binary tree
would require log2(V ) outputs to be evaluated, the Huffman tree based hierarchical softmax requires
only about log2(Unigram perplexity(V )). For example when the vocabulary size is one million
words, this results in about two times speedup in evaluation. While this is not crucial speedup for
neural network LMs as the computational bottleneck is in theN ×D×H term, we will later propose
architectures that do not have hidden layers and thus depend heavily on the efficiency of the softmax
normalization.
2.2 Recurrent Neural Net Language Model (RNNLM)
Recurrent neural network based language model has been proposed to overcome certain limitations
of the feedforward NNLM, such as the need to specify the context length (the order of the modelN),
and because theoretically RNNs can efficiently represent more complex patterns than the shallow
neural networks [15, 2]. The RNN model does not have a projection layer; only input, hidden and
output layer. What is special for this type of model is the recurrent matrix that connects hidden
layer to itself, using time-delayed connections. This allows the recurrent model to form some kind
of short term memory, as information from the past can be represented by the hidden layer state that
gets updated based on the current input and the state of the hidden layer in the previous time step.
The complexity per training example of the RNN model is
Q = H × H + H × V, (3)
where the word representations D have the same dimensionality as the hidden layer H. Again, the
term H × V can be efficiently reduced to H × log2(V ) by using hierarchical softmax. Most of the
complexity then comes from H × H.
3
2.3 Parallel Training of Neural Networks
To train models on huge data sets, we have implemented several models on top of a large-scale
distributed framework called DistBelief [6], including the feedforward NNLM and the new models
proposed in this paper. The framework allows us to run multiple replicas of the same model in
parallel, and each replica synchronizes its gradient updates through a centralized server that keeps
all the parameters. For this parallel training, we use mini-batch asynchronous gradient descent with
an adaptive learning rate procedure called Adagrad [7]. Under this framework, it is common to use
one hundred or more model replicas, each using many CPU cores at different machines in a data
center.
3 New Log-linear Models
In this section, we propose two new model architectures for learning distributed representations
of words that try to minimize computational complexity. The main observation from the previous
section was that most of the complexity is caused by the non-linear hidden layer in the model. While
this is what makes neural networks so attractive, we decided to explore simpler models that might
not be able to represent the data as precisely as neural networks, but can possibly be trained on much
more data efficiently.
The new architectures directly follow those proposed in our earlier work [13, 14], where it was
found that neural network language model can be successfully trained in two steps: first, continuous
word vectors are learned using simple model, and then the N-gram NNLM is trained on top of these
distributed representations of words. While there has been later substantial amount of work that
focuses on learning word vectors, we consider the approach proposed in [13] to be the simplest one.
Note that related models have been proposed also much earlier [26, 8].
3.1 Continuous Bag-of-Words Model
The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden
layer is removed and the projection layer is shared for all words (not just the projection matrix);
thus, all words get projected into the same position (their vectors are averaged). We call this archi-
tecture a bag-of-words model as the order of words in the history does not influence the projection.
Furthermore, we also use words from the future; we have obtained the best performance on the task
introduced in the next section by building a log-linear classifier with four future and four history
words at the input, where the training criterion is to correctly classify the current (middle) word.
Training complexity is then
Q = N × D + D × log2(V ). (4)
We denote this model further as CBOW, as unlike standard bag-of-words model, it uses continuous
distributed representation of the context. The model architecture is shown at Figure 1. Note that the
weight matrix between the input and the projection layer is shared for all word positions in the same
way as in the NNLM.
3.2 Continuous Skip-gram Model
The second architecture is similar to CBOW, but instead of predicting the current word based on the
context, it tries to maximize classification of a word based on another word in the same sentence.
More precisely, we use each current word as an input to a log-linear classifier with continuous
projection layer, and predict words within a certain range before and after the current word. We
found that increasing the range improves quality of the resulting word vectors, but it also increases
the computational complexity. Since the more distant words are usually less related to the current
word than those close to it, we give less weight to the distant words by sampling less from those
words in our training examples.
The training complexity of this architecture is proportional to
Q = C × (D + D × log2(V )), (5)
where C is the maximum distance of the words. Thus, if we choose C = 5, for each training word
we will select randomly a number R in range < 1; C >, and then use R words from history and
4
w(t-2)
w(t+1)
w(t-1)
w(t+2)
w(t)
SUM
INPUT PROJECTION OUTPUT
w(t)
INPUT PROJECTION OUTPUT
w(t-2)
w(t-1)
w(t+1)
w(t+2)
CBOW Skip-gram
Figure 1: New model architectures. The CBOW architecture predicts the current word based on the
context, and the Skip-gram predicts surrounding words given the current word.
R words from the future of the current word as correct labels. This will require us to do R × 2
word classifications, with the current word as input, and each of the R + R words as output. In the
following experiments, we use C = 10.
4 Results
To compare the quality of different versions of word vectors, previous papers typically use a table
showing example words and their most similar words, and understand them intuitively. Although
it is easy to show that word France is similar to Italy and perhaps some other countries, it is much
more challenging when subjecting those vectors in a more complex similarity task, as follows. We
follow previous observation that there can be many different types of similarities between words, for
example, word big is similar to bigger in the same sense that small is similar to smaller. Example
of another type of relationship can be word pairs big - biggest and small - smallest [20]. We further
denote two pairs of words with the same relationship as a question, as we can ask: ”What is the
word that is similar to small in the same sense as biggest is similar to big?”
Somewhat surprisingly, these questions can be answered by performing simple algebraic operations
with the vector representation of words. To find a word that is similar to small in the same sense as
biggest is similar to big, we can simply compute vectorX = vector(”biggest”) −vector(”big”) +
vector(”small”). Then, we search in the vector space for the word closest toX measured by cosine
distance, and use it as the answer to the question (we discard the input question words during this
search). When the word vectors are well trained, it is possible to find the correct answer (word
smallest) using this method.
Finally, we found that when we train high dimensional word vectors on a large amount of data, the
resulting vectors can be used to answer very subtle semantic relationships between words, such as
a city and the country it belongs to, e.g. France is to Paris as Germany is to Berlin. Word vectors
with such semantic relationships could be used to improve many existing NLP applications, such
as machine translation, information retrieval and question answering systems, and may enable other
future applications yet to be invented.
5
Table 1: Examples of five types of semantic and nine types of syntactic questions in the Semantic-
Syntactic Word Relationship test set.
Type of relationship Word Pair 1 Word Pair 2
Common capital city Athens Greece Oslo Norway
All capital cities Astana Kazakhstan Harare Zimbabwe
Currency Angola kwanza Iran rial
City-in-state Chicago Illinois Stockton California
Man-Woman brother sister grandson granddaughter
Adjective to adverb apparent apparently rapid rapidly
Opposite possibly impossibly ethical unethical
Comparative great greater tough tougher
Superlative easy easiest lucky luckiest
Present Participle think thinking read reading
Nationality adjective Switzerland Swiss Cambodia Cambodian
Past tense walking walked swimming swam
Plural nouns mouse mice dollar dollars
Plural verbs work works speak speaks
4.1 Task Description
To measure quality of the word vectors, we define a comprehensive test set that contains five types
of semantic questions, and nine types of syntactic questions. Two examples from each category are
shown in Table 1. Overall, there are 8869 semantic and 10675 syntactic questions. The questions
in each category were created in two steps: first, a list of similar word pairs was created manually.
Then, a large list of questions is formed by connecting two word pairs. For example, we made a
list of 68 large American cities and the states they belong to, and formed about 2.5K questions by
picking two word pairs at random. We have included in our test set only single token words, thus
multi-word entities are not present (such as New York).
We evaluate the overall accuracy for all question types, and for each question type separately (se-
mantic, syntactic). Question is assumed to be correctly answered only if the closest word to the
vector computed using the above method is exactly the same as the correct word in the question;
synonyms are thus counted as mistakes. This also means that reaching 100% accuracy is likely
to be impossible, as the current models do not have any input information about word morphology.
However, we believe that usefulness of the word vectors for certain applications should be positively
correlated with this accuracy metric. Further progress can be achieved by incorporating information
about structure of words, especially for the syntactic questions.
4.2 Maximization of Accuracy
We have used a Google News corpus for training the word vectors. This corpus contains about
6B tokens. We have restricted the vocabulary size to 1 million most frequent words. Clearly, we
are facing time constrained optimization problem, as it can be expected that both using more data
and higher dimensional word vectors will improve the accuracy. To estimate the best choice of
model architecture for obtaining as good as possible results quickly, we have first evaluated models
trained on subsets of the training data, with vocabulary restricted to the most frequent 30k words.
The results using the CBOW architecture with different choice of word vector dimensionality and
increasing amount of the training data are shown in Table 2.
It can be seen that after some point, adding more dimensions or adding more training data provides
diminishing improvements. So, we have to increase both vector dimensionality and the amount
of the training data together. While this observation might seem trivial, it must be noted that it is
currently popular to train word vectors on relatively large amounts of data, but with insufficient size
6
Table 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set, using word
vectors from the CBOW architecture with limited vocabulary. Only questions containing words from
the most frequent 30k words are used.
Dimensionality / Training words 24M 49M 98M 196M 391M 783M
50 13.4 15.7 18.6 19.1 22.5 23.2
100 19.4 23.1 27.8 28.7 33.4 32.2
300 23.2 29.2 35.3 38.6 43.7 45.9
600 24.0 30.1 36.5 40.8 46.6 50.4
Table 3: Comparison of architectures using models trained on the same data, with 640-dimensional
word vectors. The accuracies are reported on our Semantic-Syntactic Word Relationship test set,
and on the syntactic relationship test set of [20]
Model Semantic-Syntactic Word Relationship test set MSR Word Relatedness
Architecture Semantic Accuracy [%] Syntactic Accuracy [%] Test Set [20]
RNNLM 9 36 35
NNLM 23 53 47
CBOW 24 64 61
Skip-gram 55 59 56
(such as 50 - 100). Given Equation 4, increasing amount of training data twice results in about the
same increase of computational complexity as increasing vector size twice.
For the experiments reported in Tables 2 and 4, we used three training epochs with stochastic gradi-
ent descent and backpropagation. We chose starting learning rate 0.025 and decreased it linearly, so
that it approaches zero at the end of the last training epoch.
4.3 Comparison of Model Architectures
First we compare different model architectures for deriving the word vectors using the same training
data and using the same dimensionality of 640 of the word vectors. In the further experiments, we
use full set of questions in the new Semantic-Syntactic Word Relationship test set, i.e. unrestricted to
the 30k vocabulary. We also include results on a test set introduced in [20] that focuses on syntactic
similarity between words3.
The training data consists of several LDC corpora and is described in detail in [18] (320M words,
82K vocabulary). We used these data to provide a comparison to a previously trained recurrent
neural network language model that took about 8 weeks to train on a single CPU. We trained a feed-
forward NNLM with the same number of 640 hidden units using the DistBelief parallel training [6],
using a history of 8 previous words (thus, the NNLM has more parameters than the RNNLM, as the
projection layer has size 640 × 8).
In Table 3, it can be seen that the word vectors from the RNN (as used in [20]) perform well mostly
on the syntactic questions. The NNLM vectors perform significantly better than the RNN - this is
not surprising, as the word vectors in the RNNLM are directly connected to a non-linear hidden
layer. The CBOW architecture works better than the NNLM on the syntactic tasks, and about the
same on the semantic one. Finally, the Skip-gram architecture works slightly worse on the syntactic
task than the CBOW model (but still better than the NNLM), and much better on the semantic part
of the test than all the other models.
Next, we evaluated our models trained using one CPU only and compared the results against publicly
available word vectors. The comparison is given in Table 4. The CBOW model was trained on subset
3We thank Geoff Zweig for providing us the test set.
7
Table 4: Comparison of publicly available word vectors on the Semantic-Syntactic Word Relation-
ship test set, and word vectors from our models. Full vocabularies are used.
Model Vector Training Accuracy [%]
Dimensionality words
Semantic Syntactic Total
Collobert-Weston NNLM 50 660M 9.3 12.3 11.0
Turian NNLM 50 37M 1.4 2.6 2.1
Turian NNLM 200 37M 1.4 2.2 1.8
Mnih NNLM 50 37M 1.8 9.1 5.8
Mnih NNLM 100 37M 3.3 13.2 8.8
Mikolov RNNLM 80 320M 4.9 18.4 12.7
Mikolov RNNLM 640 320M 8.6 36.5 24.6
Huang NNLM 50 990M 13.3 11.6 12.3
Our NNLM 20 6B 12.9 26.4 20.3
Our NNLM 50 6B 27.9 55.8 43.2
Our NNLM 100 6B 34.2 64.5 50.8
CBOW 300 783M 15.5 53.1 36.1
Skip-gram 300 783M 50.0 55.9 53.3
Table 5: Comparison of models trained for three epochs on the same data and models trained for
one epoch. Accuracy is reported on the full Semantic-Syntactic data set.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days]
Semantic Syntactic Total
3 epoch CBOW 300 783M 15.5 53.1 36.1 1
3 epoch Skip-gram 300 783M 50.0 55.9 53.3 3
1 epoch CBOW 300 783M 13.8 49.9 33.6 0.3
1 epoch CBOW 300 1.6B 16.1 52.6 36.1 0.6
1 epoch CBOW 600 783M 15.4 53.3 36.2 0.7
1 epoch Skip-gram 300 783M 45.6 52.2 49.2 1
1 epoch Skip-gram 300 1.6B 52.2 55.1 53.8 2
1 epoch Skip-gram 600 783M 56.7 54.5 55.5 2.5
of the Google News data in about a day, while training time for the Skip-gram model was about three
days.
For experiments reported further, we used just one training epoch (again, we decrease the learning
rate linearly so that it approaches zero at the end of training). Training a model on twice as much
data using one epoch gives comparable or better results than iterating over the same data for three
epochs, as is shown in Table 5, and provides additional small speedup.
4.4 Large Scale Parallel Training of Models
As mentioned earlier, we have implemented various models in a distributed framework called Dis-
tBelief. Below we report the results of several models trained on the Google News 6B data set,
with mini-batch asynchronous gradient descent and the adaptive learning rate procedure called Ada-
grad [7]. We used 50 to 100 model replicas during the training. The number of CPU cores is an
8
Table 6: Comparison of models trained using the DistBelief distributed framework. Note that
training of NNLM with 1000-dimensional vectors would take too long to complete.
Model Vector Training Accuracy [%] Training time
Dimensionality words [days x CPU cores]
Semantic Syntactic Total
NNLM 100 6B 34.2 64.5 50.8 14 x 180
CBOW 1000 6B 57.3 68.9 63.7 2 x 140
Skip-gram 1000 6B 66.1 65.1 65.6 2.5 x 125
Table 7: Comparison and combination of models on the Microsoft Sentence Completion Challenge.
Architecture Accuracy [%]
4-gram [32] 39
Average LSA similarity [32] 49
Log-bilinear model [24] 54.8
RNNLMs [19] 55.4
Skip-gram 48.0
Skip-gram + RNNLMs 58.9
estimate since the data center machines are shared with other production tasks, and the usage can
fluctuate quite a bit. Note that due to the overhead of the distributed framework, the CPU usage of
the CBOW model and the Skip-gram model are much closer to each other than their single-machine
implementations. The result are reported in Table 6.
4.5 Microsoft Research Sentence Completion Challenge
The Microsoft Sentence Completion Challenge has been recently introduced as a task for advancing
language modeling and other NLP techniques [32]. This task consists of 1040 sentences, where one
word is missing in each sentence and the goal is to select word that is the most coherent with the
rest of the sentence, given a list of five reasonable choices. Performance of several techniques has
been already reported on this set, including N-gram models, LSA-based model [32], log-bilinear
model [24] and a combination of recurrent neural networks that currently holds the state of the art
performance of 55.4% accuracy on this benchmark [19].
We have explored the performance of Skip-gram architecture on this task. First, we train the 640-
dimensional model on 50M words provided in [32]. Then, we compute score of each sentence in
the test set by using the unknown word at the input, and predict all surrounding words in a sentence.
The final sentence score is then the sum of these individual predictions. Using the sentence scores,
we choose the most likely sentence.
A short summary of some previous results together with the new results is presented in Table 7.
While the Skip-gram model itself does not perform on this task better than LSA similarity, the scores
from this model are complementary to scores obtained with RNNLMs, and a weighted combination
leads to a new state of the art result 58.9% accuracy (59.2% on the development part of the set and
58.7% on the test part of the set).
5 Examples of the Learned Relationships
Table 8 shows words that follow various relationships. We follow the approach described above: the
relationship is defined by subtracting two word vectors, and the result is added to another word. Thus
for example, Paris - France + Italy = Rome . As it can be seen, accuracy is quite good, although
there is clearly a lot of room for further improvements (note that using our accuracy metric that
9
Table 8: Examples of the word pair relationships, using the best word vectors from Table 4 (Skip-
gram model trained on 783M words with 300 dimensionality).
Relationship Example 1 Example 2 Example 3
France - Paris Italy: Rome Japan: Tokyo Florida: Tallahassee
big - bigger small: larger cold: colder quick: quicker
Miami - Florida Baltimore: Maryland Dallas: Texas Kona: Hawaii
Einstein - scientist Messi: midfielder Mozart: violinist Picasso: painter
Sarkozy - France Berlusconi: Italy Merkel: Germany Koizumi: Japan
copper - Cu zinc: Zn gold: Au uranium: plutonium
Berlusconi - Silvio Sarkozy: Nicolas Putin: Medvedev Obama: Barack
Microsoft - Windows Google: Android IBM: Linux Apple: iPhone
Microsoft - Ballmer Google: Yahoo IBM: McNealy Apple: Jobs
Japan - sushi Germany: bratwurst France: tapas USA: pizza
assumes exact match, the results in Table 8 would score only about 60%). We believe that word
vectors trained on even larger data sets with larger dimensionality will perform significantly better,
and will enable the development of new innovative applications. Another way to improve accuracy is
to provide more than one example of the relationship. By using ten examples instead of one to form
the relationship vector (we average the individual vectors together), we have observed improvement
of accuracy of our best models by about 10% absolutely on the semantic-syntactic test.
It is also possible to apply the vector operations to solve different tasks. For example, we have
observed good accuracy for selecting out-of-the-list words, by computing average vector for a list of
words, and finding the most distant word vector. This is a popular type of problems in certain human
intelligence tests. Clearly, there is still a lot of discoveries to be made using these techniques.
6 Conclusion
In this paper we studied the quality of vector representations of words derived by various models on
a collection of syntactic and semantic language tasks. We observed that it is possible to train high
quality word vectors using very simple model architectures, compared to the popular neural network
models (both feedforward and recurrent). Because of the much lower computational complexity, it
is possible to compute very accurate high dimensional word vectors from a much larger data set.
Using the DistBelief distributed framework, it should be possible to train the CBOW and Skip-gram
models even on corpora with one trillion words, for basically unlimited size of the vocabulary. That
is several orders of magnitude larger than the best previously published results for similar models.
An interesting task where the word vectors have recently been shown to significantly outperform the
previous state of the art is the SemEval-2012 Task 2 [11]. The publicly available RNN vectors were
used together with other techniques to achieve over 50% increase in Spearman’s rank correlation
over the previous best result [31]. The neural network based word vectors were previously applied
to many other NLP tasks, for example sentiment analysis [12] and paraphrase detection [28]. It can
be expected that these applications can benefit from the model architectures described in this paper.
Our ongoing work shows that the word vectors can be successfully applied to automatic extension
of facts in Knowledge Bases, and also for verification of correctness of existing facts. Results
from machine translation experiments also look very promising. In the future, it would be also
interesting to compare our techniques to Latent Relational Analysis [30] and others. We believe that
our comprehensive test set will help the research community to improve the existing techniques for
estimating the word vectors. We also expect that high quality word vectors will become an important
building block for future NLP applications.
10
7 Follow-Up Work
After the initial version of this paper was written, we published single-machine multi-threaded C++
code for computing the word vectors, using both the continuous bag-of-words and skip-gram archi-
tectures4. The training speed is significantly higher than reported earlier in this paper, i.e. it is in the
order of billions of words per hour for typical hyperparameter choices. We also published more than
1.4 million vectors that represent named entities, trained on more than 100 billion words. Some of
our follow-up work will be published in an upcoming NIPS 2013 paper [21].
References
[1] Y . Bengio, R. Ducharme, P. Vincent. A neural probabilistic language model. Journal of Ma-
chine Learning Research, 3:1137-1155, 2003.
[2] Y . Bengio, Y . LeCun. Scaling learning algorithms towards AI. In: Large-Scale Kernel Ma-
chines, MIT Press, 2007.
[3] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine
translation. In Proceedings of the Joint Conference on Empirical Methods in Natural Language
Processing and Computational Language Learning, 2007.
[4] R. Collobert and J. Weston. A Unified Architecture for Natural Language Processing: Deep
Neural Networks with Multitask Learning. In International Conference on Machine Learning,
ICML, 2008.
[5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu and P. Kuksa. Natural Lan-
guage Processing (Almost) from Scratch. Journal of Machine Learning Research, 12:2493-
2537, 2011.
[6] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, Q.V . Le, M.Z. Mao, M.A. Ranzato, A.
Senior, P. Tucker, K. Yang, A. Y . Ng., Large Scale Distributed Deep Networks, NIPS, 2012.
[7] J.C. Duchi, E. Hazan, and Y . Singer. Adaptive subgradient methods for online learning and
stochastic optimization. Journal of Machine Learning Research, 2011.
[8] J. Elman. Finding Structure in Time. Cognitive Science, 14, 179-211, 1990.
[9] Eric H. Huang, R. Socher, C. D. Manning and Andrew Y . Ng. Improving Word Representations
via Global Context and Multiple Word Prototypes. In: Proc. Association for Computational
Linguistics, 2012.
[10] G.E. Hinton, J.L. McClelland, D.E. Rumelhart. Distributed representations. In: Parallel dis-
tributed processing: Explorations in the microstructure of cognition. V olume 1: Foundations,
MIT Press, 1986.
[11] D.A. Jurgens, S.M. Mohammad, P.D. Turney, K.J. Holyoak. Semeval-2012 task 2: Measuring
degrees of relational similarity. In: Proceedings of the 6th International Workshop on Semantic
Evaluation (SemEval 2012), 2012.
[12] A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y . Ng, and C. Potts. Learning word vectors for
sentiment analysis. In Proceedings of ACL, 2011.
[13] T. Mikolov. Language Modeling for Speech Recognition in Czech, Masters thesis, Brno Uni-
versity of Technology, 2007.
[14] T. Mikolov, J. Kopeck ´y, L. Burget, O. Glembek and J. ˇCernock´y. Neural network based lan-
guage models for higly inflective languages, In: Proc. ICASSP 2009.
[15] T. Mikolov, M. Karafi ´at, L. Burget, J. ˇCernock´y, S. Khudanpur. Recurrent neural network
based language model, In: Proceedings of Interspeech, 2010.
[16] T. Mikolov, S. Kombrink, L. Burget, J. ˇCernock´y, S. Khudanpur. Extensions of recurrent neural
network language model, In: Proceedings of ICASSP 2011.
[17] T. Mikolov, A. Deoras, S. Kombrink, L. Burget, J. ˇCernock´y. Empirical Evaluation and Com-
bination of Advanced Language Modeling Techniques, In: Proceedings of Interspeech, 2011.
4The code is available at https://code.google.com/p/word2vec/
11
[18] T. Mikolov, A. Deoras, D. Povey, L. Burget, J. ˇCernock´y. Strategies for Training Large Scale
Neural Network Language Models, In: Proc. Automatic Speech Recognition and Understand-
ing, 2011.
[19] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno Univer-
sity of Technology, 2012.
[20] T. Mikolov, W.T. Yih, G. Zweig. Linguistic Regularities in Continuous Space Word Represen-
tations. NAACL HLT 2013.
[21] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of
Words and Phrases and their Compositionality. Accepted to NIPS 2013.
[22] A. Mnih, G. Hinton. Three new graphical models for statistical language modelling. ICML,
2007.
[23] A. Mnih, G. Hinton. A Scalable Hierarchical Distributed Language Model. Advances in Neural
Information Processing Systems 21, MIT Press, 2009.
[24] A. Mnih, Y .W. Teh. A fast and simple algorithm for training neural probabilistic language
models. ICML, 2012.
[25] F. Morin, Y . Bengio. Hierarchical Probabilistic Neural Network Language Model. AISTATS,
2005.
[26] D. E. Rumelhart, G. E. Hinton, R. J. Williams. Learning internal representations by back-
propagating errors. Nature, 323:533.536, 1986.
[27] H. Schwenk. Continuous space language models. Computer Speech and Language, vol. 21,
2007.
[28] R. Socher, E.H. Huang, J. Pennington, A.Y . Ng, and C.D. Manning. Dynamic Pooling and
Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011.
[29] J. Turian, L. Ratinov, Y . Bengio. Word Representations: A Simple and General Method for
Semi-Supervised Learning. In: Proc. Association for Computational Linguistics, 2010.
[30] P. D. Turney. Measuring Semantic Similarity by Latent Relational Analysis. In: Proc. Interna-
tional Joint Conference on Artificial Intelligence, 2005.
[31] A. Zhila, W.T. Yih, C. Meek, G. Zweig, T. Mikolov. Combining Heterogeneous Models for
Measuring Relational Similarity. NAACL HLT 2013.
[32] G. Zweig, C.J.C. Burges. The Microsoft Research Sentence Completion Challenge, Microsoft
Research Technical Report MSR-TR-2011-129, 2011.
12
|
Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean
|
Unknown
| 2,013
|
{"id": "idpCdOWtqXd60", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358403300000, "tmdate": 1358403300000, "ddate": null, "number": 58, "content": {"title": "Efficient Estimation of Word Representations in Vector Space", "decision": "conferencePoster-iclr2013-workshop", "abstract": "We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day and one CPU to derive high quality 300-dimensional vectors for one million vocabulary from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring various types of word similarities. We intend to publish this test set to be used by the research community.", "pdf": "https://arxiv.org/abs/1301.3781", "paperhash": "mikolov|efficient_estimation_of_word_representations_in_vector_space", "keywords": [], "conflicts": [], "authors": ["Tomas Mikolov", "Kai Chen", "Greg Corrado", "Jeffrey Dean"], "authorids": ["tmikolov@google.com", "kaichen@google.com", "gcorrado@google.com", "jeff@google.com"]}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["tmikolov@google.com"], "writers": []}
|
[Review]:
In response to the request for references made by the first author for the statement regarding semantic similarity being intransitive, I think the reference should be to 'Features of similarity' by Tversky (1977). Please find what I believe to be the relevant portion below.
`We say 'the portrait resembles the person' rather than 'the person resembles the portrait.' We say 'the son resembles the father' rather than 'the father resembles the son.' We say 'an ellipse is like a circle,' not 'a circle is like an ellipse,' and we say 'North Korea is like Red China' rather than 'Red China is like North Korea.''
Lastly, a question that was raised by the reviewers was whether these relationships also hold for LSA or tf-idf vectors to which the first author responded that this has already been discussed in another paper and it turned out not to be the case. I would be very thankful for a reference to this work since I am not familiar with it.
|
Pontus Stenetorp
| null | null |
{"id": "3Ms_MCOhFG34r", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1368188160000, "tmdate": 1368188160000, "ddate": null, "number": 1, "content": {"title": "", "review": "In response to the request for references made by the first author for the statement regarding semantic similarity being intransitive, I think the reference should be to 'Features of similarity' by Tversky (1977). Please find what I believe to be the relevant portion below.\r\n\r\n `We say 'the portrait resembles the person' rather than 'the person resembles the portrait.' We say 'the son resembles the father' rather than 'the father resembles the son.' We say 'an ellipse is like a circle,' not 'a circle is like an ellipse,' and we say 'North Korea is like Red China' rather than 'Red China is like North Korea.''\r\n\r\nLastly, a question that was raised by the reviewers was whether these relationships also hold for LSA or tf-idf vectors to which the first author responded that this has already been discussed in another paper and it turned out not to be the case. I would be very thankful for a reference to this work since I am not familiar with it."}, "forum": "idpCdOWtqXd60", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "idpCdOWtqXd60", "readers": ["everyone"], "nonreaders": [], "signatures": ["Pontus Stenetorp"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 3,
"importance_and_relevance": 0,
"materials_and_methods": 1,
"praise": 0,
"presentation_and_reporting": 5,
"results_and_discussion": 1,
"suggestion_and_solution": 3,
"total": 7
}
| 1.857143
| 1.288975
| 0.568167
| 1.867758
| 0.174887
| 0.010615
| 0
| 0.428571
| 0
| 0.142857
| 0
| 0.714286
| 0.142857
| 0.428571
|
{
"criticism": 0,
"example": 0.42857142857142855,
"importance_and_relevance": 0,
"materials_and_methods": 0.14285714285714285,
"praise": 0,
"presentation_and_reporting": 0.7142857142857143,
"results_and_discussion": 0.14285714285714285,
"suggestion_and_solution": 0.42857142857142855
}
| 1.857143
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
iKeAKFLmxoim3
|
Heteroscedastic Conditional Ordinal Random Fields for Pain Intensity
Estimation from Facial Images
|
We propose a novel method for automatic pain intensity estimation from facial images based on the framework of kernel Conditional Ordinal Random Fields (KCORF). We extend this framework to account for heteroscedasticity on the output labels(i.e., pain intensity scores) and introduce a novel dynamic features, dynamic ranks, that impose temporal ordinal constraints on the static ranks (i.e., intensity scores). Our experimental results show that the proposed approach outperforms state-of-the art methods for sequence classification with ordinal data and other ordinal regression models. The approach performs significantly better than other models in terms of Intra-Class Correlation measure, which is the most accepted evaluation measure in the tasks of facial behaviour intensity estimation.
|
Ognjen Rudovic, Maja Pantic, Vladimir Pavlovic
|
Unknown
| 2,013
|
{"id": "iKeAKFLmxoim3", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358924400000, "tmdate": 1358924400000, "ddate": null, "number": 25, "content": {"decision": "reject", "title": "Heteroscedastic Conditional Ordinal Random Fields for Pain Intensity\r\n Estimation from Facial Images", "abstract": "We propose a novel method for automatic pain intensity estimation from facial images based on the framework of kernel Conditional Ordinal Random Fields (KCORF). We extend this framework to account for heteroscedasticity on the output labels(i.e., pain intensity scores) and introduce a novel dynamic features, dynamic ranks, that impose temporal ordinal constraints on the static ranks (i.e., intensity scores). Our experimental results show that the proposed approach outperforms state-of-the art methods for sequence classification with ordinal data and other ordinal regression models. The approach performs significantly better than other models in terms of Intra-Class Correlation measure, which is the most accepted evaluation measure in the tasks of facial behaviour intensity estimation.", "pdf": "https://arxiv.org/abs/1301.5063", "paperhash": "rudovic|heteroscedastic_conditional_ordinal_random_fields_for_pain_intensity_estimation_from_facial_images", "keywords": [], "conflicts": [], "authors": ["Ognjen Rudovic", "Maja Pantic", "Vladimir Pavlovic"], "authorids": ["ognjen.rudovic@gmail.com", "m.pantic@imperial.ac.uk", "vladimir@cs.rutgers.edu"]}, "forum": "iKeAKFLmxoim3", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["ognjen.rudovic@gmail.com"], "writers": []}
|
[Review]:
This paper seeks to estimate ordinal labels of pain intensity from
videos of faces. The paper discusses a new variation of a conditional
random field in which the produced labels are ordinal values. The
paper's main claim to novelty is the idea of 'dynamic ranks', but it
is unclear what these are.
This paper does not convey its ideas clearly. It is not immediately
obvious why an ordinal regression problem demands a CRF, much less a
kernelized heteroscedastic CRF. Since I assume that each frame has a
single label, is the function of the CRF simply to impose temporal
smoothness constraints? I don't understand the motivation for the
additional aspects of this. The idea of 'dynamic ranks' is not
explained, beyond Equation (2), which is itself confusing. For
example, what does the equal sign inside the parentheses mean on the
left side of Equation 2? It took me quite a while of looking at the
right-hand side of this equation to realize that it was defining a
set, but I don't understand how this relates to ranking or dynamics.
Section 3 seems to imply that the kernel is between the features of
6x6 patches, but this doesn't make sense to me if the objective is to
have temporal smoothing.
I found this paper very confusing. It does not provide many details
or intuition. In trying to resolve this confusion, I examined the
authors' previous work, cited as [14] and [15]. These other papers
appear to contain most of the crucial details and assumptions that sit
behind the present paper. I appreciate that this is a very short
paper, but for it to be a useful contribution it must be at least
somewhat self contained. As it stands, I do not feel this is
achieved.
|
anonymous reviewer 0342
| null | null |
{"id": "lBM7_cfUaYlP1", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362186300000, "tmdate": 1362186300000, "ddate": null, "number": 1, "content": {"title": "review of Heteroscedastic Conditional Ordinal Random Fields for Pain Intensity\r\n Estimation from Facial Images", "review": "This paper seeks to estimate ordinal labels of pain intensity from\r\nvideos of faces. The paper discusses a new variation of a conditional\r\nrandom field in which the produced labels are ordinal values. The\r\npaper's main claim to novelty is the idea of 'dynamic ranks', but it\r\nis unclear what these are.\r\n\r\nThis paper does not convey its ideas clearly. It is not immediately\r\nobvious why an ordinal regression problem demands a CRF, much less a\r\nkernelized heteroscedastic CRF. Since I assume that each frame has a\r\nsingle label, is the function of the CRF simply to impose temporal\r\nsmoothness constraints? I don't understand the motivation for the\r\nadditional aspects of this. The idea of 'dynamic ranks' is not\r\nexplained, beyond Equation (2), which is itself confusing. For\r\nexample, what does the equal sign inside the parentheses mean on the\r\nleft side of Equation 2? It took me quite a while of looking at the\r\nright-hand side of this equation to realize that it was defining a\r\nset, but I don't understand how this relates to ranking or dynamics.\r\nSection 3 seems to imply that the kernel is between the features of\r\n6x6 patches, but this doesn't make sense to me if the objective is to\r\nhave temporal smoothing.\r\n\r\nI found this paper very confusing. It does not provide many details\r\nor intuition. In trying to resolve this confusion, I examined the\r\nauthors' previous work, cited as [14] and [15]. These other papers\r\nappear to contain most of the crucial details and assumptions that sit\r\nbehind the present paper. I appreciate that this is a very short\r\npaper, but for it to be a useful contribution it must be at least\r\nsomewhat self contained. As it stands, I do not feel this is\r\nachieved."}, "forum": "iKeAKFLmxoim3", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "iKeAKFLmxoim3", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 0342"], "writers": ["anonymous"]}
|
{
"criticism": 10,
"example": 1,
"importance_and_relevance": 2,
"materials_and_methods": 4,
"praise": 1,
"presentation_and_reporting": 3,
"results_and_discussion": 1,
"suggestion_and_solution": 1,
"total": 17
}
| 1.352941
| 1.100422
| 0.252519
| 1.352941
| 0.034118
| 0
| 0.588235
| 0.058824
| 0.117647
| 0.235294
| 0.058824
| 0.176471
| 0.058824
| 0.058824
|
{
"criticism": 0.5882352941176471,
"example": 0.058823529411764705,
"importance_and_relevance": 0.11764705882352941,
"materials_and_methods": 0.23529411764705882,
"praise": 0.058823529411764705,
"presentation_and_reporting": 0.17647058823529413,
"results_and_discussion": 0.058823529411764705,
"suggestion_and_solution": 0.058823529411764705
}
| 1.352941
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
|||
iKeAKFLmxoim3
|
Heteroscedastic Conditional Ordinal Random Fields for Pain Intensity
Estimation from Facial Images
|
We propose a novel method for automatic pain intensity estimation from facial images based on the framework of kernel Conditional Ordinal Random Fields (KCORF). We extend this framework to account for heteroscedasticity on the output labels(i.e., pain intensity scores) and introduce a novel dynamic features, dynamic ranks, that impose temporal ordinal constraints on the static ranks (i.e., intensity scores). Our experimental results show that the proposed approach outperforms state-of-the art methods for sequence classification with ordinal data and other ordinal regression models. The approach performs significantly better than other models in terms of Intra-Class Correlation measure, which is the most accepted evaluation measure in the tasks of facial behaviour intensity estimation.
|
Ognjen Rudovic, Maja Pantic, Vladimir Pavlovic
|
Unknown
| 2,013
|
{"id": "iKeAKFLmxoim3", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358924400000, "tmdate": 1358924400000, "ddate": null, "number": 25, "content": {"decision": "reject", "title": "Heteroscedastic Conditional Ordinal Random Fields for Pain Intensity\r\n Estimation from Facial Images", "abstract": "We propose a novel method for automatic pain intensity estimation from facial images based on the framework of kernel Conditional Ordinal Random Fields (KCORF). We extend this framework to account for heteroscedasticity on the output labels(i.e., pain intensity scores) and introduce a novel dynamic features, dynamic ranks, that impose temporal ordinal constraints on the static ranks (i.e., intensity scores). Our experimental results show that the proposed approach outperforms state-of-the art methods for sequence classification with ordinal data and other ordinal regression models. The approach performs significantly better than other models in terms of Intra-Class Correlation measure, which is the most accepted evaluation measure in the tasks of facial behaviour intensity estimation.", "pdf": "https://arxiv.org/abs/1301.5063", "paperhash": "rudovic|heteroscedastic_conditional_ordinal_random_fields_for_pain_intensity_estimation_from_facial_images", "keywords": [], "conflicts": [], "authors": ["Ognjen Rudovic", "Maja Pantic", "Vladimir Pavlovic"], "authorids": ["ognjen.rudovic@gmail.com", "m.pantic@imperial.ac.uk", "vladimir@cs.rutgers.edu"]}, "forum": "iKeAKFLmxoim3", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["ognjen.rudovic@gmail.com"], "writers": []}
|
[Review]:
This extended abstract discusses a modification to an existing ordinal conditional random field model (CORF) so as to treat non-stationary data. This is done by making the variance in a probit model depend on the observations (x) and appealing to results on kernels methods for CRFs by Lafferty et al. The authors also introduce what they call dynamic ranks, but it is impossible to understand, from this write-up, how these relate to the model. No intuition is provide either. What is the equal sign doing in the definition of dynamic ranks?
Regarding section 2, it is too short and impossible to follow. The authors should rewrite it making sure the mathematical models are specified properly and in full mathematical detail. All the variables and symbols should be defined. I know there are space constraints, but I also believe a better presentation is possible.
The experiments claim great improvements over techniques that do not exploit structure or techniques that exploit structure but which are not suitable for ordinal regression. As it is, it would be impossible to reproduce the results in this abstract. However, it seems that great effort was put into the empirical part of the work.
Some typos:
Abstract: Add space after labels. Also, a novel should be simply novel.
Introduction: in the recent should be in recent. Also, drop the a in a novel dynamic features.
Section 2: Add space after McCullagh. What is standard CRF form? Please be precise as there are many ways of parameterizing and structuring CRFs.
References: laplacian should be Laplacian
|
anonymous reviewer 9402
| null | null |
{"id": "VTEO8hp3ad83Q", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362297780000, "tmdate": 1362297780000, "ddate": null, "number": 2, "content": {"title": "review of Heteroscedastic Conditional Ordinal Random Fields for Pain Intensity\r\n Estimation from Facial Images", "review": "This extended abstract discusses a modification to an existing ordinal conditional random field model (CORF) so as to treat non-stationary data. This is done by making the variance in a probit model depend on the observations (x) and appealing to results on kernels methods for CRFs by Lafferty et al. The authors also introduce what they call dynamic ranks, but it is impossible to understand, from this write-up, how these relate to the model. No intuition is provide either. What is the equal sign doing in the definition of dynamic ranks?\r\n\r\nRegarding section 2, it is too short and impossible to follow. The authors should rewrite it making sure the mathematical models are specified properly and in full mathematical detail. All the variables and symbols should be defined. I know there are space constraints, but I also believe a better presentation is possible.\r\n\r\nThe experiments claim great improvements over techniques that do not exploit structure or techniques that exploit structure but which are not suitable for ordinal regression. As it is, it would be impossible to reproduce the results in this abstract. However, it seems that great effort was put into the empirical part of the work.\r\n\r\nSome typos:\r\n\r\nAbstract: Add space after labels. Also, a novel should be simply novel.\r\nIntroduction: in the recent should be in recent. Also, drop the a in a novel dynamic features.\r\nSection 2: Add space after McCullagh. What is standard CRF form? Please be precise as there are many ways of parameterizing and structuring CRFs.\r\nReferences: laplacian should be Laplacian"}, "forum": "iKeAKFLmxoim3", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "iKeAKFLmxoim3", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 9402"], "writers": ["anonymous"]}
|
{
"criticism": 3,
"example": 0,
"importance_and_relevance": 1,
"materials_and_methods": 6,
"praise": 2,
"presentation_and_reporting": 11,
"results_and_discussion": 3,
"suggestion_and_solution": 10,
"total": 20
}
| 1.8
| 1.026661
| 0.773339
| 1.8
| 0.098
| 0
| 0.15
| 0
| 0.05
| 0.3
| 0.1
| 0.55
| 0.15
| 0.5
|
{
"criticism": 0.15,
"example": 0,
"importance_and_relevance": 0.05,
"materials_and_methods": 0.3,
"praise": 0.1,
"presentation_and_reporting": 0.55,
"results_and_discussion": 0.15,
"suggestion_and_solution": 0.5
}
| 1.8
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
|||
i87JIQTAnB8AQ
|
The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization
|
Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.
|
The Diagonalized Newton Algorithm for Non-
negative Matrix Factorization
Hugo Van hamme 1
University of Leuven, dept. ESAT 2
Kasteelpark Arenberg 10 – bus 2441, 3001 Leuven, B elgium 3
hugo.vanhamme@esat.kuleuven.be 4
Abstract 5
Non-negative matrix factorization (NMF) has become a popular machine 6
learning approach to many problems in text mining, speech and image 7
processing, bio-informatics and seismic data analys is to name a few. In 8
NMF, a matrix of non-negative data is approximated by the low-rank 9
product of two matrices with non-negative entries. In this paper, the 10
approximation quality is measured by the Kullback-L eibler divergence 11
between the data and its low-rank reconstruction. T he existence of the 12
simple multiplicative update (MU) algorithm for com puting the matrix 13
factors has contributed to the success of NMF. Desp ite the availability of 14
algorithms showing faster convergence, MU remains p opular due to its 15
simplicity. In this paper, a diagonalized Newton al gorithm (DNA) is 16
proposed showing faster convergence while the imple mentation remains 17
simple and suitable for high-rank problems. The DNA algorithm is applied 18
to various publicly available data sets, showing a substantial speed-up on 19
modern hardware. 20
21
1 Introduction 22
Non-negative matrix factorization (NMF) denotes the process of factorizing a N×T data 23
matrix V of non-negative real numbers into the product of a N×R matrix W and a R×T 24
matrix H, where both W and H contain only non-negative real numbers. Taking a c olumn-25
wise view of the data, i.e. each of the T columns of V is a sample of N-dimensional vector 26
data, the factorization expresses each sample as a (weighted) addition of columns of W, 27
which can hence be interpreted as the R parts that make up the data [1]. Hence, NMF can be 28
used to learn data representations from samples. In [2], speaker representations are learnt 29
from spectral data using NMF and subsequently appli ed to separate their signals. Another 30
example in speech processing is [3] and [4], where phone representations are learnt using a 31
convolutional extention of NMF. In [5], time-freque ncy representations reminiscent of 32
formant traces are learnt from speech using NMF. In [6], NMF is used to learn acoustic 33
representations for words in a vocabulary acquisiti on and recognition task. Applied to image 34
processing, local features are learnt from examples with NMF in order to represent human 35
faces in a detection task [7]. 36
In this paper, the metric to measure the closeness of reconstruction Z = WH to its target V is 37
measured by their Kullback-Leibler divergence: 38
39
qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119ZZ ZZqg4⇠⇠∇=qg3R33qg18∇4qg3141qg314∇ qg18⇠4qg18⇠∇qg18R9 qg343⇠qg18∇4qg3141qg314∇
qg18∇8qg3141qg314∇
qg3441−qg3R33qg18∇4qg3141qg314∇
qg3141quni112⊘qg314∇
+qg3R33qg18∇8qg3141qg314∇
qg3141quni112⊘qg314∇qg3141quni112⊘qg314∇
(1)
Given a data matrix V, the matrix factors W and H are then found by minimizing cost 40
function (1), which yields the maximum likelihood e stimate if the data are drawn from a 41
Poisson distribution. The multiplicative updates (M U) algorithm proposed in [1] solves 42
exactly this problem in an iterative manner. Its si mplicity and the availability of many 43
implementations make it a popular algorithm to date to solve NMF problems. However, there 44
are some drawbacks to the algorithm. Firstly, it on ly converges locally and is not guaranteed 45
to yield the global minimum of the cost function. I t is hence sensitive to the choice of the 46
initial guesses for W and H. Secondly, MU is very slow to converge. The goal of this paper 47
is to speed up the convergence while the local convergence proper ty is retained. The 48
resulting Diagonalized Newton Algorithm (DNA) uses only simple element-wise operations , 49
such that its implementation requires only a few te ns of lines of code, while memory 50
requirements and computational efforts for a single iteration are about the double of an MU 51
update. 52
The faster convergence rate is obtained by applying Newton’s method to minimize 53
dKL (V,WH ) over W and H in alternation. Newton updates have been explored for the Frobe-54
nius norm to measure the distance between V and Z in e.g. [8]-[13]. Specifically, in [11] a 55
diagonal Newton method is applied Frobenius norms. For the Kullback-Leibler divergence, 56
fewer studies are available. Since each optimizatio n problem is multivariate, Newton updates 57
typically imply solving sets of linear equations in each iteration. In [16], the Hessian is 58
reduced by refraining from second order updates for the parameters close to zero. In [17], 59
Newton updates are applied per coordinate, but in a cyclic order, which is troublesome for 60
GPU implementations. In the proposed method, matrix inversion is avoided by diagonalizing 61
the Hessian matrix. The resulting updates resemble the ones derived in [18] to the extent that 62
they involve second order derivatives. Important di fferences are that [18] involves the non-63
negative k-residuals hence requiring flooring to zero. Of cou rse, the diagonal approximation 64
may affect the convergence rate adversely. Also, Ne wton algorithms only show (quadratic) 65
convergence when the estimate is sufficiently close to the local minimum and therefore need 66
damping, e.g. Levenberg-Marquardt as in [14], or st ep size control as in [15] and [16]. In 67
DNA, these convergence issues are addressed by comp uting both the MU and Newton 68
solutions and selecting the one leading to the grea test reduction in dKL (V,Z). Hence, since 69
the cost is non-decreasing under MU, it will also b e under DNA updates. This robust safety 70
net can be constructed fairly efficiently because t he quantities required to compute the MU 71
have already been computed in the Newton update. Th e net result is that DNA iterations are 72
only about two to three times as slow as MU iterati ons, both on a CPU and on a GPU. The 73
experimental analysis shows that the increased conv ergence rate generally dominates over 74
the increased cost per iteration such that overall balance is positive and can lead to speedups 75
of up to a factor 6. 76
2 NMF formulation 77
To induce sparsity on the matrix factors, the KL-di vergence is often regularized, i.e. one 78
seeks to minimize: 79
quni1119qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R
qg3141quni112⊘qg314R
+λqg3R33ℎqg314Rqg314∇
qg314Rquni112⊘qg314∇
(2)
subject to non-negativity constraints on all entrie s of W and H. Here, ρ and λ are non-negative re-80
gularization parameters. 81
Minimizing the regularized KL-divergence (2) can be achieved by alternating updates of W and H 82
for which the cost is non-increasing. The updates for this form of block coordinate descent are: 83
qg1∇82quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇82qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4R93qg4⇠⇠∇+λqg3R33ℎqg314Rqg314∇
qg4R93
qg314Rquni112⊘qg314∇
qg3441 (3)
qg1∇9∇quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇9∇qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119qg1∇9∇qg4R93qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R qg4R93
qg3141quni112⊘qg314R
qg3441 (4)
Because of the symmetry property dKL (V,WH ) = dKL (Vt,HtWt), where superscript- t denotes 84
matrix transpose, it suffices to consider only the update on H. Furthermore, because of the 85
summation over all columns in (1), minimization (3) splits up into T independent optimiza-86
tion problems. Let v denote any column of V and let h denote the corresponding column of H, 87
then the following is the core minimization problem to be considered: 88
qg1818quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1818qg4R93≥qg2∇∇∇quni1119
quni1119qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1818qg4R93qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4R93qg4⇠⇠∇ (5)
where 1 denotes a vector of ones of appropriate length. Th e solution of (5) should satisfy the KKT 89
conditions, i.e. for all r with hr > 0 90
qg2134qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠quni11∇⇠quni1119quni11∇⇠quni1119 quni11∇⇠quni1119quni11∇⇠quni1119quni112⊘quni1119WW WWquni1119qg1818qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4⇠⇠∇
qg2134ℎqg314R
=−qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
+qg3R33qg18∇Rqg3141qg314R
qg3141
+λ =0
where hr denotes the r-th component of h. If hr = 0, the partial derivative is positive. Hence the 91
product of hr and the partial derivative is always zero for a solution of (5), i.e. for r = 1 … R: 92
qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R ℎqg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
−ℎqg314Rqg343∇qg3R33qg18∇Rqg3141qg314R
qg3141
+λqg3441=0 (6)
Since W-columns with all-zeros do not contribute to Z, it can be assumed that column sums of W 93
are non-zero, so the above can be recast as: 94
ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −ℎqg314R=0
where qn = vn / (Wh )n. To facilitate the derivations below, the following notations are introduced: 95
qg18R3qg314R=
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −1 (7)
which are functions of h via q. The KKT conditions are hence recast as [20] 96
quni1119qg18R3qg314Rquni1119ℎqg314R=0quni1119quni1119quni1119quni1119quni1119quni11⇠⇠quni11⇠Fquni11∇2quni1119quni11∇2quni1119=quni11191quni1119quni212⇠quni1119R (8)
Finally, summing (6) over r yields 97
qg3R33qg4⇠⇠⇠qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8qg4⇠⇠∇qg314R+λqg4⇠⇠∇ℎqg314R
qg314R
=qg3R33qg18∇4qg3141
qg3141
(9)
which is satisfied for any guess h by renormalizing: 98
ℎqg314R⇠ℎqg314R
quni11∇⇠quni11∇⇠ quni11∇⇠quni11∇⇠qg314∇11 11
qg1818qg314∇qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8+λqg4⇠⇠∇ (10)
2.1 Multiplicative updates 99
For the more generic class of Bregman divergences, it was shown in a.o. [20] that multipli-100
cative updates (MU) are non-decreasing at each upda te of W and H. For KL-divergence, MU 101
are identical to a fixed point update of (6), i.e. 102
ℎqg314R⇠ℎqg314Rqg4⇠⇠⇠1+qg18R3qg314Rqg4⇠⇠∇=ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ (11)
Update (11) has two fixed points: hr = 0 and ar = 0. In the former case, the KKT conditions imply 103
that ar is negative. 104
105
2.2 Newton updates 106
To find the stationary points of (2), R equations (8) need to be solved for h. In general, let g(h) be 107
an R-dimensional vector function of an R-dimensional variable h. Newton’s update then states: 108
qg1818⇠qg1818−quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg28∇9qg28⇠9qg181∇qg4⇠⇠⇠qg1818qg4⇠⇠∇quni1119quni1119quni1119wquni11⇠9tquni11⇠8 quni1119quni1119quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=∂qg18R9qg314Rqg4⇠⇠⇠qg1818qg4⇠⇠∇
∂ℎqg3139
(12)
Applied to equations (8): 109
qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=qg18R3qg3139qg2112qg314Rqg3139− ℎqg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg313⇠qg18∇Rqg313⇠qg314R qg18∇Rqg313⇠qg3139
qg4⇠⇠⇠qg1∇9∇qg1818 qg4⇠⇠∇qg313⇠
qg28∇1
qg313⇠
(13)
where δ rl is Kronecker’s delta. To avoid the matrix inversio n in update (12), the last term in 110
equation (13) is diagonalized, which is equivalent to solving the r-th equation in (8) for hr with all 111
other components fixed. With 112
qg18R4qg314R= 1
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R qg28∇1
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg28∇1
qg3141
(14)
which is always positive, an element-wise Newton update for h is obtained: 113
ℎqg314R⇠ℎqg314R
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
(15)
Notice that this update does not automatically sati sfy (9), so updates should be followed by a 114
renormalization (10). One needs to pay attention to the fact that Newton updates will attract 115
towards both local minima and local maxima. Like fo r the EM-update, hr = 0 and ar = 0 are the 116
only fixed points of update (15), which are now sho wn to be locally stable. In case the optimizer is 117
at hr = 0, ar is negative by the KKT conditions, and update (15) will indeed decrease hr. In a 118
sufficiently small neighborhood of a point where th e gradient vanishes, i.e. ar = 0, update (15) will 119
increase (decrease) hr if and only if (11) increases (decreases) its esti mate. Since if (11) never 120
increases the cost, update (15) attracts to a minimum. 121
However, this only guarantees local convergence for per-element updates and Newton methods 122
are known to suffer from potentially small converge nce regions. This also applies to update (15), 123
which can indeed result in limit cycles in some cas es. In the next subsections, two measures are 124
taken to respectively increase the convergence region and to make the update non-increasing. 125
2.3 Step size li mitation 126
When ar is positive, update (15) may not be well-behaved i n the sense that its denominator can 127
become negative or zero. To respect nonnegativity a nd to avoid the singularity, it is bounded 128
below by a function with the same local behavior around zero: 129
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
= 1
1− qg18R3qg314R
ℎqg314Rqg18R4qg314R
≥1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
Hence, if ar ≥ 0, the following update is used:
(16)
ℎqg314R⇠ℎqg314Rqg343⇠1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
qg3441=ℎqg314R+qg18R3qg314R
qg18R4qg314R
(17)
Finally, step sizes are further limited by flooring resp. ceiling the multiplicative gain applied to hr 130
in update (15) and (17) (see Algorithm 1, steps 11 and 24 for details). 131
2.4 Non-increase of the cost 132
Despite the measures taken in section 2.3, the dive rgence can still increase under the Newton 133
update. A very safe option is to compute the EM upd ate additionally and compare the cost 134
function value for both updates. If the EM update i s be better, the Newton update is rejected and 135
the EM update is taken instead. This will guarantee non-increase of the cost function. The 136
computational cost of this operation is dominated b y evaluating the KL-divergence, not in 137
computing the update itself. 138
3 The Diagonalized Newton Algorithm for KLD-NMF 139
In Algorithm 1, the arguments given above are joined to form the Diagonalized Newton Algorithm 140
(DNA) for NMF with Kullback-Leibler divergence cost . Matlab TM code is available from 141
www.esat.kuleuven.be/psi/spraak/downloads both for the case when V is sparse or dense. 142
143
Algorithm 1: pseudocode for the DNA KLD-NMF algorithm. ⊘ and ⊙ are element-wise division 144
and multiplication respectively and [x] ε = max(x, ε). Steps not labelsed with “MU” is the additional 145
code required for DNA. 146
Input: data V , initial guess for W and H , regularization weights ρ and λ . 147
MU - Step 1: divide the r-th column of W by quni2211qg18∇Rqg3141qg314R qg3141+λ. Multiply the r-th row of H by the same number. 148
MU - Step 2: Z = WH 149
MU - Step 3: qg1∇91=qg1∇9⇠⊘qg1811 150
Repeat until convergence 151
MU - Step 4: precompute qg1∇9∇⨀qg1∇9∇ 152
MU - Step 5: qg1∇∇R=qg1∇9∇qg314∇qg1∇91−1 153
MU - Step 6: qg1∇82qg3114qg3122 =qg1∇82+qg1∇∇R⨀qg1∇82 154
MU - Step 7: qg1811qg3114qg3122 =qg1∇9∇qg1∇82qg3114qg3122 155
MU - Step 8: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 156
MU - Step 9: qg1814qg3114qg3122 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439 157
Step 10: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg4⇠⇠⇠qg1∇9∇⨀qg1∇9∇qg4⇠⇠∇qg2212qg1∇91qg33⇠R 158
Step 11: qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 159
qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇82qg4⇠⇠∇ for the entries for which A ≥ 0 160
multiply t-th column of H DNA with the t-th entry of qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇9⇠qg4⇠⇠∇⊘qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇82qg311Rqg311Rqg3112 qg4⇠⇠∇ 161
Step 12: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg1∇82qg311Rqg311Rqg3112 162
Step 13: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 163
Step 14: qg1814qg311Rqg311Rqg3112 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439 164
Step 15: copy H , Z and Q from: 165
H DNA , Z DNA and Q DNA for the columns for which d DNA < d MU 166
H EM , Z EM and Q EM for the columns for which d DNA ≥ d MU 167
MU - Step 16: divide (multiply) the r-th row (column) of H (W ) by quni2211ℎqg3141qg314∇ qg314∇+ρ. 168
Step 17: precompute qg1∇82⨀qg1∇82 169
MU - Step 18: qg1∇∇R=qg1∇91qg1∇82qg2212−1 170
MU - Step 19: qg1∇9∇qg3114qg3122 =qg1∇9∇+qg1∇∇R⨀qg1∇9∇ 171
MU - Step 20: qg1811qg3114qg3122 =qg1∇9∇qg3114qg3122 qg1∇82 172
MU - Step 21: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 173
MU - Step 22: qg1814qg3114qg3122 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439qg2∇∇8 174
Step 23: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg1∇91qg33⇠Rqg4⇠⇠⇠qg1∇82⨀qg1∇82qg4⇠⇠∇qg2212 175
Step 24: qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 176
qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇9∇qg4⇠⇠∇ for the entries for which A ≥ 0 177
multiply the n -th row of W DNA with the n -th entry of qg4⇠⇠⇠qg1∇9⇠qg2∇∇8 qg4⇠⇠∇⊘qg4⇠⇠⇠qg1∇9∇qg311Rqg311Rqg3112 qg2∇∇8qg4⇠⇠∇ 178
Step 25: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg311Rqg311Rqg3112 qg1∇82 179
Step 26: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 180
Step 27: qg1814qg311Rqg311Rqg3112 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439qg2∇∇8 181
Step 28: copy W , Z and Q from: 182
W DNA , Z DNA and Q DNA for the rows for which d DNA < d MU 183
W EM , Z EM and Q EM for the rows for which d DNA ≥ d MU 184
MU - Step 29: divide(multiply) the r-th column (row) of W (H ) by quni2211qg18∇Rqg3141qg314R qg3141+λ. 185
Notice that step 9, 14 22 and 27 require some care for the zeros in V, which should not contribute 186
to the cost. In terms of complexity, the most expen sive steps are the computation of A, B, ZMU and 187
ZDNA , which require O( NRT ) operations. All other steps require O( NR ), O( RT ) or O( NR ) 188
operations. Hence, it is expected that a DNA iterat ion is about twice as slow as MU iteration. On 189
modern hardware, parallelization may however distor t this picture and hence experimental 190
verification is requied. 191
4 Experiments 192
DNA and MU are run on several publicly available 1 data sets. In all cases, W is initialized with a 193
random matrix with uniform distribution, normalized column-wise. Then H is initialized as WtV 194
and one MU iteration is performed. The same initial values are used for both algorithms. Sparsity 195
is not included in this study, so ρ = λ = 0. The algorithm parameters are set to ε = 0.01 and α =4. 196
CPU timing measurements are obtained on a quad-core AMD TM Opteron 8356 processor running 197
the MATLAB TM code available at www.esat.kuleuven.be/psi/spraak/downloads which uses the 198
built-in parallelization capability. Timing measure ments on the graphical processing unit (GPU) 199
are obtained on a TESLA C2070 running MATLAB and Accelereyes Jacket v2.3. 200
4.1 Dense data matrices 201
The first dataset considered is a set of 400 fronta l face greyscale 64 × 64 images of 40 people 202
showing 10 different expressions. The resulting 40 96 × 165 dense matrix is decomposed with 203
factors of a common dimension R of 10, 20, 40 and 80. Figure 1 shows the KL diverg ence as a 204
function of iteration number and CPU time as measur ed on the CPU. The superiority of DNA is 205
obvious: for instance, at R = 40, DNA reaches the same divergence after 33 ite rations as MU 206
obtains after 500 iterations. This implies a speed- up of a factor 15 in terms of iterations or 6.3 in 207
terms of CPU time. 208
209
Figure 1: convergence of DNA and MU on the ORL image dataset as a function of the number of 210
iterations (left) and CPU time (right) for different ranks R. 211
The second test case is the CMU PIE dataset which c onsists of 11554 greyscale images of 32 × 32 212
pixels showing human faces under different illumina tion conditions and poses. The data are 213
shaped to a dense 1024 × 11554 matrix and a decomposition of rank R = 10, 20, 40 and 80 are 214
attempted with the MU and DNA algorithms. As obser ved in Figure 2, the proposed DNA still 215
outperforms MU, but by a smaller margin. 216
1 www.cad.zju.edu.cn/home/dengcai/Data/data.html
0 100 200 300 400 5000
1
2
3
4
5
6
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 10 20 30 40 500
1
2
3
4
5
6
7 x 10
6
time (s)
KLD
R=10
R=20
R=40
R=80
MU
DNA
217
Figure 2: convergence of DNA and MU on the CMU PIE image dataset as a function of the 218
number of iterations (left) and CPU time (right). 219
An overview of the time required for a single itera tion on both data sets is given in Table 1. For 220
MU, the first row lists the time if the KL divergen ce is not computed as this is not required if the 221
number of iterations is fixed in advance instead of stopping the algorithm based on a decrease in 222
KLD. The table shows that the computational cost of MU can be reduced by about a third by not 223
computing KLD. Compared to MU with cost calculation , DNA requires typically about 2.5 to 3 224
times more time per iteration on the CPU. On the GPU, the ratio is rather 2 to 2.5. 225
4.2 Sparse data matrices 226
The third matrix considered originates from the NIS T Topic Detection and Tracking Corpus 227
(TDT2). For 10212 documents (columns of V), the frequency of 36771 terms (rows of V) was 228
counted leading to a sparse 36771 × 10212 matrix with only 0.35% non-zero entries. The fourth 229
matrix originates from the Newsgroup corpus results in a 61188 × 18774 sparse frequency matrix 230
with 0.2% non-zeros. Both for MU and DNA a MATLAB i mplementation using the sparse matrix 231
class was made. In this case, an iteration of DNA i s twice as slow a MU iteration. Again, the 232
convergence of both algorithms is shown in Figure 3 . In this case, DNA is only marginally faster 233
than MU in terms of CPU time. 234
235
Table 1: time per iteration in milliseconds as measured on the CPU and GPU implementations for 236
different ranks ( R) and dense matrices (ORL/PIE). 237
dataset
R
processor CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU
MU without cost 78 3.7 85 4.1 96 5.0 115 6.8 310 18 310 20 330 27 400 38
MU with cost 114 6.4 118 7.0 130 7.9 161 9.4 480 35 490 37 510 44 580 55
DNA 269 15.5 280 15.9 319 17.9 425 23.6 1180 71 1430 76 1720 95 19 60 125
ORL PIE
10 20 40 80 10 20 40 80
238
239
240
Figure 3: convergence of DNA and MU on the sparse TDT2 (left) and Newsgroup (right) data. 241
5 Conclusions 242
The DNA algorithm is based on Newton’s method for s olving the stationarity conditions of the 243
constrained optimization problem implied by NMF. Th is paper only addresses the Kullback-244
Leibler divergence as a cost function. To avoid mat rix inversion, a diagonal approximation is 245
made, resulting in element-wise updates. Experiment al verification on publicly available matrices 246
with a CPU and GPU MATLAB implementation for dense data matrices and a CPU MATLAB 247
implementation for sparse data matrices show that, depending on the case and matrix sizes, DNA 248
iterations are 2 to 3 times slower than MU iteratio ns. In most cases, the diagonal approximation is 249
good enough such that faster convergence is observed and a net gain results. 250
Since Newton updates can in general not ensure mono tonic decrease of the cost function, the step 251
size was controlled with a brute force strategy of falling back to MU in case the cost is increased. 252
More refined step damping methods could speed up DN A by avoiding evaluations of the cost 253
function, which is next on the research agenda. 254
A c kno w l e dg me nt s 255
This work is supported by IWT-SBO project 100049 (A LADIN) and by KU Leuven research 256
grant OT/09/028(VASI). 257
0 20 40 60 80 1004
4.5
5
5.5
6
6.5
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 20 40 60 80 100
8
8.5
9
9.5
10
10.5
11 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
R e f e re nc e s 258
[1] D. Lee, and H. Seung, “Algorithms for non-negative matrix factorization,” Advances in Neural 259
Information Processing Systems , vol. 13, pp. 556–562, 2001. 260
[2] B. Raj, R. Singh and P. Smaragdis, “Recognizing Spe ech from Simultaneous Speakers”, in proceedings 261
of Eurospeech , pp. 3317-3320, Lisbon, Portugal, September 2005 262
[3] P. Smaragdis, “Convolutive Speech Bases and Their A pplication to Supervised Speaker Separation,” 263
IEEE Transactions on Audio, Speech and Language Processing , vol. 15, pp. 1-12, January 2007 264
[4] P. D. O'Grady and B. A. Pearlmutter, “Discovering S peech Phones Using Convolutive Non-negative 265
Matrix Factorisation with a Sparseness Constraint.,” Neurocomputing , vol. 72, no. 1-3, pp. 88-101, December 266
2008, ISSN 0925-2312. 267
[5] M. Van Segbroeck and H. Van hamme, “Unsupervised le arning of time-frequency patches as a noise-268
robust representation of speech,” Speech Communication , volume 51, no. 11, pp. 1124-1138, November 269
2009. 270
[6] H. Van hamme, “HAC-models: a Novel Approach to Cont inuous Speech Recognition,” In Proc. 271
International Conference on Spoken Language Process ing, pp. 2554-2557, Brisbane, Australia, September 272
2008. 273
[7] X. Chen, L. Gu, S. Z. Li and H.-J. Zhang, “Learning representative local features for face detection,” in 274
proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition , pp. 275
1126-1131, Kauai, HI, USA, December 2001. 276
[8] D. Kim, S. Sra and I. S. Dhillon, “Fast Projection- Based Methods for the Least Squares Nonnegative 277
Matrix Approximation Problem,” Statistical Analy Data Mining , vol. 1, 2008 278
[9] C.-J. Lin, “Projected gradient methods for non-nega tive matrix factorization,” Neural Computation , vol. 279
19, pp. 2756-2779, 2007 280
[10] R. Zdunek, A. H. Phan and A. Cichocki, “Damped Newt on Iterations for Nonnegative Matrix 281
Factorization,” Australian Journal of Intelligent Information Processing Systems , 12(1), pp. 16-22, 2010 282
[11] Y. Zheng, and Q. Zhang, “Damped Newton based Iterat ive Non-negative Matrix Factorization for 283
Intelligent Wood Defects Detection,” Journal of software , vol. 5, no. 8, pp. 899-906, August 2010. 284
[12] P. Gong, and C. Zhang, “Efficient Nonnegative Matri x Factorization via projected Newton method”, 285
Pattern Recognition , vol. 45, no. 9, pp. 3557-3565, September 2012. 286
[13] S. Bellavia, M. Macconi, and B. Morini, “An interio r point Newton-like method for nonnegative least-287
squares problems with degenerate solution,” Numerical Linear Algebra with Applications , vol. 13, no. 10, pp. 288
825-846, December 2006. 289
[14] R. Zdunek and A. Cichocki, “Non-Negative Matrix Fac torization with Quasi-Newton Optimization,” 290
Lecture Notes in Computer Science, Artificial Intelligence and Soft Computing 4029, pp. 870-879, 2006 291
[15] R. Zdunek and A. Cichocki, "Nonnegative Matrix Fact orization with Constrained Second-Order 292
Optimization", Signal Processing , vol. 87, pp. 1904-1916, 2007 293
[16] G. Landi and E. Loli Piccolomini, “A projected Newt on-CG method for nonnegative astronomical image 294
deblurring,” Numerical Algorithms , no. 48, pp. 279–300, 2008 295
[17] C.-J. Hsieh and I. S. Dhillon, “Fast Coordinate Des cent Methods with Variable Selection for Non-296
negative Matrix Factorization,” in proceedings of the 17th ACM SIGKDD International Conference on 297
Knowledge Discovery & Data Mining (KDD), San Diego, CA, USA, August 2011 298
[18] L. Li, G. Lebanon and H. Park, “Fast Bregman Diverg ence NMF using Taylor Expansion and 299
Coordinate Descent,” in proceedings of the 18 th ACM SIGKDD Conference on Knowledge Discovery and 300
Data Mining, 2012 301
[19] A. Cichocki, S. Cruces, and S.-I. Amari, “Generaliz ed Alpha-Beta Divergences and Their Application to 302
Robust Nonnegative Matrix Factorization,” Entropy , vol. 13, pp. 134-170, 2011; doi:10.3390/e13010134 303
[20] I. S. Dhillon and S. Sra, “Generalized Nonnegative Matrix Approximations with Bregman Divergences,” 304
Neural Information Proc. Systems , pp. 283-290, 2005 305
|
Hugo Van hamme
|
Unknown
| 2,013
|
{"id": "i87JIQTAnB8AQ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358343900000, "tmdate": 1358343900000, "ddate": null, "number": 60, "content": {"title": "The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.", "pdf": "https://arxiv.org/abs/1301.3389", "paperhash": "hamme|the_diagonalized_newton_algorithm_for_nonnegative_matrix_factorization", "authors": ["Hugo Van hamme"], "authorids": ["hugo.vanhamme@esat.kuleuven.be"], "keywords": [], "conflicts": []}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["hugo.vanhamme@esat.kuleuven.be"], "writers": []}
|
[Review]:
This paper develops a new iterative optimization algorithm for performing non-negative matrix factorization, assuming a standard 'KL-divergence' objective function. The method proposed combines the use of a traditional updating scheme ('multiplicative updates' from [1]) in the initial phase of optimization, with a diagonal Newton approach which is automatically switched to when it will help. This switching is accomplished by always computing both updates and taking whichever is best, which will typically be MU at the start and the more rapidly converging (but less stable) Newton method towards the end. Additionally, the diagonal Newton updates are made more stable using a few tricks, some of which are standard and some of which may not be. It is found that this can provide speed-ups which may be mild or significant, depending on the application, versus a standard approach which only uses multiplicative updates. As pointed out by the authors, Newton-type methods have been explored for non-negative matrix factorization before, but not for this particularly objective with a diagonal approximation (except perhaps [17]?).
The writing is rough in a few places but okay overall. The experimental results seem satisfactory compared to the classical algorithm from [1], although comparisons to other potentially more recent approaches is conspicuously absent. I'm not an experiment on matrix factorization or these particular datasets so it's hard for me to independently judge if these results are competitive with state of the art methods.
The paper doesn't seem particularly novel to me, but matrix factorization isn't a topic I find particularly interesting, so this probably biases me against the paper somewhat.
Pros:
- reasonably well presented
- empirical results seem okay
Cons:
- comparisons to more recent approaches is lacking
- it's not clear that matrix factorization is a problem for which optimization speed is a primary concern (all of the experiments in the paper terminate after only a few minutes)
- writing is rough in a few places
Detailed comments:
Using a KL-divergence objective seems strange to me since there aren't any distributions involved, just matrices, whose entries, while positive, need not sum to 1 along any row or column. Are the entries of the matrices supposed to represent probabilities? I understand that this is a formulation used in previous work ([1]), but it should be briefly explained.
You should explain the connection between your work and [17] more carefully. Exactly how is it similar/different?
Has a diagonal Newton-type approach ever been used for the squared error objective?
'the smallest cost' -> 'leading to the greatest reduction in d_{KL}(V,Z)'
'the variables required to compute' -> 'the quantities required to compute'
You should avoid using two meanings of the word 'regularized' as this can lead to confusion. Maybe 'damped' would work better to refer to the modifications made to the Newton updates that prevent divergence?
Have you compared to using damped/'regularized' Newton updates instead of your method of selecting the best between the Newton and MU updates? In my experience, damping, along the lines of the LM algorithm or something similar, can help a great deal.
I would recommend using ' op' to denote matrix transposition instead of what you are doing.
Section 2 needs to be reorganized. It's hard for me to follow what you are trying to say here. First, you introduce some regularization terms. Then, you derive a particular fixed-point update scheme. When you say 'Minimizing [...] is achieved by alternative updates...' surely you mean that this is just one particular way it might be done. Also, are these derivation prior work (e.g. from [1])? If so, it should be stated.
It's hard to follow the derivations in this section. You say you are applying the KKT conditions, but your derivation is strange and you seem to skip a bunch of steps and neglect to use explicit KKT multipliers (although the result seems correct based on my independent derivation). But when you say: 'If h_r = 0, the partial derivative is positive. Hence the product of h_r and the partial derivative is always zero', I don't see how this is a correct logical implication. Rather, the product is zero for any solution satisfying complementary slackness. And I don't understand why it is particularly important that the sum over equation (6) is zero (which is how the normalization in eqn 10 is justified). Surely this is only a (weak) necessary condition, but not a sufficient one, for a valid optimal solution. Or is there some reason why this is sufficient (if so, please state it in the paper!).
I don't understand how the sentence on line 122 'Therefor...' is not a valid logical implication. Did you actually mean to use the word 'therefor' here? The lower bound is, however, correct.
'floor resp. ceiling'??
|
anonymous reviewer 57f3
| null | null |
{"id": "oo1KoBhzu3CGs", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1362192540000, "tmdate": 1362192540000, "ddate": null, "number": 6, "content": {"title": "review of The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization", "review": "This paper develops a new iterative optimization algorithm for performing non-negative matrix factorization, assuming a standard 'KL-divergence' objective function. The method proposed combines the use of a traditional updating scheme ('multiplicative updates' from [1]) in the initial phase of optimization, with a diagonal Newton approach which is automatically switched to when it will help. This switching is accomplished by always computing both updates and taking whichever is best, which will typically be MU at the start and the more rapidly converging (but less stable) Newton method towards the end. Additionally, the diagonal Newton updates are made more stable using a few tricks, some of which are standard and some of which may not be. It is found that this can provide speed-ups which may be mild or significant, depending on the application, versus a standard approach which only uses multiplicative updates. As pointed out by the authors, Newton-type methods have been explored for non-negative matrix factorization before, but not for this particularly objective with a diagonal approximation (except perhaps [17]?).\r\n\r\nThe writing is rough in a few places but okay overall. The experimental results seem satisfactory compared to the classical algorithm from [1], although comparisons to other potentially more recent approaches is conspicuously absent. I'm not an experiment on matrix factorization or these particular datasets so it's hard for me to independently judge if these results are competitive with state of the art methods.\r\n\r\nThe paper doesn't seem particularly novel to me, but matrix factorization isn't a topic I find particularly interesting, so this probably biases me against the paper somewhat. \r\n\r\nPros:\r\n- reasonably well presented\r\n- empirical results seem okay\r\nCons:\r\n- comparisons to more recent approaches is lacking\r\n- it's not clear that matrix factorization is a problem for which optimization speed is a primary concern (all of the experiments in the paper terminate after only a few minutes)\r\n- writing is rough in a few places\r\n\r\n\r\n\r\nDetailed comments:\r\n\r\nUsing a KL-divergence objective seems strange to me since there aren't any distributions involved, just matrices, whose entries, while positive, need not sum to 1 along any row or column. Are the entries of the matrices supposed to represent probabilities? I understand that this is a formulation used in previous work ([1]), but it should be briefly explained.\r\n\r\nYou should explain the connection between your work and [17] more carefully. Exactly how is it similar/different?\r\n\r\nHas a diagonal Newton-type approach ever been used for the squared error objective?\r\n\r\n'the smallest cost' -> 'leading to the greatest reduction in d_{KL}(V,Z)'\r\n\r\n'the variables required to compute' -> 'the quantities required to compute'\r\n\r\nYou should avoid using two meanings of the word 'regularized' as this can lead to confusion. Maybe 'damped' would work better to refer to the modifications made to the Newton updates that prevent divergence?\r\n\r\nHave you compared to using damped/'regularized' Newton updates instead of your method of selecting the best between the Newton and MU updates? In my experience, damping, along the lines of the LM algorithm or something similar, can help a great deal.\r\n\r\nI would recommend using '\top' to denote matrix transposition instead of what you are doing.\r\n\r\nSection 2 needs to be reorganized. It's hard for me to follow what you are trying to say here. First, you introduce some regularization terms. Then, you derive a particular fixed-point update scheme. When you say 'Minimizing [...] is achieved by alternative updates...' surely you mean that this is just one particular way it might be done. Also, are these derivation prior work (e.g. from [1])? If so, it should be stated.\r\n\r\nIt's hard to follow the derivations in this section. You say you are applying the KKT conditions, but your derivation is strange and you seem to skip a bunch of steps and neglect to use explicit KKT multipliers (although the result seems correct based on my independent derivation). But when you say: 'If h_r = 0, the partial derivative is positive. Hence the product of h_r and the partial derivative is always zero', I don't see how this is a correct logical implication. Rather, the product is zero for any solution satisfying complementary slackness. And I don't understand why it is particularly important that the sum over equation (6) is zero (which is how the normalization in eqn 10 is justified). Surely this is only a (weak) necessary condition, but not a sufficient one, for a valid optimal solution. Or is there some reason why this is sufficient (if so, please state it in the paper!).\r\n\r\nI don't understand how the sentence on line 122 'Therefor...' is not a valid logical implication. Did you actually mean to use the word 'therefor' here? The lower bound is, however, correct.\r\n\r\n'floor resp. ceiling'??"}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "i87JIQTAnB8AQ", "readers": ["everyone"], "nonreaders": [], "signatures": ["anonymous reviewer 57f3"], "writers": ["anonymous"]}
|
{
"criticism": 12,
"example": 3,
"importance_and_relevance": 2,
"materials_and_methods": 17,
"praise": 3,
"presentation_and_reporting": 18,
"results_and_discussion": 8,
"suggestion_and_solution": 10,
"total": 43
}
| 1.697674
| -12.506512
| 14.204187
| 1.773556
| 0.714406
| 0.075882
| 0.27907
| 0.069767
| 0.046512
| 0.395349
| 0.069767
| 0.418605
| 0.186047
| 0.232558
|
{
"criticism": 0.27906976744186046,
"example": 0.06976744186046512,
"importance_and_relevance": 0.046511627906976744,
"materials_and_methods": 0.3953488372093023,
"praise": 0.06976744186046512,
"presentation_and_reporting": 0.4186046511627907,
"results_and_discussion": 0.18604651162790697,
"suggestion_and_solution": 0.23255813953488372
}
| 1.697674
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
i87JIQTAnB8AQ
|
The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization
|
Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.
|
The Diagonalized Newton Algorithm for Non-
negative Matrix Factorization
Hugo Van hamme 1
University of Leuven, dept. ESAT 2
Kasteelpark Arenberg 10 – bus 2441, 3001 Leuven, B elgium 3
hugo.vanhamme@esat.kuleuven.be 4
Abstract 5
Non-negative matrix factorization (NMF) has become a popular machine 6
learning approach to many problems in text mining, speech and image 7
processing, bio-informatics and seismic data analys is to name a few. In 8
NMF, a matrix of non-negative data is approximated by the low-rank 9
product of two matrices with non-negative entries. In this paper, the 10
approximation quality is measured by the Kullback-L eibler divergence 11
between the data and its low-rank reconstruction. T he existence of the 12
simple multiplicative update (MU) algorithm for com puting the matrix 13
factors has contributed to the success of NMF. Desp ite the availability of 14
algorithms showing faster convergence, MU remains p opular due to its 15
simplicity. In this paper, a diagonalized Newton al gorithm (DNA) is 16
proposed showing faster convergence while the imple mentation remains 17
simple and suitable for high-rank problems. The DNA algorithm is applied 18
to various publicly available data sets, showing a substantial speed-up on 19
modern hardware. 20
21
1 Introduction 22
Non-negative matrix factorization (NMF) denotes the process of factorizing a N×T data 23
matrix V of non-negative real numbers into the product of a N×R matrix W and a R×T 24
matrix H, where both W and H contain only non-negative real numbers. Taking a c olumn-25
wise view of the data, i.e. each of the T columns of V is a sample of N-dimensional vector 26
data, the factorization expresses each sample as a (weighted) addition of columns of W, 27
which can hence be interpreted as the R parts that make up the data [1]. Hence, NMF can be 28
used to learn data representations from samples. In [2], speaker representations are learnt 29
from spectral data using NMF and subsequently appli ed to separate their signals. Another 30
example in speech processing is [3] and [4], where phone representations are learnt using a 31
convolutional extention of NMF. In [5], time-freque ncy representations reminiscent of 32
formant traces are learnt from speech using NMF. In [6], NMF is used to learn acoustic 33
representations for words in a vocabulary acquisiti on and recognition task. Applied to image 34
processing, local features are learnt from examples with NMF in order to represent human 35
faces in a detection task [7]. 36
In this paper, the metric to measure the closeness of reconstruction Z = WH to its target V is 37
measured by their Kullback-Leibler divergence: 38
39
qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119ZZ ZZqg4⇠⇠∇=qg3R33qg18∇4qg3141qg314∇ qg18⇠4qg18⇠∇qg18R9 qg343⇠qg18∇4qg3141qg314∇
qg18∇8qg3141qg314∇
qg3441−qg3R33qg18∇4qg3141qg314∇
qg3141quni112⊘qg314∇
+qg3R33qg18∇8qg3141qg314∇
qg3141quni112⊘qg314∇qg3141quni112⊘qg314∇
(1)
Given a data matrix V, the matrix factors W and H are then found by minimizing cost 40
function (1), which yields the maximum likelihood e stimate if the data are drawn from a 41
Poisson distribution. The multiplicative updates (M U) algorithm proposed in [1] solves 42
exactly this problem in an iterative manner. Its si mplicity and the availability of many 43
implementations make it a popular algorithm to date to solve NMF problems. However, there 44
are some drawbacks to the algorithm. Firstly, it on ly converges locally and is not guaranteed 45
to yield the global minimum of the cost function. I t is hence sensitive to the choice of the 46
initial guesses for W and H. Secondly, MU is very slow to converge. The goal of this paper 47
is to speed up the convergence while the local convergence proper ty is retained. The 48
resulting Diagonalized Newton Algorithm (DNA) uses only simple element-wise operations , 49
such that its implementation requires only a few te ns of lines of code, while memory 50
requirements and computational efforts for a single iteration are about the double of an MU 51
update. 52
The faster convergence rate is obtained by applying Newton’s method to minimize 53
dKL (V,WH ) over W and H in alternation. Newton updates have been explored for the Frobe-54
nius norm to measure the distance between V and Z in e.g. [8]-[13]. Specifically, in [11] a 55
diagonal Newton method is applied Frobenius norms. For the Kullback-Leibler divergence, 56
fewer studies are available. Since each optimizatio n problem is multivariate, Newton updates 57
typically imply solving sets of linear equations in each iteration. In [16], the Hessian is 58
reduced by refraining from second order updates for the parameters close to zero. In [17], 59
Newton updates are applied per coordinate, but in a cyclic order, which is troublesome for 60
GPU implementations. In the proposed method, matrix inversion is avoided by diagonalizing 61
the Hessian matrix. The resulting updates resemble the ones derived in [18] to the extent that 62
they involve second order derivatives. Important di fferences are that [18] involves the non-63
negative k-residuals hence requiring flooring to zero. Of cou rse, the diagonal approximation 64
may affect the convergence rate adversely. Also, Ne wton algorithms only show (quadratic) 65
convergence when the estimate is sufficiently close to the local minimum and therefore need 66
damping, e.g. Levenberg-Marquardt as in [14], or st ep size control as in [15] and [16]. In 67
DNA, these convergence issues are addressed by comp uting both the MU and Newton 68
solutions and selecting the one leading to the grea test reduction in dKL (V,Z). Hence, since 69
the cost is non-decreasing under MU, it will also b e under DNA updates. This robust safety 70
net can be constructed fairly efficiently because t he quantities required to compute the MU 71
have already been computed in the Newton update. Th e net result is that DNA iterations are 72
only about two to three times as slow as MU iterati ons, both on a CPU and on a GPU. The 73
experimental analysis shows that the increased conv ergence rate generally dominates over 74
the increased cost per iteration such that overall balance is positive and can lead to speedups 75
of up to a factor 6. 76
2 NMF formulation 77
To induce sparsity on the matrix factors, the KL-di vergence is often regularized, i.e. one 78
seeks to minimize: 79
quni1119qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R
qg3141quni112⊘qg314R
+λqg3R33ℎqg314Rqg314∇
qg314Rquni112⊘qg314∇
(2)
subject to non-negativity constraints on all entrie s of W and H. Here, ρ and λ are non-negative re-80
gularization parameters. 81
Minimizing the regularized KL-divergence (2) can be achieved by alternating updates of W and H 82
for which the cost is non-increasing. The updates for this form of block coordinate descent are: 83
qg1∇82quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇82qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4R93qg4⇠⇠∇+λqg3R33ℎqg314Rqg314∇
qg4R93
qg314Rquni112⊘qg314∇
qg3441 (3)
qg1∇9∇quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇9∇qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119qg1∇9∇qg4R93qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R qg4R93
qg3141quni112⊘qg314R
qg3441 (4)
Because of the symmetry property dKL (V,WH ) = dKL (Vt,HtWt), where superscript- t denotes 84
matrix transpose, it suffices to consider only the update on H. Furthermore, because of the 85
summation over all columns in (1), minimization (3) splits up into T independent optimiza-86
tion problems. Let v denote any column of V and let h denote the corresponding column of H, 87
then the following is the core minimization problem to be considered: 88
qg1818quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1818qg4R93≥qg2∇∇∇quni1119
quni1119qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1818qg4R93qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4R93qg4⇠⇠∇ (5)
where 1 denotes a vector of ones of appropriate length. Th e solution of (5) should satisfy the KKT 89
conditions, i.e. for all r with hr > 0 90
qg2134qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠quni11∇⇠quni1119quni11∇⇠quni1119 quni11∇⇠quni1119quni11∇⇠quni1119quni112⊘quni1119WW WWquni1119qg1818qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4⇠⇠∇
qg2134ℎqg314R
=−qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
+qg3R33qg18∇Rqg3141qg314R
qg3141
+λ =0
where hr denotes the r-th component of h. If hr = 0, the partial derivative is positive. Hence the 91
product of hr and the partial derivative is always zero for a solution of (5), i.e. for r = 1 … R: 92
qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R ℎqg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
−ℎqg314Rqg343∇qg3R33qg18∇Rqg3141qg314R
qg3141
+λqg3441=0 (6)
Since W-columns with all-zeros do not contribute to Z, it can be assumed that column sums of W 93
are non-zero, so the above can be recast as: 94
ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −ℎqg314R=0
where qn = vn / (Wh )n. To facilitate the derivations below, the following notations are introduced: 95
qg18R3qg314R=
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −1 (7)
which are functions of h via q. The KKT conditions are hence recast as [20] 96
quni1119qg18R3qg314Rquni1119ℎqg314R=0quni1119quni1119quni1119quni1119quni1119quni11⇠⇠quni11⇠Fquni11∇2quni1119quni11∇2quni1119=quni11191quni1119quni212⇠quni1119R (8)
Finally, summing (6) over r yields 97
qg3R33qg4⇠⇠⇠qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8qg4⇠⇠∇qg314R+λqg4⇠⇠∇ℎqg314R
qg314R
=qg3R33qg18∇4qg3141
qg3141
(9)
which is satisfied for any guess h by renormalizing: 98
ℎqg314R⇠ℎqg314R
quni11∇⇠quni11∇⇠ quni11∇⇠quni11∇⇠qg314∇11 11
qg1818qg314∇qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8+λqg4⇠⇠∇ (10)
2.1 Multiplicative updates 99
For the more generic class of Bregman divergences, it was shown in a.o. [20] that multipli-100
cative updates (MU) are non-decreasing at each upda te of W and H. For KL-divergence, MU 101
are identical to a fixed point update of (6), i.e. 102
ℎqg314R⇠ℎqg314Rqg4⇠⇠⇠1+qg18R3qg314Rqg4⇠⇠∇=ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ (11)
Update (11) has two fixed points: hr = 0 and ar = 0. In the former case, the KKT conditions imply 103
that ar is negative. 104
105
2.2 Newton updates 106
To find the stationary points of (2), R equations (8) need to be solved for h. In general, let g(h) be 107
an R-dimensional vector function of an R-dimensional variable h. Newton’s update then states: 108
qg1818⇠qg1818−quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg28∇9qg28⇠9qg181∇qg4⇠⇠⇠qg1818qg4⇠⇠∇quni1119quni1119quni1119wquni11⇠9tquni11⇠8 quni1119quni1119quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=∂qg18R9qg314Rqg4⇠⇠⇠qg1818qg4⇠⇠∇
∂ℎqg3139
(12)
Applied to equations (8): 109
qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=qg18R3qg3139qg2112qg314Rqg3139− ℎqg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg313⇠qg18∇Rqg313⇠qg314R qg18∇Rqg313⇠qg3139
qg4⇠⇠⇠qg1∇9∇qg1818 qg4⇠⇠∇qg313⇠
qg28∇1
qg313⇠
(13)
where δ rl is Kronecker’s delta. To avoid the matrix inversio n in update (12), the last term in 110
equation (13) is diagonalized, which is equivalent to solving the r-th equation in (8) for hr with all 111
other components fixed. With 112
qg18R4qg314R= 1
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R qg28∇1
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg28∇1
qg3141
(14)
which is always positive, an element-wise Newton update for h is obtained: 113
ℎqg314R⇠ℎqg314R
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
(15)
Notice that this update does not automatically sati sfy (9), so updates should be followed by a 114
renormalization (10). One needs to pay attention to the fact that Newton updates will attract 115
towards both local minima and local maxima. Like fo r the EM-update, hr = 0 and ar = 0 are the 116
only fixed points of update (15), which are now sho wn to be locally stable. In case the optimizer is 117
at hr = 0, ar is negative by the KKT conditions, and update (15) will indeed decrease hr. In a 118
sufficiently small neighborhood of a point where th e gradient vanishes, i.e. ar = 0, update (15) will 119
increase (decrease) hr if and only if (11) increases (decreases) its esti mate. Since if (11) never 120
increases the cost, update (15) attracts to a minimum. 121
However, this only guarantees local convergence for per-element updates and Newton methods 122
are known to suffer from potentially small converge nce regions. This also applies to update (15), 123
which can indeed result in limit cycles in some cas es. In the next subsections, two measures are 124
taken to respectively increase the convergence region and to make the update non-increasing. 125
2.3 Step size li mitation 126
When ar is positive, update (15) may not be well-behaved i n the sense that its denominator can 127
become negative or zero. To respect nonnegativity a nd to avoid the singularity, it is bounded 128
below by a function with the same local behavior around zero: 129
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
= 1
1− qg18R3qg314R
ℎqg314Rqg18R4qg314R
≥1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
Hence, if ar ≥ 0, the following update is used:
(16)
ℎqg314R⇠ℎqg314Rqg343⇠1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
qg3441=ℎqg314R+qg18R3qg314R
qg18R4qg314R
(17)
Finally, step sizes are further limited by flooring resp. ceiling the multiplicative gain applied to hr 130
in update (15) and (17) (see Algorithm 1, steps 11 and 24 for details). 131
2.4 Non-increase of the cost 132
Despite the measures taken in section 2.3, the dive rgence can still increase under the Newton 133
update. A very safe option is to compute the EM upd ate additionally and compare the cost 134
function value for both updates. If the EM update i s be better, the Newton update is rejected and 135
the EM update is taken instead. This will guarantee non-increase of the cost function. The 136
computational cost of this operation is dominated b y evaluating the KL-divergence, not in 137
computing the update itself. 138
3 The Diagonalized Newton Algorithm for KLD-NMF 139
In Algorithm 1, the arguments given above are joined to form the Diagonalized Newton Algorithm 140
(DNA) for NMF with Kullback-Leibler divergence cost . Matlab TM code is available from 141
www.esat.kuleuven.be/psi/spraak/downloads both for the case when V is sparse or dense. 142
143
Algorithm 1: pseudocode for the DNA KLD-NMF algorithm. ⊘ and ⊙ are element-wise division 144
and multiplication respectively and [x] ε = max(x, ε). Steps not labelsed with “MU” is the additional 145
code required for DNA. 146
Input: data V , initial guess for W and H , regularization weights ρ and λ . 147
MU - Step 1: divide the r-th column of W by quni2211qg18∇Rqg3141qg314R qg3141+λ. Multiply the r-th row of H by the same number. 148
MU - Step 2: Z = WH 149
MU - Step 3: qg1∇91=qg1∇9⇠⊘qg1811 150
Repeat until convergence 151
MU - Step 4: precompute qg1∇9∇⨀qg1∇9∇ 152
MU - Step 5: qg1∇∇R=qg1∇9∇qg314∇qg1∇91−1 153
MU - Step 6: qg1∇82qg3114qg3122 =qg1∇82+qg1∇∇R⨀qg1∇82 154
MU - Step 7: qg1811qg3114qg3122 =qg1∇9∇qg1∇82qg3114qg3122 155
MU - Step 8: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 156
MU - Step 9: qg1814qg3114qg3122 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439 157
Step 10: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg4⇠⇠⇠qg1∇9∇⨀qg1∇9∇qg4⇠⇠∇qg2212qg1∇91qg33⇠R 158
Step 11: qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 159
qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇82qg4⇠⇠∇ for the entries for which A ≥ 0 160
multiply t-th column of H DNA with the t-th entry of qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇9⇠qg4⇠⇠∇⊘qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇82qg311Rqg311Rqg3112 qg4⇠⇠∇ 161
Step 12: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg1∇82qg311Rqg311Rqg3112 162
Step 13: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 163
Step 14: qg1814qg311Rqg311Rqg3112 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439 164
Step 15: copy H , Z and Q from: 165
H DNA , Z DNA and Q DNA for the columns for which d DNA < d MU 166
H EM , Z EM and Q EM for the columns for which d DNA ≥ d MU 167
MU - Step 16: divide (multiply) the r-th row (column) of H (W ) by quni2211ℎqg3141qg314∇ qg314∇+ρ. 168
Step 17: precompute qg1∇82⨀qg1∇82 169
MU - Step 18: qg1∇∇R=qg1∇91qg1∇82qg2212−1 170
MU - Step 19: qg1∇9∇qg3114qg3122 =qg1∇9∇+qg1∇∇R⨀qg1∇9∇ 171
MU - Step 20: qg1811qg3114qg3122 =qg1∇9∇qg3114qg3122 qg1∇82 172
MU - Step 21: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 173
MU - Step 22: qg1814qg3114qg3122 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439qg2∇∇8 174
Step 23: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg1∇91qg33⇠Rqg4⇠⇠⇠qg1∇82⨀qg1∇82qg4⇠⇠∇qg2212 175
Step 24: qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 176
qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇9∇qg4⇠⇠∇ for the entries for which A ≥ 0 177
multiply the n -th row of W DNA with the n -th entry of qg4⇠⇠⇠qg1∇9⇠qg2∇∇8 qg4⇠⇠∇⊘qg4⇠⇠⇠qg1∇9∇qg311Rqg311Rqg3112 qg2∇∇8qg4⇠⇠∇ 178
Step 25: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg311Rqg311Rqg3112 qg1∇82 179
Step 26: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 180
Step 27: qg1814qg311Rqg311Rqg3112 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439qg2∇∇8 181
Step 28: copy W , Z and Q from: 182
W DNA , Z DNA and Q DNA for the rows for which d DNA < d MU 183
W EM , Z EM and Q EM for the rows for which d DNA ≥ d MU 184
MU - Step 29: divide(multiply) the r-th column (row) of W (H ) by quni2211qg18∇Rqg3141qg314R qg3141+λ. 185
Notice that step 9, 14 22 and 27 require some care for the zeros in V, which should not contribute 186
to the cost. In terms of complexity, the most expen sive steps are the computation of A, B, ZMU and 187
ZDNA , which require O( NRT ) operations. All other steps require O( NR ), O( RT ) or O( NR ) 188
operations. Hence, it is expected that a DNA iterat ion is about twice as slow as MU iteration. On 189
modern hardware, parallelization may however distor t this picture and hence experimental 190
verification is requied. 191
4 Experiments 192
DNA and MU are run on several publicly available 1 data sets. In all cases, W is initialized with a 193
random matrix with uniform distribution, normalized column-wise. Then H is initialized as WtV 194
and one MU iteration is performed. The same initial values are used for both algorithms. Sparsity 195
is not included in this study, so ρ = λ = 0. The algorithm parameters are set to ε = 0.01 and α =4. 196
CPU timing measurements are obtained on a quad-core AMD TM Opteron 8356 processor running 197
the MATLAB TM code available at www.esat.kuleuven.be/psi/spraak/downloads which uses the 198
built-in parallelization capability. Timing measure ments on the graphical processing unit (GPU) 199
are obtained on a TESLA C2070 running MATLAB and Accelereyes Jacket v2.3. 200
4.1 Dense data matrices 201
The first dataset considered is a set of 400 fronta l face greyscale 64 × 64 images of 40 people 202
showing 10 different expressions. The resulting 40 96 × 165 dense matrix is decomposed with 203
factors of a common dimension R of 10, 20, 40 and 80. Figure 1 shows the KL diverg ence as a 204
function of iteration number and CPU time as measur ed on the CPU. The superiority of DNA is 205
obvious: for instance, at R = 40, DNA reaches the same divergence after 33 ite rations as MU 206
obtains after 500 iterations. This implies a speed- up of a factor 15 in terms of iterations or 6.3 in 207
terms of CPU time. 208
209
Figure 1: convergence of DNA and MU on the ORL image dataset as a function of the number of 210
iterations (left) and CPU time (right) for different ranks R. 211
The second test case is the CMU PIE dataset which c onsists of 11554 greyscale images of 32 × 32 212
pixels showing human faces under different illumina tion conditions and poses. The data are 213
shaped to a dense 1024 × 11554 matrix and a decomposition of rank R = 10, 20, 40 and 80 are 214
attempted with the MU and DNA algorithms. As obser ved in Figure 2, the proposed DNA still 215
outperforms MU, but by a smaller margin. 216
1 www.cad.zju.edu.cn/home/dengcai/Data/data.html
0 100 200 300 400 5000
1
2
3
4
5
6
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 10 20 30 40 500
1
2
3
4
5
6
7 x 10
6
time (s)
KLD
R=10
R=20
R=40
R=80
MU
DNA
217
Figure 2: convergence of DNA and MU on the CMU PIE image dataset as a function of the 218
number of iterations (left) and CPU time (right). 219
An overview of the time required for a single itera tion on both data sets is given in Table 1. For 220
MU, the first row lists the time if the KL divergen ce is not computed as this is not required if the 221
number of iterations is fixed in advance instead of stopping the algorithm based on a decrease in 222
KLD. The table shows that the computational cost of MU can be reduced by about a third by not 223
computing KLD. Compared to MU with cost calculation , DNA requires typically about 2.5 to 3 224
times more time per iteration on the CPU. On the GPU, the ratio is rather 2 to 2.5. 225
4.2 Sparse data matrices 226
The third matrix considered originates from the NIS T Topic Detection and Tracking Corpus 227
(TDT2). For 10212 documents (columns of V), the frequency of 36771 terms (rows of V) was 228
counted leading to a sparse 36771 × 10212 matrix with only 0.35% non-zero entries. The fourth 229
matrix originates from the Newsgroup corpus results in a 61188 × 18774 sparse frequency matrix 230
with 0.2% non-zeros. Both for MU and DNA a MATLAB i mplementation using the sparse matrix 231
class was made. In this case, an iteration of DNA i s twice as slow a MU iteration. Again, the 232
convergence of both algorithms is shown in Figure 3 . In this case, DNA is only marginally faster 233
than MU in terms of CPU time. 234
235
Table 1: time per iteration in milliseconds as measured on the CPU and GPU implementations for 236
different ranks ( R) and dense matrices (ORL/PIE). 237
dataset
R
processor CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU
MU without cost 78 3.7 85 4.1 96 5.0 115 6.8 310 18 310 20 330 27 400 38
MU with cost 114 6.4 118 7.0 130 7.9 161 9.4 480 35 490 37 510 44 580 55
DNA 269 15.5 280 15.9 319 17.9 425 23.6 1180 71 1430 76 1720 95 19 60 125
ORL PIE
10 20 40 80 10 20 40 80
238
239
240
Figure 3: convergence of DNA and MU on the sparse TDT2 (left) and Newsgroup (right) data. 241
5 Conclusions 242
The DNA algorithm is based on Newton’s method for s olving the stationarity conditions of the 243
constrained optimization problem implied by NMF. Th is paper only addresses the Kullback-244
Leibler divergence as a cost function. To avoid mat rix inversion, a diagonal approximation is 245
made, resulting in element-wise updates. Experiment al verification on publicly available matrices 246
with a CPU and GPU MATLAB implementation for dense data matrices and a CPU MATLAB 247
implementation for sparse data matrices show that, depending on the case and matrix sizes, DNA 248
iterations are 2 to 3 times slower than MU iteratio ns. In most cases, the diagonal approximation is 249
good enough such that faster convergence is observed and a net gain results. 250
Since Newton updates can in general not ensure mono tonic decrease of the cost function, the step 251
size was controlled with a brute force strategy of falling back to MU in case the cost is increased. 252
More refined step damping methods could speed up DN A by avoiding evaluations of the cost 253
function, which is next on the research agenda. 254
A c kno w l e dg me nt s 255
This work is supported by IWT-SBO project 100049 (A LADIN) and by KU Leuven research 256
grant OT/09/028(VASI). 257
0 20 40 60 80 1004
4.5
5
5.5
6
6.5
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 20 40 60 80 100
8
8.5
9
9.5
10
10.5
11 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
R e f e re nc e s 258
[1] D. Lee, and H. Seung, “Algorithms for non-negative matrix factorization,” Advances in Neural 259
Information Processing Systems , vol. 13, pp. 556–562, 2001. 260
[2] B. Raj, R. Singh and P. Smaragdis, “Recognizing Spe ech from Simultaneous Speakers”, in proceedings 261
of Eurospeech , pp. 3317-3320, Lisbon, Portugal, September 2005 262
[3] P. Smaragdis, “Convolutive Speech Bases and Their A pplication to Supervised Speaker Separation,” 263
IEEE Transactions on Audio, Speech and Language Processing , vol. 15, pp. 1-12, January 2007 264
[4] P. D. O'Grady and B. A. Pearlmutter, “Discovering S peech Phones Using Convolutive Non-negative 265
Matrix Factorisation with a Sparseness Constraint.,” Neurocomputing , vol. 72, no. 1-3, pp. 88-101, December 266
2008, ISSN 0925-2312. 267
[5] M. Van Segbroeck and H. Van hamme, “Unsupervised le arning of time-frequency patches as a noise-268
robust representation of speech,” Speech Communication , volume 51, no. 11, pp. 1124-1138, November 269
2009. 270
[6] H. Van hamme, “HAC-models: a Novel Approach to Cont inuous Speech Recognition,” In Proc. 271
International Conference on Spoken Language Process ing, pp. 2554-2557, Brisbane, Australia, September 272
2008. 273
[7] X. Chen, L. Gu, S. Z. Li and H.-J. Zhang, “Learning representative local features for face detection,” in 274
proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition , pp. 275
1126-1131, Kauai, HI, USA, December 2001. 276
[8] D. Kim, S. Sra and I. S. Dhillon, “Fast Projection- Based Methods for the Least Squares Nonnegative 277
Matrix Approximation Problem,” Statistical Analy Data Mining , vol. 1, 2008 278
[9] C.-J. Lin, “Projected gradient methods for non-nega tive matrix factorization,” Neural Computation , vol. 279
19, pp. 2756-2779, 2007 280
[10] R. Zdunek, A. H. Phan and A. Cichocki, “Damped Newt on Iterations for Nonnegative Matrix 281
Factorization,” Australian Journal of Intelligent Information Processing Systems , 12(1), pp. 16-22, 2010 282
[11] Y. Zheng, and Q. Zhang, “Damped Newton based Iterat ive Non-negative Matrix Factorization for 283
Intelligent Wood Defects Detection,” Journal of software , vol. 5, no. 8, pp. 899-906, August 2010. 284
[12] P. Gong, and C. Zhang, “Efficient Nonnegative Matri x Factorization via projected Newton method”, 285
Pattern Recognition , vol. 45, no. 9, pp. 3557-3565, September 2012. 286
[13] S. Bellavia, M. Macconi, and B. Morini, “An interio r point Newton-like method for nonnegative least-287
squares problems with degenerate solution,” Numerical Linear Algebra with Applications , vol. 13, no. 10, pp. 288
825-846, December 2006. 289
[14] R. Zdunek and A. Cichocki, “Non-Negative Matrix Fac torization with Quasi-Newton Optimization,” 290
Lecture Notes in Computer Science, Artificial Intelligence and Soft Computing 4029, pp. 870-879, 2006 291
[15] R. Zdunek and A. Cichocki, "Nonnegative Matrix Fact orization with Constrained Second-Order 292
Optimization", Signal Processing , vol. 87, pp. 1904-1916, 2007 293
[16] G. Landi and E. Loli Piccolomini, “A projected Newt on-CG method for nonnegative astronomical image 294
deblurring,” Numerical Algorithms , no. 48, pp. 279–300, 2008 295
[17] C.-J. Hsieh and I. S. Dhillon, “Fast Coordinate Des cent Methods with Variable Selection for Non-296
negative Matrix Factorization,” in proceedings of the 17th ACM SIGKDD International Conference on 297
Knowledge Discovery & Data Mining (KDD), San Diego, CA, USA, August 2011 298
[18] L. Li, G. Lebanon and H. Park, “Fast Bregman Diverg ence NMF using Taylor Expansion and 299
Coordinate Descent,” in proceedings of the 18 th ACM SIGKDD Conference on Knowledge Discovery and 300
Data Mining, 2012 301
[19] A. Cichocki, S. Cruces, and S.-I. Amari, “Generaliz ed Alpha-Beta Divergences and Their Application to 302
Robust Nonnegative Matrix Factorization,” Entropy , vol. 13, pp. 134-170, 2011; doi:10.3390/e13010134 303
[20] I. S. Dhillon and S. Sra, “Generalized Nonnegative Matrix Approximations with Bregman Divergences,” 304
Neural Information Proc. Systems , pp. 283-290, 2005 305
|
Hugo Van hamme
|
Unknown
| 2,013
|
{"id": "i87JIQTAnB8AQ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358343900000, "tmdate": 1358343900000, "ddate": null, "number": 60, "content": {"title": "The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.", "pdf": "https://arxiv.org/abs/1301.3389", "paperhash": "hamme|the_diagonalized_newton_algorithm_for_nonnegative_matrix_factorization", "authors": ["Hugo Van hamme"], "authorids": ["hugo.vanhamme@esat.kuleuven.be"], "keywords": [], "conflicts": []}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["hugo.vanhamme@esat.kuleuven.be"], "writers": []}
|
[Review]:
About the comparison with Cyclic Coordinate Descent (as described in C.-J. Hsieh and I. S. Dhillon, “Fast Coordinate Descent Methods with Variable Selection for Non-negative Matrix Factorization,” in proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD), San Diego, CA, USA, August 2011) using their software:
the plots of the KLD as a function of iteration number and cpu time are located at https://dl.dropbox.com/u/915791/iteration.pdf and https://dl.dropbox.com/u/915791/time.pdf
The data is the synthetic 1000x500 random matrix of rank 10. They show DNA has comparable convergence behaviour and the implementation is faster, despite it's matlab (DNA) vs. c++ (CCD).
|
Hugo Van hamme
| null | null |
{"id": "aplzZcXNokptc", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363615980000, "tmdate": 1363615980000, "ddate": null, "number": 2, "content": {"title": "", "review": "About the comparison with Cyclic Coordinate Descent (as described in C.-J. Hsieh and I. S. Dhillon, \u201cFast Coordinate Descent Methods with Variable Selection for Non-negative Matrix Factorization,\u201d in proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD), San Diego, CA, USA, August 2011) using their software:\r\nthe plots of the KLD as a function of iteration number and cpu time are located at https://dl.dropbox.com/u/915791/iteration.pdf and https://dl.dropbox.com/u/915791/time.pdf\r\nThe data is the synthetic 1000x500 random matrix of rank 10. They show DNA has comparable convergence behaviour and the implementation is faster, despite it's matlab (DNA) vs. c++ (CCD)."}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "i87JIQTAnB8AQ", "readers": ["everyone"], "nonreaders": [], "signatures": ["Hugo Van hamme"], "writers": ["anonymous"]}
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 3,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0,
"total": 3
}
| 1
| -0.578243
| 1.578243
| 1.015833
| 0.147275
| 0.015833
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
{
"criticism": 0,
"example": 0,
"importance_and_relevance": 0,
"materials_and_methods": 1,
"praise": 0,
"presentation_and_reporting": 0,
"results_and_discussion": 0,
"suggestion_and_solution": 0
}
| 1
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
i87JIQTAnB8AQ
|
The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization
|
Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.
|
The Diagonalized Newton Algorithm for Non-
negative Matrix Factorization
Hugo Van hamme 1
University of Leuven, dept. ESAT 2
Kasteelpark Arenberg 10 – bus 2441, 3001 Leuven, B elgium 3
hugo.vanhamme@esat.kuleuven.be 4
Abstract 5
Non-negative matrix factorization (NMF) has become a popular machine 6
learning approach to many problems in text mining, speech and image 7
processing, bio-informatics and seismic data analys is to name a few. In 8
NMF, a matrix of non-negative data is approximated by the low-rank 9
product of two matrices with non-negative entries. In this paper, the 10
approximation quality is measured by the Kullback-L eibler divergence 11
between the data and its low-rank reconstruction. T he existence of the 12
simple multiplicative update (MU) algorithm for com puting the matrix 13
factors has contributed to the success of NMF. Desp ite the availability of 14
algorithms showing faster convergence, MU remains p opular due to its 15
simplicity. In this paper, a diagonalized Newton al gorithm (DNA) is 16
proposed showing faster convergence while the imple mentation remains 17
simple and suitable for high-rank problems. The DNA algorithm is applied 18
to various publicly available data sets, showing a substantial speed-up on 19
modern hardware. 20
21
1 Introduction 22
Non-negative matrix factorization (NMF) denotes the process of factorizing a N×T data 23
matrix V of non-negative real numbers into the product of a N×R matrix W and a R×T 24
matrix H, where both W and H contain only non-negative real numbers. Taking a c olumn-25
wise view of the data, i.e. each of the T columns of V is a sample of N-dimensional vector 26
data, the factorization expresses each sample as a (weighted) addition of columns of W, 27
which can hence be interpreted as the R parts that make up the data [1]. Hence, NMF can be 28
used to learn data representations from samples. In [2], speaker representations are learnt 29
from spectral data using NMF and subsequently appli ed to separate their signals. Another 30
example in speech processing is [3] and [4], where phone representations are learnt using a 31
convolutional extention of NMF. In [5], time-freque ncy representations reminiscent of 32
formant traces are learnt from speech using NMF. In [6], NMF is used to learn acoustic 33
representations for words in a vocabulary acquisiti on and recognition task. Applied to image 34
processing, local features are learnt from examples with NMF in order to represent human 35
faces in a detection task [7]. 36
In this paper, the metric to measure the closeness of reconstruction Z = WH to its target V is 37
measured by their Kullback-Leibler divergence: 38
39
qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119ZZ ZZqg4⇠⇠∇=qg3R33qg18∇4qg3141qg314∇ qg18⇠4qg18⇠∇qg18R9 qg343⇠qg18∇4qg3141qg314∇
qg18∇8qg3141qg314∇
qg3441−qg3R33qg18∇4qg3141qg314∇
qg3141quni112⊘qg314∇
+qg3R33qg18∇8qg3141qg314∇
qg3141quni112⊘qg314∇qg3141quni112⊘qg314∇
(1)
Given a data matrix V, the matrix factors W and H are then found by minimizing cost 40
function (1), which yields the maximum likelihood e stimate if the data are drawn from a 41
Poisson distribution. The multiplicative updates (M U) algorithm proposed in [1] solves 42
exactly this problem in an iterative manner. Its si mplicity and the availability of many 43
implementations make it a popular algorithm to date to solve NMF problems. However, there 44
are some drawbacks to the algorithm. Firstly, it on ly converges locally and is not guaranteed 45
to yield the global minimum of the cost function. I t is hence sensitive to the choice of the 46
initial guesses for W and H. Secondly, MU is very slow to converge. The goal of this paper 47
is to speed up the convergence while the local convergence proper ty is retained. The 48
resulting Diagonalized Newton Algorithm (DNA) uses only simple element-wise operations , 49
such that its implementation requires only a few te ns of lines of code, while memory 50
requirements and computational efforts for a single iteration are about the double of an MU 51
update. 52
The faster convergence rate is obtained by applying Newton’s method to minimize 53
dKL (V,WH ) over W and H in alternation. Newton updates have been explored for the Frobe-54
nius norm to measure the distance between V and Z in e.g. [8]-[13]. Specifically, in [11] a 55
diagonal Newton method is applied Frobenius norms. For the Kullback-Leibler divergence, 56
fewer studies are available. Since each optimizatio n problem is multivariate, Newton updates 57
typically imply solving sets of linear equations in each iteration. In [16], the Hessian is 58
reduced by refraining from second order updates for the parameters close to zero. In [17], 59
Newton updates are applied per coordinate, but in a cyclic order, which is troublesome for 60
GPU implementations. In the proposed method, matrix inversion is avoided by diagonalizing 61
the Hessian matrix. The resulting updates resemble the ones derived in [18] to the extent that 62
they involve second order derivatives. Important di fferences are that [18] involves the non-63
negative k-residuals hence requiring flooring to zero. Of cou rse, the diagonal approximation 64
may affect the convergence rate adversely. Also, Ne wton algorithms only show (quadratic) 65
convergence when the estimate is sufficiently close to the local minimum and therefore need 66
damping, e.g. Levenberg-Marquardt as in [14], or st ep size control as in [15] and [16]. In 67
DNA, these convergence issues are addressed by comp uting both the MU and Newton 68
solutions and selecting the one leading to the grea test reduction in dKL (V,Z). Hence, since 69
the cost is non-decreasing under MU, it will also b e under DNA updates. This robust safety 70
net can be constructed fairly efficiently because t he quantities required to compute the MU 71
have already been computed in the Newton update. Th e net result is that DNA iterations are 72
only about two to three times as slow as MU iterati ons, both on a CPU and on a GPU. The 73
experimental analysis shows that the increased conv ergence rate generally dominates over 74
the increased cost per iteration such that overall balance is positive and can lead to speedups 75
of up to a factor 6. 76
2 NMF formulation 77
To induce sparsity on the matrix factors, the KL-di vergence is often regularized, i.e. one 78
seeks to minimize: 79
quni1119qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R
qg3141quni112⊘qg314R
+λqg3R33ℎqg314Rqg314∇
qg314Rquni112⊘qg314∇
(2)
subject to non-negativity constraints on all entrie s of W and H. Here, ρ and λ are non-negative re-80
gularization parameters. 81
Minimizing the regularized KL-divergence (2) can be achieved by alternating updates of W and H 82
for which the cost is non-increasing. The updates for this form of block coordinate descent are: 83
qg1∇82quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇82qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4R93qg4⇠⇠∇+λqg3R33ℎqg314Rqg314∇
qg4R93
qg314Rquni112⊘qg314∇
qg3441 (3)
qg1∇9∇quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇9∇qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119qg1∇9∇qg4R93qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R qg4R93
qg3141quni112⊘qg314R
qg3441 (4)
Because of the symmetry property dKL (V,WH ) = dKL (Vt,HtWt), where superscript- t denotes 84
matrix transpose, it suffices to consider only the update on H. Furthermore, because of the 85
summation over all columns in (1), minimization (3) splits up into T independent optimiza-86
tion problems. Let v denote any column of V and let h denote the corresponding column of H, 87
then the following is the core minimization problem to be considered: 88
qg1818quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1818qg4R93≥qg2∇∇∇quni1119
quni1119qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1818qg4R93qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4R93qg4⇠⇠∇ (5)
where 1 denotes a vector of ones of appropriate length. Th e solution of (5) should satisfy the KKT 89
conditions, i.e. for all r with hr > 0 90
qg2134qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠quni11∇⇠quni1119quni11∇⇠quni1119 quni11∇⇠quni1119quni11∇⇠quni1119quni112⊘quni1119WW WWquni1119qg1818qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4⇠⇠∇
qg2134ℎqg314R
=−qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
+qg3R33qg18∇Rqg3141qg314R
qg3141
+λ =0
where hr denotes the r-th component of h. If hr = 0, the partial derivative is positive. Hence the 91
product of hr and the partial derivative is always zero for a solution of (5), i.e. for r = 1 … R: 92
qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R ℎqg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
−ℎqg314Rqg343∇qg3R33qg18∇Rqg3141qg314R
qg3141
+λqg3441=0 (6)
Since W-columns with all-zeros do not contribute to Z, it can be assumed that column sums of W 93
are non-zero, so the above can be recast as: 94
ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −ℎqg314R=0
where qn = vn / (Wh )n. To facilitate the derivations below, the following notations are introduced: 95
qg18R3qg314R=
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −1 (7)
which are functions of h via q. The KKT conditions are hence recast as [20] 96
quni1119qg18R3qg314Rquni1119ℎqg314R=0quni1119quni1119quni1119quni1119quni1119quni11⇠⇠quni11⇠Fquni11∇2quni1119quni11∇2quni1119=quni11191quni1119quni212⇠quni1119R (8)
Finally, summing (6) over r yields 97
qg3R33qg4⇠⇠⇠qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8qg4⇠⇠∇qg314R+λqg4⇠⇠∇ℎqg314R
qg314R
=qg3R33qg18∇4qg3141
qg3141
(9)
which is satisfied for any guess h by renormalizing: 98
ℎqg314R⇠ℎqg314R
quni11∇⇠quni11∇⇠ quni11∇⇠quni11∇⇠qg314∇11 11
qg1818qg314∇qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8+λqg4⇠⇠∇ (10)
2.1 Multiplicative updates 99
For the more generic class of Bregman divergences, it was shown in a.o. [20] that multipli-100
cative updates (MU) are non-decreasing at each upda te of W and H. For KL-divergence, MU 101
are identical to a fixed point update of (6), i.e. 102
ℎqg314R⇠ℎqg314Rqg4⇠⇠⇠1+qg18R3qg314Rqg4⇠⇠∇=ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ (11)
Update (11) has two fixed points: hr = 0 and ar = 0. In the former case, the KKT conditions imply 103
that ar is negative. 104
105
2.2 Newton updates 106
To find the stationary points of (2), R equations (8) need to be solved for h. In general, let g(h) be 107
an R-dimensional vector function of an R-dimensional variable h. Newton’s update then states: 108
qg1818⇠qg1818−quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg28∇9qg28⇠9qg181∇qg4⇠⇠⇠qg1818qg4⇠⇠∇quni1119quni1119quni1119wquni11⇠9tquni11⇠8 quni1119quni1119quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=∂qg18R9qg314Rqg4⇠⇠⇠qg1818qg4⇠⇠∇
∂ℎqg3139
(12)
Applied to equations (8): 109
qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=qg18R3qg3139qg2112qg314Rqg3139− ℎqg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg313⇠qg18∇Rqg313⇠qg314R qg18∇Rqg313⇠qg3139
qg4⇠⇠⇠qg1∇9∇qg1818 qg4⇠⇠∇qg313⇠
qg28∇1
qg313⇠
(13)
where δ rl is Kronecker’s delta. To avoid the matrix inversio n in update (12), the last term in 110
equation (13) is diagonalized, which is equivalent to solving the r-th equation in (8) for hr with all 111
other components fixed. With 112
qg18R4qg314R= 1
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R qg28∇1
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg28∇1
qg3141
(14)
which is always positive, an element-wise Newton update for h is obtained: 113
ℎqg314R⇠ℎqg314R
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
(15)
Notice that this update does not automatically sati sfy (9), so updates should be followed by a 114
renormalization (10). One needs to pay attention to the fact that Newton updates will attract 115
towards both local minima and local maxima. Like fo r the EM-update, hr = 0 and ar = 0 are the 116
only fixed points of update (15), which are now sho wn to be locally stable. In case the optimizer is 117
at hr = 0, ar is negative by the KKT conditions, and update (15) will indeed decrease hr. In a 118
sufficiently small neighborhood of a point where th e gradient vanishes, i.e. ar = 0, update (15) will 119
increase (decrease) hr if and only if (11) increases (decreases) its esti mate. Since if (11) never 120
increases the cost, update (15) attracts to a minimum. 121
However, this only guarantees local convergence for per-element updates and Newton methods 122
are known to suffer from potentially small converge nce regions. This also applies to update (15), 123
which can indeed result in limit cycles in some cas es. In the next subsections, two measures are 124
taken to respectively increase the convergence region and to make the update non-increasing. 125
2.3 Step size li mitation 126
When ar is positive, update (15) may not be well-behaved i n the sense that its denominator can 127
become negative or zero. To respect nonnegativity a nd to avoid the singularity, it is bounded 128
below by a function with the same local behavior around zero: 129
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
= 1
1− qg18R3qg314R
ℎqg314Rqg18R4qg314R
≥1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
Hence, if ar ≥ 0, the following update is used:
(16)
ℎqg314R⇠ℎqg314Rqg343⇠1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
qg3441=ℎqg314R+qg18R3qg314R
qg18R4qg314R
(17)
Finally, step sizes are further limited by flooring resp. ceiling the multiplicative gain applied to hr 130
in update (15) and (17) (see Algorithm 1, steps 11 and 24 for details). 131
2.4 Non-increase of the cost 132
Despite the measures taken in section 2.3, the dive rgence can still increase under the Newton 133
update. A very safe option is to compute the EM upd ate additionally and compare the cost 134
function value for both updates. If the EM update i s be better, the Newton update is rejected and 135
the EM update is taken instead. This will guarantee non-increase of the cost function. The 136
computational cost of this operation is dominated b y evaluating the KL-divergence, not in 137
computing the update itself. 138
3 The Diagonalized Newton Algorithm for KLD-NMF 139
In Algorithm 1, the arguments given above are joined to form the Diagonalized Newton Algorithm 140
(DNA) for NMF with Kullback-Leibler divergence cost . Matlab TM code is available from 141
www.esat.kuleuven.be/psi/spraak/downloads both for the case when V is sparse or dense. 142
143
Algorithm 1: pseudocode for the DNA KLD-NMF algorithm. ⊘ and ⊙ are element-wise division 144
and multiplication respectively and [x] ε = max(x, ε). Steps not labelsed with “MU” is the additional 145
code required for DNA. 146
Input: data V , initial guess for W and H , regularization weights ρ and λ . 147
MU - Step 1: divide the r-th column of W by quni2211qg18∇Rqg3141qg314R qg3141+λ. Multiply the r-th row of H by the same number. 148
MU - Step 2: Z = WH 149
MU - Step 3: qg1∇91=qg1∇9⇠⊘qg1811 150
Repeat until convergence 151
MU - Step 4: precompute qg1∇9∇⨀qg1∇9∇ 152
MU - Step 5: qg1∇∇R=qg1∇9∇qg314∇qg1∇91−1 153
MU - Step 6: qg1∇82qg3114qg3122 =qg1∇82+qg1∇∇R⨀qg1∇82 154
MU - Step 7: qg1811qg3114qg3122 =qg1∇9∇qg1∇82qg3114qg3122 155
MU - Step 8: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 156
MU - Step 9: qg1814qg3114qg3122 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439 157
Step 10: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg4⇠⇠⇠qg1∇9∇⨀qg1∇9∇qg4⇠⇠∇qg2212qg1∇91qg33⇠R 158
Step 11: qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 159
qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇82qg4⇠⇠∇ for the entries for which A ≥ 0 160
multiply t-th column of H DNA with the t-th entry of qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇9⇠qg4⇠⇠∇⊘qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇82qg311Rqg311Rqg3112 qg4⇠⇠∇ 161
Step 12: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg1∇82qg311Rqg311Rqg3112 162
Step 13: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 163
Step 14: qg1814qg311Rqg311Rqg3112 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439 164
Step 15: copy H , Z and Q from: 165
H DNA , Z DNA and Q DNA for the columns for which d DNA < d MU 166
H EM , Z EM and Q EM for the columns for which d DNA ≥ d MU 167
MU - Step 16: divide (multiply) the r-th row (column) of H (W ) by quni2211ℎqg3141qg314∇ qg314∇+ρ. 168
Step 17: precompute qg1∇82⨀qg1∇82 169
MU - Step 18: qg1∇∇R=qg1∇91qg1∇82qg2212−1 170
MU - Step 19: qg1∇9∇qg3114qg3122 =qg1∇9∇+qg1∇∇R⨀qg1∇9∇ 171
MU - Step 20: qg1811qg3114qg3122 =qg1∇9∇qg3114qg3122 qg1∇82 172
MU - Step 21: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 173
MU - Step 22: qg1814qg3114qg3122 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439qg2∇∇8 174
Step 23: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg1∇91qg33⇠Rqg4⇠⇠⇠qg1∇82⨀qg1∇82qg4⇠⇠∇qg2212 175
Step 24: qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 176
qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇9∇qg4⇠⇠∇ for the entries for which A ≥ 0 177
multiply the n -th row of W DNA with the n -th entry of qg4⇠⇠⇠qg1∇9⇠qg2∇∇8 qg4⇠⇠∇⊘qg4⇠⇠⇠qg1∇9∇qg311Rqg311Rqg3112 qg2∇∇8qg4⇠⇠∇ 178
Step 25: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg311Rqg311Rqg3112 qg1∇82 179
Step 26: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 180
Step 27: qg1814qg311Rqg311Rqg3112 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439qg2∇∇8 181
Step 28: copy W , Z and Q from: 182
W DNA , Z DNA and Q DNA for the rows for which d DNA < d MU 183
W EM , Z EM and Q EM for the rows for which d DNA ≥ d MU 184
MU - Step 29: divide(multiply) the r-th column (row) of W (H ) by quni2211qg18∇Rqg3141qg314R qg3141+λ. 185
Notice that step 9, 14 22 and 27 require some care for the zeros in V, which should not contribute 186
to the cost. In terms of complexity, the most expen sive steps are the computation of A, B, ZMU and 187
ZDNA , which require O( NRT ) operations. All other steps require O( NR ), O( RT ) or O( NR ) 188
operations. Hence, it is expected that a DNA iterat ion is about twice as slow as MU iteration. On 189
modern hardware, parallelization may however distor t this picture and hence experimental 190
verification is requied. 191
4 Experiments 192
DNA and MU are run on several publicly available 1 data sets. In all cases, W is initialized with a 193
random matrix with uniform distribution, normalized column-wise. Then H is initialized as WtV 194
and one MU iteration is performed. The same initial values are used for both algorithms. Sparsity 195
is not included in this study, so ρ = λ = 0. The algorithm parameters are set to ε = 0.01 and α =4. 196
CPU timing measurements are obtained on a quad-core AMD TM Opteron 8356 processor running 197
the MATLAB TM code available at www.esat.kuleuven.be/psi/spraak/downloads which uses the 198
built-in parallelization capability. Timing measure ments on the graphical processing unit (GPU) 199
are obtained on a TESLA C2070 running MATLAB and Accelereyes Jacket v2.3. 200
4.1 Dense data matrices 201
The first dataset considered is a set of 400 fronta l face greyscale 64 × 64 images of 40 people 202
showing 10 different expressions. The resulting 40 96 × 165 dense matrix is decomposed with 203
factors of a common dimension R of 10, 20, 40 and 80. Figure 1 shows the KL diverg ence as a 204
function of iteration number and CPU time as measur ed on the CPU. The superiority of DNA is 205
obvious: for instance, at R = 40, DNA reaches the same divergence after 33 ite rations as MU 206
obtains after 500 iterations. This implies a speed- up of a factor 15 in terms of iterations or 6.3 in 207
terms of CPU time. 208
209
Figure 1: convergence of DNA and MU on the ORL image dataset as a function of the number of 210
iterations (left) and CPU time (right) for different ranks R. 211
The second test case is the CMU PIE dataset which c onsists of 11554 greyscale images of 32 × 32 212
pixels showing human faces under different illumina tion conditions and poses. The data are 213
shaped to a dense 1024 × 11554 matrix and a decomposition of rank R = 10, 20, 40 and 80 are 214
attempted with the MU and DNA algorithms. As obser ved in Figure 2, the proposed DNA still 215
outperforms MU, but by a smaller margin. 216
1 www.cad.zju.edu.cn/home/dengcai/Data/data.html
0 100 200 300 400 5000
1
2
3
4
5
6
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 10 20 30 40 500
1
2
3
4
5
6
7 x 10
6
time (s)
KLD
R=10
R=20
R=40
R=80
MU
DNA
217
Figure 2: convergence of DNA and MU on the CMU PIE image dataset as a function of the 218
number of iterations (left) and CPU time (right). 219
An overview of the time required for a single itera tion on both data sets is given in Table 1. For 220
MU, the first row lists the time if the KL divergen ce is not computed as this is not required if the 221
number of iterations is fixed in advance instead of stopping the algorithm based on a decrease in 222
KLD. The table shows that the computational cost of MU can be reduced by about a third by not 223
computing KLD. Compared to MU with cost calculation , DNA requires typically about 2.5 to 3 224
times more time per iteration on the CPU. On the GPU, the ratio is rather 2 to 2.5. 225
4.2 Sparse data matrices 226
The third matrix considered originates from the NIS T Topic Detection and Tracking Corpus 227
(TDT2). For 10212 documents (columns of V), the frequency of 36771 terms (rows of V) was 228
counted leading to a sparse 36771 × 10212 matrix with only 0.35% non-zero entries. The fourth 229
matrix originates from the Newsgroup corpus results in a 61188 × 18774 sparse frequency matrix 230
with 0.2% non-zeros. Both for MU and DNA a MATLAB i mplementation using the sparse matrix 231
class was made. In this case, an iteration of DNA i s twice as slow a MU iteration. Again, the 232
convergence of both algorithms is shown in Figure 3 . In this case, DNA is only marginally faster 233
than MU in terms of CPU time. 234
235
Table 1: time per iteration in milliseconds as measured on the CPU and GPU implementations for 236
different ranks ( R) and dense matrices (ORL/PIE). 237
dataset
R
processor CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU
MU without cost 78 3.7 85 4.1 96 5.0 115 6.8 310 18 310 20 330 27 400 38
MU with cost 114 6.4 118 7.0 130 7.9 161 9.4 480 35 490 37 510 44 580 55
DNA 269 15.5 280 15.9 319 17.9 425 23.6 1180 71 1430 76 1720 95 19 60 125
ORL PIE
10 20 40 80 10 20 40 80
238
239
240
Figure 3: convergence of DNA and MU on the sparse TDT2 (left) and Newsgroup (right) data. 241
5 Conclusions 242
The DNA algorithm is based on Newton’s method for s olving the stationarity conditions of the 243
constrained optimization problem implied by NMF. Th is paper only addresses the Kullback-244
Leibler divergence as a cost function. To avoid mat rix inversion, a diagonal approximation is 245
made, resulting in element-wise updates. Experiment al verification on publicly available matrices 246
with a CPU and GPU MATLAB implementation for dense data matrices and a CPU MATLAB 247
implementation for sparse data matrices show that, depending on the case and matrix sizes, DNA 248
iterations are 2 to 3 times slower than MU iteratio ns. In most cases, the diagonal approximation is 249
good enough such that faster convergence is observed and a net gain results. 250
Since Newton updates can in general not ensure mono tonic decrease of the cost function, the step 251
size was controlled with a brute force strategy of falling back to MU in case the cost is increased. 252
More refined step damping methods could speed up DN A by avoiding evaluations of the cost 253
function, which is next on the research agenda. 254
A c kno w l e dg me nt s 255
This work is supported by IWT-SBO project 100049 (A LADIN) and by KU Leuven research 256
grant OT/09/028(VASI). 257
0 20 40 60 80 1004
4.5
5
5.5
6
6.5
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 20 40 60 80 100
8
8.5
9
9.5
10
10.5
11 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
R e f e re nc e s 258
[1] D. Lee, and H. Seung, “Algorithms for non-negative matrix factorization,” Advances in Neural 259
Information Processing Systems , vol. 13, pp. 556–562, 2001. 260
[2] B. Raj, R. Singh and P. Smaragdis, “Recognizing Spe ech from Simultaneous Speakers”, in proceedings 261
of Eurospeech , pp. 3317-3320, Lisbon, Portugal, September 2005 262
[3] P. Smaragdis, “Convolutive Speech Bases and Their A pplication to Supervised Speaker Separation,” 263
IEEE Transactions on Audio, Speech and Language Processing , vol. 15, pp. 1-12, January 2007 264
[4] P. D. O'Grady and B. A. Pearlmutter, “Discovering S peech Phones Using Convolutive Non-negative 265
Matrix Factorisation with a Sparseness Constraint.,” Neurocomputing , vol. 72, no. 1-3, pp. 88-101, December 266
2008, ISSN 0925-2312. 267
[5] M. Van Segbroeck and H. Van hamme, “Unsupervised le arning of time-frequency patches as a noise-268
robust representation of speech,” Speech Communication , volume 51, no. 11, pp. 1124-1138, November 269
2009. 270
[6] H. Van hamme, “HAC-models: a Novel Approach to Cont inuous Speech Recognition,” In Proc. 271
International Conference on Spoken Language Process ing, pp. 2554-2557, Brisbane, Australia, September 272
2008. 273
[7] X. Chen, L. Gu, S. Z. Li and H.-J. Zhang, “Learning representative local features for face detection,” in 274
proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition , pp. 275
1126-1131, Kauai, HI, USA, December 2001. 276
[8] D. Kim, S. Sra and I. S. Dhillon, “Fast Projection- Based Methods for the Least Squares Nonnegative 277
Matrix Approximation Problem,” Statistical Analy Data Mining , vol. 1, 2008 278
[9] C.-J. Lin, “Projected gradient methods for non-nega tive matrix factorization,” Neural Computation , vol. 279
19, pp. 2756-2779, 2007 280
[10] R. Zdunek, A. H. Phan and A. Cichocki, “Damped Newt on Iterations for Nonnegative Matrix 281
Factorization,” Australian Journal of Intelligent Information Processing Systems , 12(1), pp. 16-22, 2010 282
[11] Y. Zheng, and Q. Zhang, “Damped Newton based Iterat ive Non-negative Matrix Factorization for 283
Intelligent Wood Defects Detection,” Journal of software , vol. 5, no. 8, pp. 899-906, August 2010. 284
[12] P. Gong, and C. Zhang, “Efficient Nonnegative Matri x Factorization via projected Newton method”, 285
Pattern Recognition , vol. 45, no. 9, pp. 3557-3565, September 2012. 286
[13] S. Bellavia, M. Macconi, and B. Morini, “An interio r point Newton-like method for nonnegative least-287
squares problems with degenerate solution,” Numerical Linear Algebra with Applications , vol. 13, no. 10, pp. 288
825-846, December 2006. 289
[14] R. Zdunek and A. Cichocki, “Non-Negative Matrix Fac torization with Quasi-Newton Optimization,” 290
Lecture Notes in Computer Science, Artificial Intelligence and Soft Computing 4029, pp. 870-879, 2006 291
[15] R. Zdunek and A. Cichocki, "Nonnegative Matrix Fact orization with Constrained Second-Order 292
Optimization", Signal Processing , vol. 87, pp. 1904-1916, 2007 293
[16] G. Landi and E. Loli Piccolomini, “A projected Newt on-CG method for nonnegative astronomical image 294
deblurring,” Numerical Algorithms , no. 48, pp. 279–300, 2008 295
[17] C.-J. Hsieh and I. S. Dhillon, “Fast Coordinate Des cent Methods with Variable Selection for Non-296
negative Matrix Factorization,” in proceedings of the 17th ACM SIGKDD International Conference on 297
Knowledge Discovery & Data Mining (KDD), San Diego, CA, USA, August 2011 298
[18] L. Li, G. Lebanon and H. Park, “Fast Bregman Diverg ence NMF using Taylor Expansion and 299
Coordinate Descent,” in proceedings of the 18 th ACM SIGKDD Conference on Knowledge Discovery and 300
Data Mining, 2012 301
[19] A. Cichocki, S. Cruces, and S.-I. Amari, “Generaliz ed Alpha-Beta Divergences and Their Application to 302
Robust Nonnegative Matrix Factorization,” Entropy , vol. 13, pp. 134-170, 2011; doi:10.3390/e13010134 303
[20] I. S. Dhillon and S. Sra, “Generalized Nonnegative Matrix Approximations with Bregman Divergences,” 304
Neural Information Proc. Systems , pp. 283-290, 2005 305
|
Hugo Van hamme
|
Unknown
| 2,013
|
{"id": "i87JIQTAnB8AQ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358343900000, "tmdate": 1358343900000, "ddate": null, "number": 60, "content": {"title": "The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.", "pdf": "https://arxiv.org/abs/1301.3389", "paperhash": "hamme|the_diagonalized_newton_algorithm_for_nonnegative_matrix_factorization", "authors": ["Hugo Van hamme"], "authorids": ["hugo.vanhamme@esat.kuleuven.be"], "keywords": [], "conflicts": []}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["hugo.vanhamme@esat.kuleuven.be"], "writers": []}
|
[Review]:
I would like to thank the reviewers for their investment of time and effort to formulate their valued comments. The paper was updated according to your comments. Below I address your concerns:
A common remark is the lack of comparison with state-of-the-art NMF solvers for Kullback-Leibler divergence (KLD). I compared the performance of the diagonalized Newton algorithm (DNA) with the wide-spread multiplicative updates (MU) exactly because it is the most common baseline and almost every algorithm has been compared against it. As you suggested, I did run comparison tests and I will present the results here. I need to find a method to post some figures to make the point clear. First, I compared against the Cyclic Coordinate Descent (CCD) by Hsieh & Dhillon using the software they provide on their website. I ran the synthetic 1000x500 example (rank 10). The KLD as a function of iteration number for DNA and CCD are very close (I did not find a way to post a plot on this forum). However, in terms of CPU (ran on the machine I mention in the paper) DNA is a lot faster with about 200ms per iteration for CCD and about 50ms for DNA. Note that CCD is completely implemented in C++ (embedded in a mex-file) while DNA is implemented in matlab (with one routine in mex - see the download page mentioned in the paper). As for the comparison with SBCD (scalar block coordinate descent), I also ran their code on the same example, but unfortunately, one of the matrix factors is projected to an all-zero matrix in the first iteration. I have not found the cause yet.
What definitely needs investigation is that I observe CCD to be 4 times slower than DNA. Using my implementation for MU, 1200 MU iterations are actually as fast as the 100 CCD iteration. (My matlab MU implementation is 10 times faster than the one provided by Hsieh&Dhillon). For these reasons, I am not too keen on quickly including a comparison in terms of CPU time (which is really the bottom line), as implementation issues seem not so trivial. Even more so for a comparison on a GPU, where the picture could be different from the CPU for the cyclic updates in CCD. A thorough comparison on these two architectures seems like a substantial amount of future work. But I hope the data above data convince you the present paper and public code are significant work.
Reply to Anonymous 57f3
' it's not clear that matrix factorization is a problem for which optimization speed is a primary concern (all of the experiments in the paper terminate after only a few minutes)'
>> There are practical problems where NMF takes hours, e.g. the problems of [6], which is essentially learning a speech recognizer model from data. We are now applying NMF-based speech recognition in learning paradigms that learn from user interaction examples. In such cases, you want to wait seconds, not minutes. Also, there is an increased interest in 'large-sccale NMF problems'.
'Using a KL-divergence objective seems strange to me since there aren't any distributions involved, just matrices, whose entries, while positive, need not sum to 1 along any row or column. Are the entries of the matrices supposed to represent probabilities? '
>> Notice that the second and third term in the expression for KLD (Eq. 1) are normalization terms such that we don't require V or Z to sum to unity. This very common in the NMF literature, and was motivated in a.o. [1]. KLD is appropriate if the data follow a (mixture of) Poisson distribution. While this is realistic for counts data (like in the Newsgroup corpus), the KLD is also applied on Fourier spectra, e.g. for speaker separation or speech enhancement, with success. Imho, the relevance of KLD does not need to be motivated in a paper on algorithms, see also [18] and [20] ( numbering in the new paper).
'I understand that this is a formulation used in previous work ([1]), but it should be briefly explained. '
>> Added a sentence about the Poisson hypothesis after Eq. 1.
'You should explain the connection between your work and [17] more carefully. Exactly how is it similar/different? '
>> Reformulated. [17] (now [18]) uses a totally different motivation, but also involves the second order derivatives, like a Newton method.
'Has a diagonal Newton-type approach ever been used for the squared error objective? '
>> A reference is given now. Note however that KLD behaves substantially different.
'the smallest cost' -> 'leading to the greatest reduction in d_{KL}(V,Z)'
'the variables required to compute' -> 'the quantities required to compute'
>> corrected
You should avoid using two meanings of the word 'regularized' as this can lead to confusion. Maybe 'damped' would work better to refer to the modifications made to the Newton updates that prevent divergence?
>> Yes. A lot better. Corrected.
'Have you compared to using damped/'regularized' Newton updates instead of your method of selecting the best between the Newton and MU updates? In my experience, damping, along the lines of the LM algorithm or something similar, can help a great deal. '
>> yes. I initially tried to control the damping by adding lambda*I to the Hessian, where lambda is decreased on success and increased if the KLD increases. I found it difficult to find a setting that worked well on a variety of problems.
I would recommend using ' op' to denote matrix transposition instead of what you are doing. Section 2 needs to be reorganized. It's hard for me to follow what you are trying to say here. First, you introduce some regularization terms. Then, you derive a particular fixed-point update scheme. When you say 'Minimizing [...] is achieved by alternative updates...' surely you mean that this is just one particular way it might be done.
>> That's indeed what I meant to say. 'is' => 'can be'
You say you are applying the KKT conditions, but your derivation is strange and you seem to skip a bunch of steps and neglect to use explicit KKT multipliers (although the result seems correct based on my independent derivation). But when you say: 'If h_r = 0, the partial derivative is positive. Hence the product of h_r and the partial derivative is always zero', I don't see how this is a correct logical implication. Rather, the product is zero for any solution satisfying complementary slackness.
>> I meant this holds for any solution of (5). This is corrected.
And I don't understand why it is particularly important that the sum over equation (6) is zero (which is how the normalization in eqn 10 is justified). Surely this is only a (weak) necessary condition, but not a sufficient one, for a valid optimal solution. Or is there some reason why this is sufficient (if so, please state it in the paper!).
>> A Newton update may yield a guess that does not satisfy this (weak) necessary condition. We can satisfy this condition easily with the renormalization (10), which is reflected in steps 16 and 29.
I don't understand how the sentence on line 122 'Therefor...' is not a valid logical implication. Did you actually mean to use the word 'therefor' here? The lower bound is, however, correct. 'floor resp. ceiling'??
>> 'Therefore' => 'To respect the nonnegativity and to avoid the singularity”
Reply to Anonymous 4322
See comparison described above.
I added more about the differences with the prior work you mention.
Reply to Anonymous 482c
See also comparison data detailed above.
You are right there is a lot of generic work on Hessian preconditioning. I refer to papers that work on damping and line search in the context of NMF ([10], [11], [12], [14] ...). Diagonalization is only related in the sense that it ensures the Hessian to be positive definite (not in general, but here is does).
|
Hugo Van hamme
| null | null |
{"id": "RzSh7m1KhlzKg", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363574460000, "tmdate": 1363574460000, "ddate": null, "number": 5, "content": {"title": "", "review": "I would like to thank the reviewers for their investment of time and effort to formulate their valued comments. The paper was updated according to your comments. Below I address your concerns:\r\n\r\nA common remark is the lack of comparison with state-of-the-art NMF solvers for Kullback-Leibler divergence (KLD). I compared the performance of the diagonalized Newton algorithm (DNA) with the wide-spread multiplicative updates (MU) exactly because it is the most common baseline and almost every algorithm has been compared against it. As you suggested, I did run comparison tests and I will present the results here. I need to find a method to post some figures to make the point clear. First, I compared against the Cyclic Coordinate Descent (CCD) by Hsieh & Dhillon using the software they provide on their website. I ran the synthetic 1000x500 example (rank 10). The KLD as a function of iteration number for DNA and CCD are very close (I did not find a way to post a plot on this forum). However, in terms of CPU (ran on the machine I mention in the paper) DNA is a lot faster with about 200ms per iteration for CCD and about 50ms for DNA. Note that CCD is completely implemented in C++ (embedded in a mex-file) while DNA is implemented in matlab (with one routine in mex - see the download page mentioned in the paper). As for the comparison with SBCD (scalar block coordinate descent), I also ran their code on the same example, but unfortunately, one of the matrix factors is projected to an all-zero matrix in the first iteration. I have not found the cause yet.\r\nWhat definitely needs investigation is that I observe CCD to be 4 times slower than DNA. Using my implementation for MU, 1200 MU iterations are actually as fast as the 100 CCD iteration. (My matlab MU implementation is 10 times faster than the one provided by Hsieh&Dhillon). For these reasons, I am not too keen on quickly including a comparison in terms of CPU time (which is really the bottom line), as implementation issues seem not so trivial. Even more so for a comparison on a GPU, where the picture could be different from the CPU for the cyclic updates in CCD. A thorough comparison on these two architectures seems like a substantial amount of future work. But I hope the data above data convince you the present paper and public code are significant work. \r\n\r\nReply to Anonymous 57f3\r\n' it's not clear that matrix factorization is a problem for which optimization speed is a primary concern (all of the experiments in the paper terminate after only a few minutes)'\r\n\r\n>> There are practical problems where NMF takes hours, e.g. the problems of [6], which is essentially learning a speech recognizer model from data. We are now applying NMF-based speech recognition in learning paradigms that learn from user interaction examples. In such cases, you want to wait seconds, not minutes. Also, there is an increased interest in 'large-sccale NMF problems'.\r\n\r\n'Using a KL-divergence objective seems strange to me since there aren't any distributions involved, just matrices, whose entries, while positive, need not sum to 1 along any row or column. Are the entries of the matrices supposed to represent probabilities? '\r\n\r\n>> Notice that the second and third term in the expression for KLD (Eq. 1) are normalization terms such that we don't require V or Z to sum to unity. This very common in the NMF literature, and was motivated in a.o. [1]. KLD is appropriate if the data follow a (mixture of) Poisson distribution. While this is realistic for counts data (like in the Newsgroup corpus), the KLD is also applied on Fourier spectra, e.g. for speaker separation or speech enhancement, with success. Imho, the relevance of KLD does not need to be motivated in a paper on algorithms, see also [18] and [20] ( numbering in the new paper).\r\n\r\n'I understand that this is a formulation used in previous work ([1]), but it should be briefly explained. '\r\n>> Added a sentence about the Poisson hypothesis after Eq. 1.\r\n\r\n'You should explain the connection between your work and [17] more carefully. Exactly how is it similar/different? '\r\n>> Reformulated. [17] (now [18]) uses a totally different motivation, but also involves the second order derivatives, like a Newton method.\r\n\r\n'Has a diagonal Newton-type approach ever been used for the squared error objective? '\r\n>> A reference is given now. Note however that KLD behaves substantially different.\r\n'the smallest cost' -> 'leading to the greatest reduction in d_{KL}(V,Z)'\r\n 'the variables required to compute' -> 'the quantities required to compute' \r\n>> corrected\r\n\r\nYou should avoid using two meanings of the word 'regularized' as this can lead to confusion. Maybe 'damped' would work better to refer to the modifications made to the Newton updates that prevent divergence? \r\n>> Yes. A lot better. Corrected.\r\n\r\n'Have you compared to using damped/'regularized' Newton updates instead of your method of selecting the best between the Newton and MU updates? In my experience, damping, along the lines of the LM algorithm or something similar, can help a great deal. '\r\n>> yes. I initially tried to control the damping by adding lambda*I to the Hessian, where lambda is decreased on success and increased if the KLD increases. I found it difficult to find a setting that worked well on a variety of problems. \r\n\r\nI would recommend using '\top' to denote matrix transposition instead of what you are doing. Section 2 needs to be reorganized. It's hard for me to follow what you are trying to say here. First, you introduce some regularization terms. Then, you derive a particular fixed-point update scheme. When you say 'Minimizing [...] is achieved by alternative updates...' surely you mean that this is just one particular way it might be done. \r\n>> That's indeed what I meant to say. 'is' => 'can be'\r\n\r\nYou say you are applying the KKT conditions, but your derivation is strange and you seem to skip a bunch of steps and neglect to use explicit KKT multipliers (although the result seems correct based on my independent derivation). But when you say: 'If h_r = 0, the partial derivative is positive. Hence the product of h_r and the partial derivative is always zero', I don't see how this is a correct logical implication. Rather, the product is zero for any solution satisfying complementary slackness. \r\n>> I meant this holds for any solution of (5). This is corrected.\r\n\r\nAnd I don't understand why it is particularly important that the sum over equation (6) is zero (which is how the normalization in eqn 10 is justified). Surely this is only a (weak) necessary condition, but not a sufficient one, for a valid optimal solution. Or is there some reason why this is sufficient (if so, please state it in the paper!). \r\n>> A Newton update may yield a guess that does not satisfy this (weak) necessary condition. We can satisfy this condition easily with the renormalization (10), which is reflected in steps 16 and 29.\r\n\r\nI don't understand how the sentence on line 122 'Therefor...' is not a valid logical implication. Did you actually mean to use the word 'therefor' here? The lower bound is, however, correct. 'floor resp. ceiling'??\r\n>> 'Therefore' => 'To respect the nonnegativity and to avoid the singularity\u201d\r\n\r\nReply to Anonymous 4322\r\nSee comparison described above.\r\nI added more about the differences with the prior work you mention.\r\n\r\nReply to Anonymous 482c\r\nSee also comparison data detailed above.\r\nYou are right there is a lot of generic work on Hessian preconditioning. I refer to papers that work on damping and line search in the context of NMF ([10], [11], [12], [14] ...). Diagonalization is only related in the sense that it ensures the Hessian to be positive definite (not in general, but here is does)."}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "i87JIQTAnB8AQ", "readers": ["everyone"], "nonreaders": [], "signatures": ["Hugo Van hamme"], "writers": ["anonymous"]}
|
{
"criticism": 12,
"example": 6,
"importance_and_relevance": 2,
"materials_and_methods": 30,
"praise": 5,
"presentation_and_reporting": 20,
"results_and_discussion": 7,
"suggestion_and_solution": 18,
"total": 84
}
| 1.190476
| -78.368752
| 79.559228
| 1.31617
| 1.136194
| 0.125694
| 0.142857
| 0.071429
| 0.02381
| 0.357143
| 0.059524
| 0.238095
| 0.083333
| 0.214286
|
{
"criticism": 0.14285714285714285,
"example": 0.07142857142857142,
"importance_and_relevance": 0.023809523809523808,
"materials_and_methods": 0.35714285714285715,
"praise": 0.05952380952380952,
"presentation_and_reporting": 0.23809523809523808,
"results_and_discussion": 0.08333333333333333,
"suggestion_and_solution": 0.21428571428571427
}
| 1.190476
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
||
i87JIQTAnB8AQ
|
The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization
|
Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.
|
The Diagonalized Newton Algorithm for Non-
negative Matrix Factorization
Hugo Van hamme 1
University of Leuven, dept. ESAT 2
Kasteelpark Arenberg 10 – bus 2441, 3001 Leuven, B elgium 3
hugo.vanhamme@esat.kuleuven.be 4
Abstract 5
Non-negative matrix factorization (NMF) has become a popular machine 6
learning approach to many problems in text mining, speech and image 7
processing, bio-informatics and seismic data analys is to name a few. In 8
NMF, a matrix of non-negative data is approximated by the low-rank 9
product of two matrices with non-negative entries. In this paper, the 10
approximation quality is measured by the Kullback-L eibler divergence 11
between the data and its low-rank reconstruction. T he existence of the 12
simple multiplicative update (MU) algorithm for com puting the matrix 13
factors has contributed to the success of NMF. Desp ite the availability of 14
algorithms showing faster convergence, MU remains p opular due to its 15
simplicity. In this paper, a diagonalized Newton al gorithm (DNA) is 16
proposed showing faster convergence while the imple mentation remains 17
simple and suitable for high-rank problems. The DNA algorithm is applied 18
to various publicly available data sets, showing a substantial speed-up on 19
modern hardware. 20
21
1 Introduction 22
Non-negative matrix factorization (NMF) denotes the process of factorizing a N×T data 23
matrix V of non-negative real numbers into the product of a N×R matrix W and a R×T 24
matrix H, where both W and H contain only non-negative real numbers. Taking a c olumn-25
wise view of the data, i.e. each of the T columns of V is a sample of N-dimensional vector 26
data, the factorization expresses each sample as a (weighted) addition of columns of W, 27
which can hence be interpreted as the R parts that make up the data [1]. Hence, NMF can be 28
used to learn data representations from samples. In [2], speaker representations are learnt 29
from spectral data using NMF and subsequently appli ed to separate their signals. Another 30
example in speech processing is [3] and [4], where phone representations are learnt using a 31
convolutional extention of NMF. In [5], time-freque ncy representations reminiscent of 32
formant traces are learnt from speech using NMF. In [6], NMF is used to learn acoustic 33
representations for words in a vocabulary acquisiti on and recognition task. Applied to image 34
processing, local features are learnt from examples with NMF in order to represent human 35
faces in a detection task [7]. 36
In this paper, the metric to measure the closeness of reconstruction Z = WH to its target V is 37
measured by their Kullback-Leibler divergence: 38
39
qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119ZZ ZZqg4⇠⇠∇=qg3R33qg18∇4qg3141qg314∇ qg18⇠4qg18⇠∇qg18R9 qg343⇠qg18∇4qg3141qg314∇
qg18∇8qg3141qg314∇
qg3441−qg3R33qg18∇4qg3141qg314∇
qg3141quni112⊘qg314∇
+qg3R33qg18∇8qg3141qg314∇
qg3141quni112⊘qg314∇qg3141quni112⊘qg314∇
(1)
Given a data matrix V, the matrix factors W and H are then found by minimizing cost 40
function (1), which yields the maximum likelihood e stimate if the data are drawn from a 41
Poisson distribution. The multiplicative updates (M U) algorithm proposed in [1] solves 42
exactly this problem in an iterative manner. Its si mplicity and the availability of many 43
implementations make it a popular algorithm to date to solve NMF problems. However, there 44
are some drawbacks to the algorithm. Firstly, it on ly converges locally and is not guaranteed 45
to yield the global minimum of the cost function. I t is hence sensitive to the choice of the 46
initial guesses for W and H. Secondly, MU is very slow to converge. The goal of this paper 47
is to speed up the convergence while the local convergence proper ty is retained. The 48
resulting Diagonalized Newton Algorithm (DNA) uses only simple element-wise operations , 49
such that its implementation requires only a few te ns of lines of code, while memory 50
requirements and computational efforts for a single iteration are about the double of an MU 51
update. 52
The faster convergence rate is obtained by applying Newton’s method to minimize 53
dKL (V,WH ) over W and H in alternation. Newton updates have been explored for the Frobe-54
nius norm to measure the distance between V and Z in e.g. [8]-[13]. Specifically, in [11] a 55
diagonal Newton method is applied Frobenius norms. For the Kullback-Leibler divergence, 56
fewer studies are available. Since each optimizatio n problem is multivariate, Newton updates 57
typically imply solving sets of linear equations in each iteration. In [16], the Hessian is 58
reduced by refraining from second order updates for the parameters close to zero. In [17], 59
Newton updates are applied per coordinate, but in a cyclic order, which is troublesome for 60
GPU implementations. In the proposed method, matrix inversion is avoided by diagonalizing 61
the Hessian matrix. The resulting updates resemble the ones derived in [18] to the extent that 62
they involve second order derivatives. Important di fferences are that [18] involves the non-63
negative k-residuals hence requiring flooring to zero. Of cou rse, the diagonal approximation 64
may affect the convergence rate adversely. Also, Ne wton algorithms only show (quadratic) 65
convergence when the estimate is sufficiently close to the local minimum and therefore need 66
damping, e.g. Levenberg-Marquardt as in [14], or st ep size control as in [15] and [16]. In 67
DNA, these convergence issues are addressed by comp uting both the MU and Newton 68
solutions and selecting the one leading to the grea test reduction in dKL (V,Z). Hence, since 69
the cost is non-decreasing under MU, it will also b e under DNA updates. This robust safety 70
net can be constructed fairly efficiently because t he quantities required to compute the MU 71
have already been computed in the Newton update. Th e net result is that DNA iterations are 72
only about two to three times as slow as MU iterati ons, both on a CPU and on a GPU. The 73
experimental analysis shows that the increased conv ergence rate generally dominates over 74
the increased cost per iteration such that overall balance is positive and can lead to speedups 75
of up to a factor 6. 76
2 NMF formulation 77
To induce sparsity on the matrix factors, the KL-di vergence is often regularized, i.e. one 78
seeks to minimize: 79
quni1119qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R
qg3141quni112⊘qg314R
+λqg3R33ℎqg314Rqg314∇
qg314Rquni112⊘qg314∇
(2)
subject to non-negativity constraints on all entrie s of W and H. Here, ρ and λ are non-negative re-80
gularization parameters. 81
Minimizing the regularized KL-divergence (2) can be achieved by alternating updates of W and H 82
for which the cost is non-increasing. The updates for this form of block coordinate descent are: 83
qg1∇82quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇82qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1∇82qg4R93qg4⇠⇠∇+λqg3R33ℎqg314Rqg314∇
qg4R93
qg314Rquni112⊘qg314∇
qg3441 (3)
qg1∇9∇quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1∇9∇qg4R93≥qg2∇∇∇quni1119
quni1119qg343∇qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119qg1∇9∇qg4R93qg1∇82qg4⇠⇠∇+ρqg3R33qg18∇Rqg3141qg314R qg4R93
qg3141quni112⊘qg314R
qg3441 (4)
Because of the symmetry property dKL (V,WH ) = dKL (Vt,HtWt), where superscript- t denotes 84
matrix transpose, it suffices to consider only the update on H. Furthermore, because of the 85
summation over all columns in (1), minimization (3) splits up into T independent optimiza-86
tion problems. Let v denote any column of V and let h denote the corresponding column of H, 87
then the following is the core minimization problem to be considered: 88
qg1818quni1119quni1119quni1119quni1119quni2191quni1119quni11⇠1quni11∇2quni11⇠∇quni1119quni11⇠⊙quni11⇠9quni11⇠E
qg1818qg4R93≥qg2∇∇∇quni1119
quni1119qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠VV VVquni112⊘quni1119WW WWquni1119qg1818qg4R93qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4R93qg4⇠⇠∇ (5)
where 1 denotes a vector of ones of appropriate length. Th e solution of (5) should satisfy the KKT 89
conditions, i.e. for all r with hr > 0 90
qg2134qg4⇠⇠⇠qg18R⇠qg3112qg3113 qg4⇠⇠⇠quni11∇⇠quni1119quni11∇⇠quni1119 quni11∇⇠quni1119quni11∇⇠quni1119quni112⊘quni1119WW WWquni1119qg1818qg4⇠⇠∇+λqg2∇∇8qg314∇qg1818qg4⇠⇠∇
qg2134ℎqg314R
=−qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
+qg3R33qg18∇Rqg3141qg314R
qg3141
+λ =0
where hr denotes the r-th component of h. If hr = 0, the partial derivative is positive. Hence the 91
product of hr and the partial derivative is always zero for a solution of (5), i.e. for r = 1 … R: 92
qg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R ℎqg314R
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg3141
−ℎqg314Rqg343∇qg3R33qg18∇Rqg3141qg314R
qg3141
+λqg3441=0 (6)
Since W-columns with all-zeros do not contribute to Z, it can be assumed that column sums of W 93
are non-zero, so the above can be recast as: 94
ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −ℎqg314R=0
where qn = vn / (Wh )n. To facilitate the derivations below, the following notations are introduced: 95
qg18R3qg314R=
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ −1 (7)
which are functions of h via q. The KKT conditions are hence recast as [20] 96
quni1119qg18R3qg314Rquni1119ℎqg314R=0quni1119quni1119quni1119quni1119quni1119quni11⇠⇠quni11⇠Fquni11∇2quni1119quni11∇2quni1119=quni11191quni1119quni212⇠quni1119R (8)
Finally, summing (6) over r yields 97
qg3R33qg4⇠⇠⇠qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8qg4⇠⇠∇qg314R+λqg4⇠⇠∇ℎqg314R
qg314R
=qg3R33qg18∇4qg3141
qg3141
(9)
which is satisfied for any guess h by renormalizing: 98
ℎqg314R⇠ℎqg314R
quni11∇⇠quni11∇⇠ quni11∇⇠quni11∇⇠qg314∇11 11
qg1818qg314∇qg4⇠⇠⇠qg1∇9∇qg314∇qg2∇∇8+λqg4⇠⇠∇ (10)
2.1 Multiplicative updates 99
For the more generic class of Bregman divergences, it was shown in a.o. [20] that multipli-100
cative updates (MU) are non-decreasing at each upda te of W and H. For KL-divergence, MU 101
are identical to a fixed point update of (6), i.e. 102
ℎqg314R⇠ℎqg314Rqg4⇠⇠⇠1+qg18R3qg314Rqg4⇠⇠∇=ℎqg314R
qg4⇠⇠⇠WW WWqg314∇qq qqqg4⇠⇠∇qg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λ (11)
Update (11) has two fixed points: hr = 0 and ar = 0. In the former case, the KKT conditions imply 103
that ar is negative. 104
105
2.2 Newton updates 106
To find the stationary points of (2), R equations (8) need to be solved for h. In general, let g(h) be 107
an R-dimensional vector function of an R-dimensional variable h. Newton’s update then states: 108
qg1818⇠qg1818−quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg28∇9qg28⇠9qg181∇qg4⇠⇠⇠qg1818qg4⇠⇠∇quni1119quni1119quni1119wquni11⇠9tquni11⇠8 quni1119quni1119quni1119qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=∂qg18R9qg314Rqg4⇠⇠⇠qg1818qg4⇠⇠∇
∂ℎqg3139
(12)
Applied to equations (8): 109
qg4⇠⇠⇠∇qg181∇qg4⇠⇠∇qg314Rqg3139=qg18R3qg3139qg2112qg314Rqg3139− ℎqg314R
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg313⇠qg18∇Rqg313⇠qg314R qg18∇Rqg313⇠qg3139
qg4⇠⇠⇠qg1∇9∇qg1818 qg4⇠⇠∇qg313⇠
qg28∇1
qg313⇠
(13)
where δ rl is Kronecker’s delta. To avoid the matrix inversio n in update (12), the last term in 110
equation (13) is diagonalized, which is equivalent to solving the r-th equation in (8) for hr with all 111
other components fixed. With 112
qg18R4qg314R= 1
qg4⇠⇠⇠WW WWqg314∇11 11qg4⇠⇠∇qg314R+λqg3R33qg18∇4qg3141
qg18∇Rqg3141qg314R qg28∇1
qg4⇠⇠⇠Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 Wquni1119quni11⇠8 qg4⇠⇠∇qg3141qg28∇1
qg3141
(14)
which is always positive, an element-wise Newton update for h is obtained: 113
ℎqg314R⇠ℎqg314R
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
(15)
Notice that this update does not automatically sati sfy (9), so updates should be followed by a 114
renormalization (10). One needs to pay attention to the fact that Newton updates will attract 115
towards both local minima and local maxima. Like fo r the EM-update, hr = 0 and ar = 0 are the 116
only fixed points of update (15), which are now sho wn to be locally stable. In case the optimizer is 117
at hr = 0, ar is negative by the KKT conditions, and update (15) will indeed decrease hr. In a 118
sufficiently small neighborhood of a point where th e gradient vanishes, i.e. ar = 0, update (15) will 119
increase (decrease) hr if and only if (11) increases (decreases) its esti mate. Since if (11) never 120
increases the cost, update (15) attracts to a minimum. 121
However, this only guarantees local convergence for per-element updates and Newton methods 122
are known to suffer from potentially small converge nce regions. This also applies to update (15), 123
which can indeed result in limit cycles in some cas es. In the next subsections, two measures are 124
taken to respectively increase the convergence region and to make the update non-increasing. 125
2.3 Step size li mitation 126
When ar is positive, update (15) may not be well-behaved i n the sense that its denominator can 127
become negative or zero. To respect nonnegativity a nd to avoid the singularity, it is bounded 128
below by a function with the same local behavior around zero: 129
ℎqg314Rqg18R4qg314R
ℎqg314Rqg18R4qg314R−qg18R3qg314R
= 1
1− qg18R3qg314R
ℎqg314Rqg18R4qg314R
≥1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
Hence, if ar ≥ 0, the following update is used:
(16)
ℎqg314R⇠ℎqg314Rqg343⇠1+ qg18R3qg314R
ℎqg314Rqg18R4qg314R
qg3441=ℎqg314R+qg18R3qg314R
qg18R4qg314R
(17)
Finally, step sizes are further limited by flooring resp. ceiling the multiplicative gain applied to hr 130
in update (15) and (17) (see Algorithm 1, steps 11 and 24 for details). 131
2.4 Non-increase of the cost 132
Despite the measures taken in section 2.3, the dive rgence can still increase under the Newton 133
update. A very safe option is to compute the EM upd ate additionally and compare the cost 134
function value for both updates. If the EM update i s be better, the Newton update is rejected and 135
the EM update is taken instead. This will guarantee non-increase of the cost function. The 136
computational cost of this operation is dominated b y evaluating the KL-divergence, not in 137
computing the update itself. 138
3 The Diagonalized Newton Algorithm for KLD-NMF 139
In Algorithm 1, the arguments given above are joined to form the Diagonalized Newton Algorithm 140
(DNA) for NMF with Kullback-Leibler divergence cost . Matlab TM code is available from 141
www.esat.kuleuven.be/psi/spraak/downloads both for the case when V is sparse or dense. 142
143
Algorithm 1: pseudocode for the DNA KLD-NMF algorithm. ⊘ and ⊙ are element-wise division 144
and multiplication respectively and [x] ε = max(x, ε). Steps not labelsed with “MU” is the additional 145
code required for DNA. 146
Input: data V , initial guess for W and H , regularization weights ρ and λ . 147
MU - Step 1: divide the r-th column of W by quni2211qg18∇Rqg3141qg314R qg3141+λ. Multiply the r-th row of H by the same number. 148
MU - Step 2: Z = WH 149
MU - Step 3: qg1∇91=qg1∇9⇠⊘qg1811 150
Repeat until convergence 151
MU - Step 4: precompute qg1∇9∇⨀qg1∇9∇ 152
MU - Step 5: qg1∇∇R=qg1∇9∇qg314∇qg1∇91−1 153
MU - Step 6: qg1∇82qg3114qg3122 =qg1∇82+qg1∇∇R⨀qg1∇82 154
MU - Step 7: qg1811qg3114qg3122 =qg1∇9∇qg1∇82qg3114qg3122 155
MU - Step 8: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 156
MU - Step 9: qg1814qg3114qg3122 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439 157
Step 10: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg4⇠⇠⇠qg1∇9∇⨀qg1∇9∇qg4⇠⇠∇qg2212qg1∇91qg33⇠R 158
Step 11: qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 159
qg1∇82qg311Rqg311Rqg3112 =quni1119qg1∇82+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇82qg4⇠⇠∇ for the entries for which A ≥ 0 160
multiply t-th column of H DNA with the t-th entry of qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇9⇠qg4⇠⇠∇⊘qg4⇠⇠⇠qg2∇∇8qg314∇qg1∇82qg311Rqg311Rqg3112 qg4⇠⇠∇ 161
Step 12: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg1∇82qg311Rqg311Rqg3112 162
Step 13: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 163
Step 14: qg1814qg311Rqg311Rqg3112 =qg2∇∇8qg314∇qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439 164
Step 15: copy H , Z and Q from: 165
H DNA , Z DNA and Q DNA for the columns for which d DNA < d MU 166
H EM , Z EM and Q EM for the columns for which d DNA ≥ d MU 167
MU - Step 16: divide (multiply) the r-th row (column) of H (W ) by quni2211ℎqg3141qg314∇ qg314∇+ρ. 168
Step 17: precompute qg1∇82⨀qg1∇82 169
MU - Step 18: qg1∇∇R=qg1∇91qg1∇82qg2212−1 170
MU - Step 19: qg1∇9∇qg3114qg3122 =qg1∇9∇+qg1∇∇R⨀qg1∇9∇ 171
MU - Step 20: qg1811qg3114qg3122 =qg1∇9∇qg3114qg3122 qg1∇82 172
MU - Step 21: qg1∇91qg21⇠9qg21∇∇ =qg1∇9⇠⊘qg1811qg3114qg3122 173
MU - Step 22: qg1814qg3114qg3122 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg3114qg3122 qg4⇠⇠∇qg3439qg2∇∇8 174
Step 23: qg1∇91qg33⇠R=qg1∇9⇠⊘qg4⇠⇠⇠qg2182⨀qg2182qg4⇠⇠∇;quni1119qg1∇∇⇠=qg1∇91qg33⇠Rqg4⇠⇠⇠qg1∇82⨀qg1∇82qg4⇠⇠∇qg2212 175
Step 24: qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇⊙qg4⇠∇1qg1∇∇⇠⊘qg4⇠⇠⇠qg1∇∇⇠−qg1∇∇Rqg4⇠⇠∇qg4⇠∇1qg2239for the entries for which A < 0 176
qg1∇9∇qg311Rqg311Rqg3112 =quni1119qg1∇9∇+qg1813qg1819qg1814 qg4⇠⇠⇠qg1∇∇R⊘qg4⇠⇠⇠qg1∇82⊙qg1∇∇⇠qg4⇠⇠∇quni112⊘qg2119qg1∇9∇qg4⇠⇠∇ for the entries for which A ≥ 0 177
multiply the n -th row of W DNA with the n -th entry of qg4⇠⇠⇠qg1∇9⇠qg2∇∇8 qg4⇠⇠∇⊘qg4⇠⇠⇠qg1∇9∇qg311Rqg311Rqg3112 qg2∇∇8qg4⇠⇠∇ 178
Step 25: qg1811qg311Rqg311Rqg3112 =qg1∇9∇qg311Rqg311Rqg3112 qg1∇82 179
Step 26: qg1∇91qg21⇠1qg21∇1qg21R∇ =qg1∇9⇠⊘qg1811qg21⇠1qg21∇1qg21R∇ 180
Step 27: qg1814qg311Rqg311Rqg3112 =qg343Rqg1∇9⇠⨀lquni11⇠Fquni11⇠∇quni1119qg4⇠⇠⇠qg1∇91qg311Rqg311Rqg3112 qg4⇠⇠∇qg3439qg2∇∇8 181
Step 28: copy W , Z and Q from: 182
W DNA , Z DNA and Q DNA for the rows for which d DNA < d MU 183
W EM , Z EM and Q EM for the rows for which d DNA ≥ d MU 184
MU - Step 29: divide(multiply) the r-th column (row) of W (H ) by quni2211qg18∇Rqg3141qg314R qg3141+λ. 185
Notice that step 9, 14 22 and 27 require some care for the zeros in V, which should not contribute 186
to the cost. In terms of complexity, the most expen sive steps are the computation of A, B, ZMU and 187
ZDNA , which require O( NRT ) operations. All other steps require O( NR ), O( RT ) or O( NR ) 188
operations. Hence, it is expected that a DNA iterat ion is about twice as slow as MU iteration. On 189
modern hardware, parallelization may however distor t this picture and hence experimental 190
verification is requied. 191
4 Experiments 192
DNA and MU are run on several publicly available 1 data sets. In all cases, W is initialized with a 193
random matrix with uniform distribution, normalized column-wise. Then H is initialized as WtV 194
and one MU iteration is performed. The same initial values are used for both algorithms. Sparsity 195
is not included in this study, so ρ = λ = 0. The algorithm parameters are set to ε = 0.01 and α =4. 196
CPU timing measurements are obtained on a quad-core AMD TM Opteron 8356 processor running 197
the MATLAB TM code available at www.esat.kuleuven.be/psi/spraak/downloads which uses the 198
built-in parallelization capability. Timing measure ments on the graphical processing unit (GPU) 199
are obtained on a TESLA C2070 running MATLAB and Accelereyes Jacket v2.3. 200
4.1 Dense data matrices 201
The first dataset considered is a set of 400 fronta l face greyscale 64 × 64 images of 40 people 202
showing 10 different expressions. The resulting 40 96 × 165 dense matrix is decomposed with 203
factors of a common dimension R of 10, 20, 40 and 80. Figure 1 shows the KL diverg ence as a 204
function of iteration number and CPU time as measur ed on the CPU. The superiority of DNA is 205
obvious: for instance, at R = 40, DNA reaches the same divergence after 33 ite rations as MU 206
obtains after 500 iterations. This implies a speed- up of a factor 15 in terms of iterations or 6.3 in 207
terms of CPU time. 208
209
Figure 1: convergence of DNA and MU on the ORL image dataset as a function of the number of 210
iterations (left) and CPU time (right) for different ranks R. 211
The second test case is the CMU PIE dataset which c onsists of 11554 greyscale images of 32 × 32 212
pixels showing human faces under different illumina tion conditions and poses. The data are 213
shaped to a dense 1024 × 11554 matrix and a decomposition of rank R = 10, 20, 40 and 80 are 214
attempted with the MU and DNA algorithms. As obser ved in Figure 2, the proposed DNA still 215
outperforms MU, but by a smaller margin. 216
1 www.cad.zju.edu.cn/home/dengcai/Data/data.html
0 100 200 300 400 5000
1
2
3
4
5
6
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 10 20 30 40 500
1
2
3
4
5
6
7 x 10
6
time (s)
KLD
R=10
R=20
R=40
R=80
MU
DNA
217
Figure 2: convergence of DNA and MU on the CMU PIE image dataset as a function of the 218
number of iterations (left) and CPU time (right). 219
An overview of the time required for a single itera tion on both data sets is given in Table 1. For 220
MU, the first row lists the time if the KL divergen ce is not computed as this is not required if the 221
number of iterations is fixed in advance instead of stopping the algorithm based on a decrease in 222
KLD. The table shows that the computational cost of MU can be reduced by about a third by not 223
computing KLD. Compared to MU with cost calculation , DNA requires typically about 2.5 to 3 224
times more time per iteration on the CPU. On the GPU, the ratio is rather 2 to 2.5. 225
4.2 Sparse data matrices 226
The third matrix considered originates from the NIS T Topic Detection and Tracking Corpus 227
(TDT2). For 10212 documents (columns of V), the frequency of 36771 terms (rows of V) was 228
counted leading to a sparse 36771 × 10212 matrix with only 0.35% non-zero entries. The fourth 229
matrix originates from the Newsgroup corpus results in a 61188 × 18774 sparse frequency matrix 230
with 0.2% non-zeros. Both for MU and DNA a MATLAB i mplementation using the sparse matrix 231
class was made. In this case, an iteration of DNA i s twice as slow a MU iteration. Again, the 232
convergence of both algorithms is shown in Figure 3 . In this case, DNA is only marginally faster 233
than MU in terms of CPU time. 234
235
Table 1: time per iteration in milliseconds as measured on the CPU and GPU implementations for 236
different ranks ( R) and dense matrices (ORL/PIE). 237
dataset
R
processor CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU CPU GPU
MU without cost 78 3.7 85 4.1 96 5.0 115 6.8 310 18 310 20 330 27 400 38
MU with cost 114 6.4 118 7.0 130 7.9 161 9.4 480 35 490 37 510 44 580 55
DNA 269 15.5 280 15.9 319 17.9 425 23.6 1180 71 1430 76 1720 95 19 60 125
ORL PIE
10 20 40 80 10 20 40 80
238
239
240
Figure 3: convergence of DNA and MU on the sparse TDT2 (left) and Newsgroup (right) data. 241
5 Conclusions 242
The DNA algorithm is based on Newton’s method for s olving the stationarity conditions of the 243
constrained optimization problem implied by NMF. Th is paper only addresses the Kullback-244
Leibler divergence as a cost function. To avoid mat rix inversion, a diagonal approximation is 245
made, resulting in element-wise updates. Experiment al verification on publicly available matrices 246
with a CPU and GPU MATLAB implementation for dense data matrices and a CPU MATLAB 247
implementation for sparse data matrices show that, depending on the case and matrix sizes, DNA 248
iterations are 2 to 3 times slower than MU iteratio ns. In most cases, the diagonal approximation is 249
good enough such that faster convergence is observed and a net gain results. 250
Since Newton updates can in general not ensure mono tonic decrease of the cost function, the step 251
size was controlled with a brute force strategy of falling back to MU in case the cost is increased. 252
More refined step damping methods could speed up DN A by avoiding evaluations of the cost 253
function, which is next on the research agenda. 254
A c kno w l e dg me nt s 255
This work is supported by IWT-SBO project 100049 (A LADIN) and by KU Leuven research 256
grant OT/09/028(VASI). 257
0 20 40 60 80 1004
4.5
5
5.5
6
6.5
7 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
0 20 40 60 80 100
8
8.5
9
9.5
10
10.5
11 x 10
6
iteration
KLD
R=10
R=20
R=40
R=80
MU
DNA
R e f e re nc e s 258
[1] D. Lee, and H. Seung, “Algorithms for non-negative matrix factorization,” Advances in Neural 259
Information Processing Systems , vol. 13, pp. 556–562, 2001. 260
[2] B. Raj, R. Singh and P. Smaragdis, “Recognizing Spe ech from Simultaneous Speakers”, in proceedings 261
of Eurospeech , pp. 3317-3320, Lisbon, Portugal, September 2005 262
[3] P. Smaragdis, “Convolutive Speech Bases and Their A pplication to Supervised Speaker Separation,” 263
IEEE Transactions on Audio, Speech and Language Processing , vol. 15, pp. 1-12, January 2007 264
[4] P. D. O'Grady and B. A. Pearlmutter, “Discovering S peech Phones Using Convolutive Non-negative 265
Matrix Factorisation with a Sparseness Constraint.,” Neurocomputing , vol. 72, no. 1-3, pp. 88-101, December 266
2008, ISSN 0925-2312. 267
[5] M. Van Segbroeck and H. Van hamme, “Unsupervised le arning of time-frequency patches as a noise-268
robust representation of speech,” Speech Communication , volume 51, no. 11, pp. 1124-1138, November 269
2009. 270
[6] H. Van hamme, “HAC-models: a Novel Approach to Cont inuous Speech Recognition,” In Proc. 271
International Conference on Spoken Language Process ing, pp. 2554-2557, Brisbane, Australia, September 272
2008. 273
[7] X. Chen, L. Gu, S. Z. Li and H.-J. Zhang, “Learning representative local features for face detection,” in 274
proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition , pp. 275
1126-1131, Kauai, HI, USA, December 2001. 276
[8] D. Kim, S. Sra and I. S. Dhillon, “Fast Projection- Based Methods for the Least Squares Nonnegative 277
Matrix Approximation Problem,” Statistical Analy Data Mining , vol. 1, 2008 278
[9] C.-J. Lin, “Projected gradient methods for non-nega tive matrix factorization,” Neural Computation , vol. 279
19, pp. 2756-2779, 2007 280
[10] R. Zdunek, A. H. Phan and A. Cichocki, “Damped Newt on Iterations for Nonnegative Matrix 281
Factorization,” Australian Journal of Intelligent Information Processing Systems , 12(1), pp. 16-22, 2010 282
[11] Y. Zheng, and Q. Zhang, “Damped Newton based Iterat ive Non-negative Matrix Factorization for 283
Intelligent Wood Defects Detection,” Journal of software , vol. 5, no. 8, pp. 899-906, August 2010. 284
[12] P. Gong, and C. Zhang, “Efficient Nonnegative Matri x Factorization via projected Newton method”, 285
Pattern Recognition , vol. 45, no. 9, pp. 3557-3565, September 2012. 286
[13] S. Bellavia, M. Macconi, and B. Morini, “An interio r point Newton-like method for nonnegative least-287
squares problems with degenerate solution,” Numerical Linear Algebra with Applications , vol. 13, no. 10, pp. 288
825-846, December 2006. 289
[14] R. Zdunek and A. Cichocki, “Non-Negative Matrix Fac torization with Quasi-Newton Optimization,” 290
Lecture Notes in Computer Science, Artificial Intelligence and Soft Computing 4029, pp. 870-879, 2006 291
[15] R. Zdunek and A. Cichocki, "Nonnegative Matrix Fact orization with Constrained Second-Order 292
Optimization", Signal Processing , vol. 87, pp. 1904-1916, 2007 293
[16] G. Landi and E. Loli Piccolomini, “A projected Newt on-CG method for nonnegative astronomical image 294
deblurring,” Numerical Algorithms , no. 48, pp. 279–300, 2008 295
[17] C.-J. Hsieh and I. S. Dhillon, “Fast Coordinate Des cent Methods with Variable Selection for Non-296
negative Matrix Factorization,” in proceedings of the 17th ACM SIGKDD International Conference on 297
Knowledge Discovery & Data Mining (KDD), San Diego, CA, USA, August 2011 298
[18] L. Li, G. Lebanon and H. Park, “Fast Bregman Diverg ence NMF using Taylor Expansion and 299
Coordinate Descent,” in proceedings of the 18 th ACM SIGKDD Conference on Knowledge Discovery and 300
Data Mining, 2012 301
[19] A. Cichocki, S. Cruces, and S.-I. Amari, “Generaliz ed Alpha-Beta Divergences and Their Application to 302
Robust Nonnegative Matrix Factorization,” Entropy , vol. 13, pp. 134-170, 2011; doi:10.3390/e13010134 303
[20] I. S. Dhillon and S. Sra, “Generalized Nonnegative Matrix Approximations with Bregman Divergences,” 304
Neural Information Proc. Systems , pp. 283-290, 2005 305
|
Hugo Van hamme
|
Unknown
| 2,013
|
{"id": "i87JIQTAnB8AQ", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1358343900000, "tmdate": 1358343900000, "ddate": null, "number": 60, "content": {"title": "The Diagonalized Newton Algorithm for Nonnegative Matrix Factorization", "decision": "conferencePoster-iclr2013-conference", "abstract": "Non-negative matrix factorization (NMF) has become a popular machine learning approach to many problems in text mining, speech and image processing, bio-informatics and seismic data analysis to name a few. In NMF, a matrix of non-negative data is approximated by the low-rank product of two matrices with non-negative entries. In this paper, the approximation quality is measured by the Kullback-Leibler divergence between the data and its low-rank reconstruction. The existence of the simple multiplicative update (MU) algorithm for computing the matrix factors has contributed to the success of NMF. Despite the availability of algorithms showing faster convergence, MU remains popular due to its simplicity. In this paper, a diagonalized Newton algorithm (DNA) is proposed showing faster convergence while the implementation remains simple and suitable for high-rank problems. The DNA algorithm is applied to various publicly available data sets, showing a substantial speed-up on modern hardware.", "pdf": "https://arxiv.org/abs/1301.3389", "paperhash": "hamme|the_diagonalized_newton_algorithm_for_nonnegative_matrix_factorization", "authors": ["Hugo Van hamme"], "authorids": ["hugo.vanhamme@esat.kuleuven.be"], "keywords": [], "conflicts": []}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/conference/-/submission", "replyto": null, "readers": ["everyone"], "nonreaders": [], "signatures": ["hugo.vanhamme@esat.kuleuven.be"], "writers": []}
|
[Review]:
First: sorry for the multiple postings. Browser acting weird. Can't remove them ...
Update: I was able to get the sbcd code to work. Two mods required (refer to Algorithm 1 in the Li, Lebanon & Park paper - ref [18] in v2 paper on arxiv):
1) you have to be careful with initialization. If the estimates for W or H are too large, E = A - WH could potentially contain too many zeros in line 3 and the update maps H to all zeros. Solution: I first perform a multiplicative update on W and H so you have reasonably scaled estimates.
2) line 16 is wrongly implemented in the publicly available ffhals5.m
I reran the comparison (different machine though - the one I used before was fully loaded):
1) CCD (ref [17]) - the c++ code compiled to a matlab mex file as downloaded from the author's website and following their instructions.
2) DNA - fully implemented in matlab as available from http://www.esat.kuleuven.be/psi/spraak/downloads/
3) SBCD (ref [18]) - code fully in matlab with mods above
4) MU (multiplicative updates) - implementation fully in matlab as available from http://www.esat.kuleuven.be/psi/spraak/downloads/
The KLD as a function of the iteration for the rank-10 random 1000x500 matrix is shown in https://dl.dropbox.com/u/915791/iteration.pdf.
We observe that SBCD takes a good start but then slows down. DNA is best after the 5th iteration.
The KLD as a function of CPU time is shown in https://dl.dropbox.com/u/915791/time.pdf
DNA is the clear winner, followed by MU which beats both SBCD and CCD. This may be surprising, but as I mentioned earlier, there are some implementation issues. CCD is a single-thread implementation, while matlab is multi-threaded and works in parrallel. However, the cyclic updates in CCD are not very suitable for parallelization. The SBCD needs reimplementation, honestly.
In summary, DNA does compare favourably to the state-of-the-art, but I don't really feel comfortable about including such a comparison in a scientific paper if there is such a dominant effect of programming style/skills on the result.
|
Hugo Van hamme
| null | null |
{"id": "MqwZf2jPZCJ-n", "original": null, "cdate": null, "pdate": null, "odate": null, "mdate": null, "tcdate": 1363744920000, "tmdate": 1363744920000, "ddate": null, "number": 1, "content": {"title": "", "review": "First: sorry for the multiple postings. Browser acting weird. Can't remove them ...\r\n\r\nUpdate: I was able to get the sbcd code to work. Two mods required (refer to Algorithm 1 in the Li, Lebanon & Park paper - ref [18] in v2 paper on arxiv):\r\n1) you have to be careful with initialization. If the estimates for W or H are too large, E = A - WH could potentially contain too many zeros in line 3 and the update maps H to all zeros. Solution: I first perform a multiplicative update on W and H so you have reasonably scaled estimates.\r\n2) line 16 is wrongly implemented in the publicly available ffhals5.m \r\n\r\nI reran the comparison (different machine though - the one I used before was fully loaded):\r\n1) CCD (ref [17]) - the c++ code compiled to a matlab mex file as downloaded from the author's website and following their instructions. \r\n2) DNA - fully implemented in matlab as available from http://www.esat.kuleuven.be/psi/spraak/downloads/\r\n3) SBCD (ref [18]) - code fully in matlab with mods above\r\n4) MU (multiplicative updates) - implementation fully in matlab as available from http://www.esat.kuleuven.be/psi/spraak/downloads/\r\n\r\nThe KLD as a function of the iteration for the rank-10 random 1000x500 matrix is shown in https://dl.dropbox.com/u/915791/iteration.pdf. \r\nWe observe that SBCD takes a good start but then slows down. DNA is best after the 5th iteration.\r\n\r\nThe KLD as a function of CPU time is shown in https://dl.dropbox.com/u/915791/time.pdf\r\nDNA is the clear winner, followed by MU which beats both SBCD and CCD. This may be surprising, but as I mentioned earlier, there are some implementation issues. CCD is a single-thread implementation, while matlab is multi-threaded and works in parrallel. However, the cyclic updates in CCD are not very suitable for parallelization. The SBCD needs reimplementation, honestly.\r\n\r\nIn summary, DNA does compare favourably to the state-of-the-art, but I don't really feel comfortable about including such a comparison in a scientific paper if there is such a dominant effect of programming style/skills on the result."}, "forum": "i87JIQTAnB8AQ", "referent": null, "invitation": "ICLR.cc/2013/-/submission/review", "replyto": "i87JIQTAnB8AQ", "readers": ["everyone"], "nonreaders": [], "signatures": ["Hugo Van hamme"], "writers": ["anonymous"]}
|
{
"criticism": 5,
"example": 2,
"importance_and_relevance": 0,
"materials_and_methods": 10,
"praise": 1,
"presentation_and_reporting": 4,
"results_and_discussion": 3,
"suggestion_and_solution": 1,
"total": 16
}
| 1.625
| 1.482958
| 0.142042
| 1.65988
| 0.328035
| 0.03488
| 0.3125
| 0.125
| 0
| 0.625
| 0.0625
| 0.25
| 0.1875
| 0.0625
|
{
"criticism": 0.3125,
"example": 0.125,
"importance_and_relevance": 0,
"materials_and_methods": 0.625,
"praise": 0.0625,
"presentation_and_reporting": 0.25,
"results_and_discussion": 0.1875,
"suggestion_and_solution": 0.0625
}
| 1.625
|
iclr2013
|
openreview
| 0
| 0
| 0
| null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.