modularisation through the prism of shaping - …krueger/cosyne2008_kakrueger.pdfstructural...

16
Modularisation through the prism of shaping Kai Krueger and Peter Dayan Gatsby Computational Neuroscience Unit, UCL

Upload: lamnhu

Post on 28-Mar-2018

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Modularisation through the prism of shaping

Kai Krueger and Peter Dayan

Gatsby Computational Neuroscience Unit, UCL

Page 2: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Introduction• Humans and animals exhibit remarkable cognitive flexibility, i.e. the

ability to perform new tasks quickly and flexibly. – Key role for prefrontal cortical areas (PFC), the striatum and

neuromodulators • Much of this quick, flexibility may rely on extensive prior knowledge

– How is this experience represented and brought to bear? – Modularisation is key

• Behavioural modularisation:– Basis functions for control– Available for hierarchical learning

• Structural modularisation:– Critical interference: stability/plasticity dilemma– Allocation of fresh resources to new tasks

• Shaping is a convenient tool to study structural learning

Page 3: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Structural modularity

• Modularisation is a common problem in machine learning– A variety of solutions has been proposed:

• Mixture of experts (Jordan 91)– Each expert is responsible for a subset of the data– Single global gating network

• Mosaic (Haruno 01)– Learning of motor control under varying conditions– Modular forward / inverse kinematics model

• Non stationarity of stimulus distributions– Constant during a single task– Sudden switch on task boundary

Page 4: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

• Sequential, hierarchical decision making task first proposed by O’Reilly et al (2001/2005)

• Outer loop: present “1” or “2”, followed by 1 -4 inner loops• Inner loop: A, B, C followed by X or Y• Target sequence: AX in context 1, BY in context 2• We have used 12-AX to show the effects of shaping in an LSTM

network– Faster learning, better generalisation, improved reversal learning

12-AX Task

1 A X B X 2 B Y A X

L L R

L

L L L L R L

I n n e r l o o p s

O u t e r l o o p

Page 5: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Long-Short Term Memory (LSTM) Network

• Gating architecture proposed by Hochreiter & Schmidhuber (1999)• LSTM is a 3 layer recurrent network with “dedicated” activation based

memory cells and sigmoidal activation functions• Gradient based supervised learning algorithm• Learns selective, conditional gating• Easily modularised by adding / enabling individual memory blocks

Page 6: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

• 5 stage hierarchical process.– Stage 1: learning to gate 1 and 2, with increasing length (e.g. 4,12,40)

– Stage 2 / 3: learning to remember A(X), learning to remember B(Y)

Simple Shaping

Page 7: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

The ideal case (manual allocation)

• Allocation done by manual intervention (homunculus):– Verify that shaping can help in this architecture

• Two alternative allocation strategies1. Allocate one unit per stage, final stage (12-AX) all units fully plastic2. Don’t treat final stage differently: Allocate a new unit to learn the 12-AX.

Keep all units slightly plastic though. (similar to schema in auto allocation)

Page 8: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Why allocation matters

• Without allocation: cannot take advantage of shaping– Interference from old tasks when learning new ones– Forgetting of previously learned tasks

• Worse than without any shaping– Increasing overall resource capacity is not sufficient

Page 9: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

A theoretical basis for allocation• Shaping => occasional sudden changes of task structure.• Rapid increase of error rate• Large degree of unexpected uncertainty

– Perhaps signaled by norepinephrine (Yu 2005)

• Allocate new memory cells for learning of new task, reduce plasticity of older modules (to prevent forgetting)

• Directed metaplasticity• Don’t want to switch off plasticity completely

– Refinement of known tasks

Page 10: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

A simple form of auto allocation

• Trigger allocation on sudden increase in error rate• Allocate a single new LSTM module and reset output weights.• Fully automatic allocation still performs significantly better than

unshaped network• Very similar learning curves (manual allocation / auto allocation)

– But: higher error rate in the learned regime => longer time to reach performance criterion

Page 11: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Allocation points

• Effective detection of task boundaries– Most allocations are correctly placed

• A few spurious allocations occur in the middle– These can actually help, if learning is stuck– Requires surpassing of learning threshold though

• Is a single new unit per allocation enough?

Page 12: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Reversal learning

• Reverse stimulus to rule mapping (12-AX => AB-X1)– A/B is outer loop, X1 / Y2 are target sequence

• Shape network prior to first exposure to 12-AX• A measure of cognitive flexibility • Auto allocation even better than manual, due to continued allocation

Page 13: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Task shifting

• Similar to reversal learning• Shift between 12-AX task and 45-DU task

• Implicit modularisation through distinct stimuli– Much easier task for all types of learning

Page 14: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Conclusions• We have shown in previous work, that shaping can improve several

core aspects of cognitive learning (e.g. rapid acquisition, generalisation, abstraction or reversal learning)

• Here we provide evidence of how to replace the homuncular allocation mechanism previously required, by a simple, yet effective, fully automatic allocation strategy.

• Shaping with auto allocation is still significantly quicker in learning than with no teacher signal

• Interference can mostly be eliminated compared to no allocation

• Sequential auto allocation provides further benefits over simple shaping– Unlearning ≠ forgetting, as always learn into new modules– Generally requires some amount of plasticity in all modules

Page 15: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

Future work

• Expected / unexpected uncertainty– 12-AX task is deterministic– No expected uncertainty (ACh) => makes life easier– Need a more explicit representation of uncertainty in the model

• When has a module been used / is free?– Resources aren’t infinite, need to reuse eventually– Over allocation of units, not all may be necessary– Need to prove that the system will reuse modules appropriately– Could just plasticize the output weights

• Task grammars– Can we extract common structure over many tasks from a modularized

net? – Turn learning into inference

• Use a different architecture (more symbolic)– More explicit gating decisions, use of reinforcement learning– Bilinear matching

Page 16: Modularisation through the prism of shaping - …krueger/COSYNE2008_kakrueger.pdfStructural modularity • Modularisation is a common problem in machine learning – A variety of solutions

References

1. O’Reilly, Randall C. and Frank, Michael J. Making Working Memory Work: A Computational model of learning in Prefrontal Cortex and Basal Ganglia, Neural Computation, 18 (2), 2005

2. Gers, Felix A. and Schmidhuber, Juergen and Cummins, Fred, Learning to forget: Continual prediction with LSTM, Neural Computation, 12 (10), 2000

3. Jordan, Michael I and Jacobs, Robert A. Hierarchical mixtures of experts and the EM algorithm, Neural Computation, 6, 1994

4. Haruno, Masahiko and Wolpert, Daniel M. and Kawato, MitsuoMOSAIC Model for Sensorimotor Learning and Control, Neural Computation, 13 (10), 2001

5. Dayan, Peter Rules and Habits, 20086. Carpenter, G. A. and Grossberg, S. Adaptive Resonance Theory, 1994

AcknowledgmentsSupport from the Gatsby Charitable Foundation