an event-driven approach to modeling excitable cells using hybrid automata mike true, suny at stony...

17
An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: • Emilia Entcheva • Radu Grosu • Scott A. Smolka • Pei Ye

Upload: leslie-hensley

Post on 04-Jan-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

An Event-Driven Approach to Modeling Excitable Cells using

Hybrid Automata

Mike True,SUNY at Stony Brook

A Joint Work with:• Emilia Entcheva• Radu Grosu• Scott A. Smolka• Pei Ye

Page 2: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Excitable Cells

• Excitable cells are cells that respond to electrical stimuli with electrical signals known at the cellular level as Action Potentials (AP)

• An AP is fired by an excitable cell as an all-or-nothing response to an electrical stimulus external to the cell

• The sequence of events followed by an AP is for the most part independent of the magnitude of the stimulus

• Examples of excitable cells found in mammals include those found in cardiac tissue and neurons

Page 3: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Features of Action Potentials

• While the AP of excitable cells might vary greatly in duration and morphology, they generally exhibit the same major phases

Page 4: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

The Full Hodgkin-Huxley Model

3 4.

( ) ( ) ( )Na Na K K L L stCV g m h V V g n V V g V V I

1 0 1

80

0 1 0 01

1

0 125

.

( . . )( )

( ) .

n

V

n

V

V

V e

Ve

2 5 0 1

18

2 5 0 1

1

4

. .

( . . )( )

( )

m

m

V

V

Ve

e

V

V

20

3 0 1

0 07

1

1.

( ) .

( )

V

V

h

h V

e

e

V

1.

( ) ( )m m n n n n nmm m m

1.

( ) ( )h h hh hh hhh h h

1.

( ) ( )n nn nn n nnn nn

Page 5: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Hybrid Automata Models

• Differential equations are very expensive to compute directly in simulations

• Redefining our model such that all of the differential equations are linear (i.e., of the form δx = ax for some constant a) results in a significant performance improvement

• We propose an approach to simulation using Hybrid Automata (HA) models for cells

Page 6: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Hybrid Automata

• In our HA models, we divide AP into four different states, namely Resting, Stimulated, Upstroke, and Plateau

• The variables of each cell change with time in accordance with the set of differential equations associated with the cell’s current state

• When certain conditions are met, the HA will transition from one state to another

• To obtain improved performance, we add the restriction that all differential equations in all states must be linear

Page 7: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

An HA Hodgkin-Huxley Model

Page 8: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Results for the HH Model

Page 9: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

An Observation

• A simple simulator implementation for our HA models can be made by using Time-step Integration techniques

• This implementation can be improved after observing that the cell is non-responsive to external input in the Upstroke and Plateau states

• We can readily solve the differential equations for these states to compute how long the cell will spend in them

• This modification allows us to effectively ignore cells in these states for several thousands of time steps

Page 10: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

An Event-Driven Model

• We associate an event with each cell to represent the next time that the cell requires processing and the type of processing required

• The correct ordering of events is maintained by storing events on a priority queue data structure

Page 11: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Types of Events

• Query_Neighbor: Uses time-step integration to update the cell’s variables considering the effects of neighboring cells and external stimuli (Resting and Stimulated states)

• Update_State: Requires a transition to the target state at the calculated time (Upstroke and Plateau states)

• Output_To_File: Dumps voltage values to an output file

• Begin/End_Stimulation: Applies/Removes stimulus currents from affected cells at the stimulus times

Page 12: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

An Event-Driven Model Example

1.000 ms

1.000 ms

6.000 ms

87.000 ms

87.010 ms

1000 ms

1.001 ms

1000 ms

2000 ms

Event Queue

0 1 2 3 4 5 6 7 8 9

Event Handler

Legend:

Events: Cell States:Query_Neighbor

Update_State

Begin_Stimulation

End_Stimulation

Output_To_File

Resting (Off Queue)

Resting (On Queue)

Plateau

Upstroke

Page 13: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Priority Queue Implementation

• A standard data structure for implementing a priority queue would be a min-heap, where the time of the event would be the priority

• This data structure requires O(log2 n) operations for insertions and removals, creating a large amount of overhead for Query_Neighbor events

• We propose a hybrid priority queue, where Query_Neighbor events are stored on two linked lists and all other events are stored on a min-heap

Page 14: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Performance Guarantees

• With n events on the min-heap, we can expect 2*n operations (one insertion and removal) while an event is on the heap. The total work is O(n log2 n) operations.

• We can assume that each event is equally responsible for 1/n of this overhead, meaning each event is “charged” with O(log2 n) units of work

• Because this work is spread throughout the entire time the event is on the min-heap, the amount of work per time-step is approximately (log2 n)/s, where s is the number of time-steps the event spends on the min-heap

Page 15: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Performance Guarantees

• For the work required per cell per time-step in the Upstroke and Plateau states to exceed 1 unit, we would need n to be equal to 2s

• Since typical values for s are in the thousands, a number of cells much greater than what can be stored in a computer’s memory system is required for this to occur

• In the worst case (all cells in the Resting and Stimulated states) the Time-step Integration model will outperform the Event-Driven model by a small factor related to the linked list overhead

Page 16: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Simulation Timing Results

• 400x400 Grid, 500 ms simulation (spiral wave):– Event-Driven model time: 1.7 hours – Time-step Integration model time: 9.05 hours– Speedup Factor: 5.33

• Grids of various sizes, wave started in a corner:– Speedup Factor: about 1.25– This would be considered a “worst-case scenario” for the Event-

Driven model

Page 17: An Event-Driven Approach to Modeling Excitable Cells using Hybrid Automata Mike True, SUNY at Stony Brook A Joint Work with: Emilia Entcheva Radu Grosu

Future Work

• “Putting cells to sleep” at resting potential, similar to the idea behind adaptive time-step techniques

• Develop tools to facilitate the rapid creation of simulators for models based upon HA specifications that use Event-Driven techniques