Recurrent Neural
Network (RNN)
Example Application
• Slot Filling
I would like to arrive Taipei on November 2
nd
.
ticket booking system
Destination:
time of arrival:
Taipei
November 2
nd
Slot
Example Application
1
x
2
x
2
y
1
y
Taipei
Input: a word
(Each word is represented
as a vector)
Solving slot filling by
Feedforward network?
1-of-N encoding
Each dimension corresponds
to a word in the lexicon
The dimension for the word
is 1, and others are 0
lexicon = {apple, bag, cat, dog, elephant}
apple = [ 1 0 0 0 0]
bag = [ 0 1 0 0 0]
cat = [ 0 0 1 0 0]
dog = [ 0 0 0 1 0]
elephant = [ 0 0 0 0 1]
The vector is lexicon size.
1-of-N Encoding
How to represent each word as a vector?
Beyond 1-of-N encoding
w = “apple”
a-a-a
a-a-b
p-p-l
26 X 26 X 26
…
…
a-p-p
…
p-l-e
…
…
…
…
…
1
1
1
0
0
Word hashing
Dimension for “Other”
w = “Sauron”
…
apple
bag
cat
dog
elephant
“other”
0
0
0
0
0
1
w = “Gandalf”
5