Neural Turing Machines Can neural nets learn programs? - - PowerPoint PPT Presentation

neural turing machines
SMART_READER_LITE
LIVE PREVIEW

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-1
SLIDE 1

Neural ¡Turing ¡Machines ¡

Can ¡neural ¡nets ¡learn ¡programs? ¡ ¡ ¡ ¡ Alex ¡Graves ¡ ¡ ¡ Greg ¡Wayne ¡ ¡ ¡ Ivo ¡Danihelka ¡

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4

Contents ¡

  • 1. IntroducBon ¡
  • 2. FoundaBonal ¡Research ¡
  • 3. Neural ¡Turing ¡Machines ¡
  • 4. Experiments ¡
  • 5. Conclusions ¡
slide-5
SLIDE 5

IntroducBon ¡

  • First ¡applicaBon ¡of ¡Machine ¡Learning ¡to ¡logical ¡

flow ¡and ¡external ¡memory ¡

slide-6
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
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
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
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
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
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
SLIDE 12

FoundaBonal ¡Research ¡

  • Neuroscience ¡and ¡Psychology ¡
  • CogniBve ¡Science ¡and ¡LinguisBcs ¡

– AI ¡and ¡CogniBve ¡Science ¡were ¡contemporaneous ¡ in ¡1950’s-­‑1970’s ¡

slide-13
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
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
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
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
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
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
SLIDE 19

Neural ¡Turing ¡Machines ¡

slide-20
SLIDE 20

Neural ¡Turing ¡Machines ¡

slide-21
SLIDE 21

Neural ¡Turing ¡Machines ¡

  • 1. Reading ¡

– Mt ¡is ¡NxM ¡matrix ¡of ¡memory ¡at ¡Bme ¡t ¡

slide-22
SLIDE 22

Neural ¡Turing ¡Machines ¡

  • 1. Reading ¡

– Mt ¡is ¡NxM ¡matrix ¡of ¡memory ¡at ¡Bme ¡t ¡ – wt ¡

slide-23
SLIDE 23

Neural ¡Turing ¡Machines ¡

  • 1. Reading ¡
  • 2. WriBng ¡involves ¡both ¡erasing ¡and ¡adding ¡
slide-24
SLIDE 24

Neural ¡Turing ¡Machines ¡

  • 1. Reading ¡
  • 2. WriBng ¡involves ¡both ¡erasing ¡and ¡adding ¡
slide-25
SLIDE 25

Neural ¡Turing ¡Machines ¡

  • 1. Reading ¡
  • 2. WriBng ¡involves ¡both ¡erasing ¡and ¡adding ¡
  • 3. Addressing ¡
slide-26
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
SLIDE 27

Neural ¡Turing ¡Machines ¡

  • 3. ¡Addressing ¡

– 2. ¡InterpolaBon ¡

  • Each ¡head ¡emits ¡a ¡scalar ¡interpolaBon ¡gate ¡gt ¡ ¡
slide-28
SLIDE 28

Neural ¡Turing ¡Machines ¡

  • 3. ¡Addressing ¡

– 3. ¡ConvoluBonal ¡shif ¡

  • Each ¡head ¡emits ¡a ¡distribuBon ¡over ¡allowable ¡integer ¡

shifs ¡st ¡

slide-29
SLIDE 29

Neural ¡Turing ¡Machines ¡

  • 3. ¡Addressing ¡

– 4. ¡Sharpening ¡

  • Each ¡head ¡emits ¡a ¡scalar ¡sharpening ¡parameter ¡γt ¡ ¡
slide-30
SLIDE 30

Neural ¡Turing ¡Machines ¡

  • 3. ¡Addressing ¡(puhng ¡it ¡all ¡together) ¡
slide-31
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
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
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
SLIDE 34

Neural ¡Turing ¡Machines ¡

  • Controller ¡Network ¡Architecture ¡

– Feed ¡Forward ¡vs ¡Recurrent ¡ ¡

slide-35
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
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
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
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
SLIDE 39

Experiments ¡

  • Test ¡NTM’s ¡ability ¡to ¡learn ¡simple ¡algorithms ¡

like ¡copying ¡and ¡sorBng ¡

slide-40
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
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
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
SLIDE 43

Experiments ¡

  • 1. ¡Copy ¡
slide-44
SLIDE 44

Experiments ¡

  • 1. ¡Copy ¡

– NTM ¡

slide-45
SLIDE 45

Experiments ¡

  • 1. ¡Copy ¡

– LSTM ¡

slide-46
SLIDE 46

Experiments ¡

  • 1. ¡Copy ¡
slide-47
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
SLIDE 48

Experiments ¡

  • 2. ¡Repeat ¡Copy ¡
slide-49
SLIDE 49

Experiments ¡

  • 2. ¡Repeat ¡Copy ¡
slide-50
SLIDE 50

Experiments ¡

  • 2. ¡Repeat ¡Copy ¡
slide-51
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
SLIDE 52

Experiments ¡

  • 3. ¡AssociaBve ¡Recall ¡
slide-53
SLIDE 53

Experiments ¡

  • 3. ¡AssociaBve ¡Recall ¡
slide-54
SLIDE 54

Experiments ¡

  • 3. ¡AssociaBve ¡Recall ¡
slide-55
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
SLIDE 56

Experiments ¡

  • 4. ¡Dynamic ¡N-­‑Grams ¡
slide-57
SLIDE 57

Experiments ¡

  • 4. ¡Dynamic ¡N-­‑Grams ¡
slide-58
SLIDE 58

Experiments ¡

  • 4. ¡Dynamic ¡N-­‑Grams ¡
slide-59
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
SLIDE 60

Experiments ¡

  • 5. ¡Priority ¡Sort ¡
slide-61
SLIDE 61

Experiments ¡

  • 5. ¡Priority ¡Sort ¡
slide-62
SLIDE 62

Experiments ¡

  • 5. ¡Priority ¡Sort ¡
slide-63
SLIDE 63

Experiments ¡

  • 6. ¡Details ¡

– RMSProp ¡algorithm ¡ – Momentum ¡0.9 ¡ – All ¡LSTM’s ¡had ¡three ¡stacked ¡hidden ¡layers ¡

slide-64
SLIDE 64

Experiments ¡

  • 6. ¡Details ¡
slide-65
SLIDE 65

Experiments ¡

  • 6. ¡Details ¡
slide-66
SLIDE 66

Experiments ¡

  • 6. ¡Details ¡
slide-67
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
SLIDE 68