SLIDE 1
Neural Turing Machines Can neural nets learn programs? - - PowerPoint PPT Presentation
Neural Turing Machines Can neural nets learn programs? - - PowerPoint PPT Presentation
Neural Turing Machines Can neural nets learn programs? Alex Graves Greg Wayne Ivo Danihelka Contents 1. IntroducBon 2. FoundaBonal
SLIDE 2
SLIDE 3
SLIDE 4
Contents ¡
- 1. IntroducBon ¡
- 2. FoundaBonal ¡Research ¡
- 3. Neural ¡Turing ¡Machines ¡
- 4. Experiments ¡
- 5. Conclusions ¡
SLIDE 5
IntroducBon ¡
- First ¡applicaBon ¡of ¡Machine ¡Learning ¡to ¡logical ¡
flow ¡and ¡external ¡memory ¡
SLIDE 6
IntroducBon ¡
- First ¡applicaBon ¡of ¡Machine ¡Learning ¡to ¡logical ¡
flow ¡and ¡external ¡memory ¡
- Extend ¡the ¡capabiliBes ¡of ¡neural ¡networks ¡by ¡
coupling ¡them ¡to ¡external ¡memory ¡
SLIDE 7
IntroducBon ¡
- First ¡applicaBon ¡of ¡Machine ¡Learning ¡to ¡logical ¡
flow ¡and ¡external ¡memory ¡
- Extend ¡the ¡capabiliBes ¡of ¡neural ¡networks ¡by ¡
coupling ¡them ¡to ¡external ¡memory ¡
- Analogous ¡to ¡TM ¡coupling ¡a ¡finite ¡state ¡
machine ¡to ¡infinite ¡tape ¡
SLIDE 8
IntroducBon ¡
- First ¡applicaBon ¡of ¡Machine ¡Learning ¡to ¡logical ¡
flow ¡and ¡external ¡memory ¡
- Extend ¡the ¡capabiliBes ¡of ¡neural ¡networks ¡by ¡
coupling ¡them ¡to ¡external ¡memory ¡
- Analogous ¡to ¡TM ¡coupling ¡a ¡finite ¡state ¡
machine ¡to ¡infinite ¡tape ¡
- RNN’s ¡have ¡been ¡shown ¡to ¡be ¡Turing-‑
Complete, ¡Siegelmann ¡et ¡al ¡‘95 ¡
SLIDE 9
IntroducBon ¡
- First ¡applicaBon ¡of ¡Machine ¡Learning ¡to ¡logical ¡
flow ¡and ¡external ¡memory ¡
- Extend ¡the ¡capabiliBes ¡of ¡neural ¡networks ¡by ¡
coupling ¡them ¡to ¡external ¡memory ¡
- Analogous ¡to ¡TM ¡coupling ¡a ¡finite ¡state ¡
machine ¡to ¡infinite ¡tape ¡
- RNN’s ¡have ¡been ¡shown ¡to ¡be ¡Turing-‑
Complete, ¡Siegelmann ¡et ¡al ¡‘95 ¡
- Unlike ¡TM, ¡NTM ¡is ¡completely ¡differenBable ¡
SLIDE 10
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
– Concept ¡of ¡“working ¡memory”: ¡short-‑term ¡ memory ¡storage ¡and ¡rule ¡based ¡manipulaBon ¡ – Also ¡known ¡as ¡“rapidly ¡created ¡variables” ¡
SLIDE 11
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
– Concept ¡of ¡“working ¡memory”: ¡short-‑term ¡ memory ¡storage ¡and ¡rule ¡based ¡manipulaBon ¡ – Also ¡known ¡as ¡“rapidly ¡created ¡variables” ¡ – ObservaBonal ¡neuroscience ¡results ¡in ¡the ¡pre-‑ frontal ¡cortex ¡and ¡basal ¡ganglia ¡of ¡monkeys ¡
SLIDE 12
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
- CogniBve ¡Science ¡and ¡LinguisBcs ¡
– AI ¡and ¡CogniBve ¡Science ¡were ¡contemporaneous ¡ in ¡1950’s-‑1970’s ¡
SLIDE 13
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
- CogniBve ¡Science ¡and ¡LinguisBcs ¡
– AI ¡and ¡CogniBve ¡Science ¡were ¡contemporaneous ¡ in ¡1950’s-‑1970’s ¡ – Two ¡fields ¡parted ¡ways ¡when ¡neural ¡nets ¡received ¡ criBcism, ¡Fodor ¡et ¡al. ¡‘88 ¡
- Incapable ¡of ¡“variable-‑binding” ¡ ¡
– eg ¡“Mary ¡spoke ¡to ¡John” ¡
- Incapable ¡of ¡handling ¡variable ¡sized ¡input ¡
SLIDE 14
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
- CogniBve ¡Science ¡and ¡LinguisBcs ¡
– AI ¡and ¡CogniBve ¡Science ¡were ¡contemporaneous ¡ in ¡1950’s-‑1970’s ¡ – Two ¡fields ¡parted ¡ways ¡when ¡neural ¡nets ¡received ¡ criBcism, ¡Fodor ¡et ¡al. ¡’88 ¡ – MoBvated ¡Recurrent ¡Networks ¡research ¡to ¡handle ¡ variable ¡binding ¡and ¡variable ¡length ¡input ¡
SLIDE 15
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
- CogniBve ¡Science ¡and ¡LinguisBcs ¡
– AI ¡and ¡CogniBve ¡Science ¡were ¡contemporaneous ¡ in ¡1950’s-‑1970’s ¡ – Two ¡fields ¡parted ¡ways ¡when ¡neural ¡nets ¡received ¡ criBcism, ¡Fodor ¡et ¡al. ¡’88 ¡ – MoBvated ¡Recurrent ¡Networks ¡research ¡to ¡handle ¡ variable ¡binding ¡and ¡variable ¡length ¡input ¡ – Recursive ¡processing ¡hot ¡debate ¡topic ¡in ¡role ¡ inhuman ¡evoluBon ¡(Pinker ¡vs ¡Chomsky) ¡
SLIDE 16
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
- CogniBve ¡Science ¡ad ¡LinguisBcs ¡
- Recurrent ¡Neural ¡networks ¡ ¡
– Broad ¡class ¡of ¡machines ¡with ¡distributed ¡and ¡ dynamic ¡state ¡
SLIDE 17
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
- CogniBve ¡Science ¡ad ¡LinguisBcs ¡
- Recurrent ¡Neural ¡networks ¡ ¡
– Broad ¡class ¡of ¡machines ¡with ¡distributed ¡and ¡ dynamic ¡state ¡ – Long ¡Short ¡Term ¡Memory ¡RNN’s ¡designed ¡to ¡ handle ¡vanishing ¡and ¡exploding ¡gradient ¡
SLIDE 18
FoundaBonal ¡Research ¡
- Neuroscience ¡and ¡Psychology ¡
- CogniBve ¡Science ¡ad ¡LinguisBcs ¡
- Recurrent ¡Neural ¡networks ¡ ¡
– Broad ¡class ¡of ¡machines ¡with ¡distributed ¡and ¡ dynamic ¡state ¡ – Long ¡Short ¡Term ¡Memory ¡RNN’s ¡designed ¡to ¡ handle ¡vanishing ¡and ¡exploding ¡gradient ¡ – NaBvely ¡handle ¡variable ¡length ¡structures ¡
SLIDE 19
Neural ¡Turing ¡Machines ¡
SLIDE 20
Neural ¡Turing ¡Machines ¡
SLIDE 21
Neural ¡Turing ¡Machines ¡
- 1. Reading ¡
– Mt ¡is ¡NxM ¡matrix ¡of ¡memory ¡at ¡Bme ¡t ¡
SLIDE 22
Neural ¡Turing ¡Machines ¡
- 1. Reading ¡
– Mt ¡is ¡NxM ¡matrix ¡of ¡memory ¡at ¡Bme ¡t ¡ – wt ¡
SLIDE 23
Neural ¡Turing ¡Machines ¡
- 1. Reading ¡
- 2. WriBng ¡involves ¡both ¡erasing ¡and ¡adding ¡
SLIDE 24
Neural ¡Turing ¡Machines ¡
- 1. Reading ¡
- 2. WriBng ¡involves ¡both ¡erasing ¡and ¡adding ¡
SLIDE 25
Neural ¡Turing ¡Machines ¡
- 1. Reading ¡
- 2. WriBng ¡involves ¡both ¡erasing ¡and ¡adding ¡
- 3. Addressing ¡
SLIDE 26
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡
– 1. ¡Focusing ¡by ¡Content ¡
- Each ¡head ¡produces ¡key ¡vector ¡kt ¡of ¡length ¡M ¡
- Generated ¡a ¡content ¡based ¡weight ¡wt
c ¡based ¡on ¡
similarity ¡measure, ¡using ¡‘key ¡strength’ ¡βt ¡ ¡
SLIDE 27
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡
– 2. ¡InterpolaBon ¡
- Each ¡head ¡emits ¡a ¡scalar ¡interpolaBon ¡gate ¡gt ¡ ¡
SLIDE 28
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡
– 3. ¡ConvoluBonal ¡shif ¡
- Each ¡head ¡emits ¡a ¡distribuBon ¡over ¡allowable ¡integer ¡
shifs ¡st ¡
SLIDE 29
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡
– 4. ¡Sharpening ¡
- Each ¡head ¡emits ¡a ¡scalar ¡sharpening ¡parameter ¡γt ¡ ¡
SLIDE 30
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡(puhng ¡it ¡all ¡together) ¡
SLIDE 31
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡(puhng ¡it ¡all ¡together) ¡
– This ¡can ¡operate ¡in ¡three ¡complementary ¡modes ¡
- A ¡weighBng ¡can ¡be ¡chosen ¡by ¡the ¡content ¡system ¡
without ¡any ¡modificaBon ¡by ¡the ¡locaBon ¡system ¡
SLIDE 32
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡(puhng ¡it ¡all ¡together) ¡
– This ¡can ¡operate ¡in ¡three ¡complementary ¡modes ¡
- A ¡weighBng ¡can ¡be ¡chosen ¡by ¡the ¡content ¡system ¡
without ¡any ¡modificaBon ¡by ¡the ¡locaBon ¡system ¡
- A ¡weighBng ¡produced ¡by ¡the ¡content ¡addressing ¡
system ¡can ¡be ¡chosen ¡and ¡then ¡shifed ¡
SLIDE 33
Neural ¡Turing ¡Machines ¡
- 3. ¡Addressing ¡(puhng ¡it ¡all ¡together) ¡
– This ¡can ¡operate ¡in ¡three ¡complementary ¡modes ¡
- A ¡weighBng ¡can ¡be ¡chosen ¡by ¡the ¡content ¡system ¡
without ¡any ¡modificaBon ¡by ¡the ¡locaBon ¡system ¡
- A ¡weighBng ¡produced ¡by ¡the ¡content ¡addressing ¡
system ¡can ¡be ¡chosen ¡and ¡then ¡shifed ¡
- A ¡weighBng ¡from ¡the ¡previous ¡Bme ¡step ¡can ¡be ¡rotated ¡
without ¡any ¡input ¡from ¡the ¡content-‑based ¡addressing ¡ system ¡
SLIDE 34
Neural ¡Turing ¡Machines ¡
- Controller ¡Network ¡Architecture ¡
– Feed ¡Forward ¡vs ¡Recurrent ¡ ¡
SLIDE 35
Neural ¡Turing ¡Machines ¡
- Controller ¡Network ¡Architecture ¡
– Feed ¡Forward ¡vs ¡Recurrent ¡ ¡ – The ¡LSTM ¡version ¡of ¡RNN ¡has ¡own ¡internal ¡ memory ¡complementary ¡to ¡M ¡
SLIDE 36
Neural ¡Turing ¡Machines ¡
- Controller ¡Network ¡Architecture ¡
– Feed ¡Forward ¡vs ¡Recurrent ¡ ¡ – The ¡LSTM ¡version ¡of ¡RNN ¡has ¡own ¡internal ¡ memory ¡complementary ¡to ¡M ¡ – Hidden ¡LSTM ¡layers ¡are ¡‘like’ ¡registers ¡in ¡ processor ¡
SLIDE 37
Neural ¡Turing ¡Machines ¡
- Controller ¡Network ¡Architecture ¡
– Feed ¡Forward ¡vs ¡Recurrent ¡ ¡ – The ¡LSTM ¡version ¡of ¡RNN ¡has ¡own ¡internal ¡ memory ¡complementary ¡to ¡M ¡ – Hidden ¡LSTM ¡layers ¡are ¡‘like’ ¡registers ¡in ¡ processor ¡ – Allows ¡for ¡mix ¡of ¡informaBon ¡across ¡mulBple ¡ Bme-‑steps ¡
SLIDE 38
Neural ¡Turing ¡Machines ¡
- Controller ¡Network ¡Architecture ¡
– Feed ¡Forward ¡vs ¡Recurrent ¡ ¡ – The ¡LSTM ¡version ¡of ¡RNN ¡has ¡own ¡internal ¡ memory ¡complementary ¡to ¡M ¡ – Hidden ¡LSTM ¡layers ¡are ¡‘like’ ¡registers ¡in ¡ processor ¡ – Allows ¡for ¡mix ¡of ¡informaBon ¡across ¡mulBple ¡ Bme-‑steps ¡ – Feed ¡Forward ¡has ¡bejer ¡transparency ¡
SLIDE 39
Experiments ¡
- Test ¡NTM’s ¡ability ¡to ¡learn ¡simple ¡algorithms ¡
like ¡copying ¡and ¡sorBng ¡
SLIDE 40
Experiments ¡
- Test ¡NTM’s ¡ability ¡to ¡learn ¡simple ¡algorithms ¡
like ¡copying ¡and ¡sorBng ¡
- Demonstrate ¡that ¡soluBons ¡generalize ¡well ¡
beyond ¡the ¡range ¡of ¡training ¡
SLIDE 41
Experiments ¡
- Test ¡NTM’s ¡ability ¡to ¡learn ¡simple ¡algorithms ¡
like ¡copying ¡and ¡sorBng ¡
- Demonstrate ¡that ¡soluBons ¡generalize ¡well ¡
beyond ¡the ¡range ¡of ¡training ¡
- Tests ¡three ¡architectures ¡
– NTM ¡with ¡feed ¡forward ¡controller ¡ – NTM ¡with ¡LSTM ¡controller ¡ – Standard ¡LSTM ¡network ¡
SLIDE 42
Experiments ¡
- 1. ¡Copy ¡
– Tests ¡whether ¡NTM ¡can ¡store ¡and ¡retrieve ¡data ¡ – Trained ¡to ¡copy ¡sequences ¡of ¡8 ¡bit ¡vectors ¡ – Sequences ¡vary ¡between ¡1-‑20 ¡vectors ¡
SLIDE 43
Experiments ¡
- 1. ¡Copy ¡
SLIDE 44
Experiments ¡
- 1. ¡Copy ¡
– NTM ¡
SLIDE 45
Experiments ¡
- 1. ¡Copy ¡
– LSTM ¡
SLIDE 46
Experiments ¡
- 1. ¡Copy ¡
SLIDE 47
Experiments ¡
- 2. ¡Repeat ¡Copy ¡
– Tests ¡whether ¡NTM ¡can ¡learn ¡simple ¡nested ¡ funcBon ¡ – Extend ¡copy ¡by ¡repeatedly ¡copying ¡input ¡specified ¡ number ¡of ¡Bmes ¡ – Training ¡is ¡a ¡random-‑length ¡sequence ¡of ¡8 ¡bit ¡ binary ¡inputs ¡plus ¡a ¡scalar ¡value ¡for ¡# ¡of ¡copies ¡ – Scalar ¡value ¡is ¡random ¡between ¡1-‑10 ¡
SLIDE 48
Experiments ¡
- 2. ¡Repeat ¡Copy ¡
SLIDE 49
Experiments ¡
- 2. ¡Repeat ¡Copy ¡
SLIDE 50
Experiments ¡
- 2. ¡Repeat ¡Copy ¡
SLIDE 51
Experiments ¡
- 3. ¡AssociaBve ¡Recall ¡
– Tests ¡NTM’s ¡ability ¡to ¡associate ¡data ¡references ¡ – Training ¡input ¡is ¡list ¡of ¡items, ¡followed ¡by ¡a ¡query ¡ item ¡ – Output ¡is ¡subsequent ¡item ¡in ¡list ¡ – Each ¡item ¡is ¡a ¡three ¡sequence ¡6-‑bit ¡binary ¡vector ¡ – Each ¡‘episode’ ¡has ¡between ¡two ¡and ¡six ¡items ¡ ¡
SLIDE 52
Experiments ¡
- 3. ¡AssociaBve ¡Recall ¡
SLIDE 53
Experiments ¡
- 3. ¡AssociaBve ¡Recall ¡
SLIDE 54
Experiments ¡
- 3. ¡AssociaBve ¡Recall ¡
SLIDE 55
Experiments ¡
- 4. ¡Dynamic ¡N-‑Grams ¡
– Test ¡whether ¡NTM ¡could ¡rapidly ¡adapt ¡to ¡new ¡ predicBve ¡distribuBons ¡ – Trained ¡on ¡6-‑gram ¡binary ¡pajern ¡on ¡200 ¡bit ¡ sequences ¡ – Can ¡NTM ¡learn ¡opBmal ¡esBmator ¡
SLIDE 56
Experiments ¡
- 4. ¡Dynamic ¡N-‑Grams ¡
SLIDE 57
Experiments ¡
- 4. ¡Dynamic ¡N-‑Grams ¡
SLIDE 58
Experiments ¡
- 4. ¡Dynamic ¡N-‑Grams ¡
SLIDE 59
Experiments ¡
- 5. ¡Priority ¡Sort ¡
– Tests ¡whether ¡NTM ¡can ¡sort ¡data ¡ – Input ¡is ¡sequence ¡of ¡20 ¡random ¡binary ¡vectors, ¡ each ¡with ¡a ¡scalar ¡raBng ¡drawn ¡from ¡[-‑1, ¡1] ¡ – Target ¡sequence ¡is ¡16-‑highest ¡priority ¡vectors ¡
SLIDE 60
Experiments ¡
- 5. ¡Priority ¡Sort ¡
SLIDE 61
Experiments ¡
- 5. ¡Priority ¡Sort ¡
SLIDE 62
Experiments ¡
- 5. ¡Priority ¡Sort ¡
SLIDE 63
Experiments ¡
- 6. ¡Details ¡
– RMSProp ¡algorithm ¡ – Momentum ¡0.9 ¡ – All ¡LSTM’s ¡had ¡three ¡stacked ¡hidden ¡layers ¡
SLIDE 64
Experiments ¡
- 6. ¡Details ¡
SLIDE 65
Experiments ¡
- 6. ¡Details ¡
SLIDE 66
Experiments ¡
- 6. ¡Details ¡
SLIDE 67
Conclusion ¡
- Introduced ¡an ¡neural ¡net ¡architecture ¡with ¡
external ¡memory ¡that ¡is ¡differenBable ¡end-‑to-‑ end ¡
- Experiments ¡demonstrate ¡that ¡NTM ¡are ¡
capable ¡of ¡leaning ¡simple ¡algorithms ¡and ¡are ¡ capable ¡of ¡generalizing ¡beyond ¡training ¡ regime ¡
SLIDE 68