Skip to main content
PLOS Computational Biology logoLink to PLOS Computational Biology
. 2021 Jul 12;17(7):e1009088. doi: 10.1371/journal.pcbi.1009088

Integration of sleep homeostasis and navigation in Drosophila

Andres Flores-Valle 1,2, Pedro J Gonçalves 3,4,*, Johannes D Seelig 1,*
Editor: Barbara Webb5
PMCID: PMC8297946  PMID: 34252086

Abstract

During sleep, the brain undergoes dynamic and structural changes. In Drosophila, such changes have been observed in the central complex, a brain area important for sleep control and navigation. The connectivity of the central complex raises the question about how navigation, and specifically the head direction system, can operate in the face of sleep related plasticity. To address this question, we develop a model that integrates sleep homeostasis and head direction. We show that by introducing plasticity, the head direction system can function in a stable way by balancing plasticity in connected circuits that encode sleep pressure. With increasing sleep pressure, the head direction system nevertheless becomes unstable and a sleep phase with a different plasticity mechanism is introduced to reset network connectivity. The proposed integration of sleep homeostasis and head direction circuits captures features of their neural dynamics observed in flies and mice.

Author summary

In Drosophila, sleep and navigation are largely disconnected fields, even though the same brain structures and connected neural circuits are important for the two different functionalities. Motivated by experimental results from both fields as well as the connectome, we use theoretical modeling to describe the coupled dynamics of homeostatic sleep and navigation circuits in the central complex of Drosophila. The resulting model can incorporate and explain several experimental findings about sleep and navigation in flies and mice. The model is based on a ring attractor network which is combined with plasticity rules that change between sleep and wake phases and shows autonomous dynamics during sleep, reminiscent of observations in the head direction system of mice.

1 Introduction

Sleep affects many different brain functions such as cognition [1] or working memory [2] and sleep dysfunction is related to a range of diseases [3]. Sleep is observed across species and different hypotheses have been put forward to explain the function of sleep [4], for example reverse learning of spurious network states (that were created as a byproduct of intended memories) [57] or weakening of synapses (synaptic homeostasis hypothesis) [8].

The function of sleep is linked to the dynamic and structural changes that it induces in the brain [9], which in turn are monitored by sleep control or sleep homeostasis circuits [10, 11]. The circuits that control sleep are distributed over many different brain areas and cell types [10]. Thanks to the genetic tools [12, 13] that allow dissecting neural circuits into small populations of genetically identified cell types, as well as more recently the fly connectome [14], Drosophila has emerged as a valuable model for sleep control [11, 1517].

A generic sleep control circuit has been linked to specific neural populations in the brain of Drosophila [18]. This circuit has three components and corresponding neural populations in the central complex (Fig 1A). A first component encodes sleep pressure. The corresponding neural population has been identified in the so called R5 ring neurons which arborize in concentric rings in the ellipsoid body [19], a substructure of the central complex. These R5 neurons increase both their activity and synaptic strength over waking time and are reset with sleep. A second component of the sleep control circuit executes the switch between sleep and wakefulness (depending on the amount of sleep pressure). The corresponding neural population has been associated with the dorsal fan-shaped body (dFB) neurons, which promote sleep when active [20]. A third component triggers locomotion, processes visual input, and increases sleep pressure [18] and the corresponding neurons are so called helicon cells [18], also identified as ExR1 neurons [21]. The proposed recurrent circuit between these three neural populations [18] is illustrated in Fig 1A.

Fig 1. Sleep homeostasis and navigation circuits in the central complex.

Fig 1

A: Recurrent sleep homeostasis circuit proposed in [18]. The three populations are connected via excitatory (green arrows) or inhibitory (red arrows) connections. Images are downloaded from the connectome database [14]. B: Interaction between the fly head direction circuit and populations involved in sleep homeostasis. C: Switch behavior of dFB neurons modeled with hysteresis. D: Simulation of the sleep homeostasis model illustrating the dynamics of each population over time. E: Schematic of connectivity between wedge neurons and R5 and ExR1 neurons in the ellipsoid body.

The same central complex structures involved in sleep have also been shown to be important for navigation. In particular, ring neurons with similar morphology to the sleep-related R5 ring neurons, provide sensory input to the head direction system, such as visual features [22, 23] or wind direction [24]. Such input is integrated in so called wedge neurons, which arborize in different wedges of the ellipsoid body, where they intersect with ring neurons. These wedge neurons encode the head direction of the fly through a bump of activity that moves around the ellipsoid body [25].

In the context of navigation, the structure and function of circuits in the central complex are reminiscent of ring attractor networks [25]. Such networks, which are well suited to encode a circular variable, have been suggested to underlie the encoding of head direction, originally in mammals [26] and more recently in flies [25]. Several computational models for the head direction system in the insect brain have been developed (see for example [2729]).

It is currently unknown why the circuits for sleep homeostasis and head direction converge in the central complex. The morphological similarity of the ring neurons involved in sleep and head direction and the spatial proximity of the circuits as well as the fly connectome [14], suggest that they interact. The observed activity and structural changes in R5 ring neurons after prolonged waking time and after sleep [19, 30, 31] suggest that the head direction system in the ellipsoid body needs to operate in the face of substantial synaptic and functional changes in connected circuits.

Motivated by this interaction between navigation and sleep homeostasis circuits as well as their plasticity [19, 30, 31], we here use theoretical modeling to investigate how these two circuits can be understood as a combined system. For this purpose, we first model the circuit proposed in [18] and confirm that it generates sleep homeostasis. We then extend the model by combining it with a head direction network as suggested by the connectome. In this combined model, the sleep pressure-encoding R5 neurons balance Hebbian plasticity introduced in the recurrent connections of the head direction system. In this way, R5 neurons maintain a functioning head direction system and record sleep pressure. The system is finally reset through a sleep phase.

We discuss how this model can integrate several experimental observations on the navigation and sleep homeostasis systems reported in the literature. We further discuss several predictions of the model that can be tested in experiments. This analysis contributes to an understanding of the generation and dynamics of sleep drive and links the control of sleep to sleep function.

2 Results

2.1 Sleep homeostasis model

The sleep homeostasis model proposed in [18] is a variation of the two-process model [32, 33] and is illustrated in Fig 1A. All connections between populations are direct [18], except the connection between R5 and dFB neurons, which is considered indirect since these neural populations are not anatomically, but functionally connected [19]. Here, we describe this circuit with a phenomenological model (Eq (1) in Methods).

The variables rR5(t), rExR1(t) and rdFB(t) represent population firing rates of R5 neurons, ExR1 neurons and dFB neurons, respectively. R5 neurons have a time constant that accounts for the slow dynamics (on the order of hours) of their activity observed during waking time [19], whereas ExR1 and dFB neurons have an effective population time constant in the millisecond range. For simplicity, the model is defined such that population firing rates are between 0 and 1. The input to dFB neurons, e.g. representing a wake-promoting dopaminergic signal [34], takes values 0 or 1. The function which depends on the history of activity of R5 neurons and produces the observed switching behavior in dFB neurons [18], is described by a simple hysteresis (Fig 1C; Eq (2)).

Fig 1D shows a simulation of this model with the population firing rates changing over time. The sleep and wake phases are defined in terms of the activity of dFB neurons, which promote sleep while active [20]. During the wake phase, activity in R5 neurons increases, encoding sleep pressure due to sustained constant input from ExR1 neurons. After R5 neurons reach an upper threshold, rI(max), dFB neurons ‘switch on’ and inhibit activity in ExR1 neurons, which leads to a decrease in activity of R5 neurons. Once R5 activity reaches a lower threshold, rI(min), dFB neurons switch off, repeating the cycle. Sleep deprivation (by setting a longer inhibitory input to dFB neurons; red region in Fig 1D) leads to an increase of the activity of R5 neurons beyond rI(max). As expected for a sleep homeostasis circuit, after sleep deprivation, more time is required to reset the activity of R5 neurons back to rI(min) (sleep rebound; see Methods 4.3).

2.2 Connectivity between head direction and sleep circuits

While the circuit described above can produce sleep homeostasis, the connectome [14] shows that it acts not in isolation but interacts with the head direction system. Fig 1A and 1B show how R5 and ExR1 neurons are connected to wedge neurons that encode head direction. The anatomical organization of wedge, R5 and ExR1 neurons is shown schematically in Fig 1E, where each wedge neuron arborizes in a different wedge along the ellipsoid body, and R5 and ExR1 neurons arborize in concentric rings. The wedge neurons that encode head direction have been identified as EPG neurons [25], but a similar population of wedge neurons, called EL [14, 35] or AMPG-E [36], could also potentially encode head direction. These neurons have been proposed to contribute to the persistent activity in the network by excitatory feedback to EPG neurons [36]. These neurons can mediate a connection between R5 and EPG neurons that is stronger than the direct connection between R5 and EPGs. In the following, wedge neurons refer to both EPG and EL populations without distinction. We assume that both encode head direction and are directly or indirectly connected to R5 neurons. In S1 Fig, we show recurrent connections between wedge neurons (S1(A) Fig), between wedge and R5 neurons (S1(B) Fig), and between wedge and ExR1 neurons (S1(C) Fig) according to the connectome [14].

2.3 Integration of sleep homeostasis and navigation circuits with fixed connections

The interaction of the sleep homeostasis and ring attractor circuits extracted from the fly connectome is shown schematically in Fig 2A. Given that R5 neurons and wedge neurons are bidirectionally connected (see S1(B) Fig), we first asked how increasing activity of R5 neurons during the wake phase (see Fig 1D, first row) affects the head direction network. We therefore combined a ring attractor network with the above sleep homeostasis model (section 2.1) according to the connectivity in Fig 2A. As in previous work [37, 38], we identify wedge neurons as the excitatory component of a ring attractor network with recurrent excitation, encoding head direction with sustained bump-like activity. On the other hand, we assume that R5 neurons provide inhibition to wedge neurons [39], in agreement with the majority of ring neurons being inhibitory [40, 41]. For simplicity, we assume that ExR1 neurons, which are bidirectionally connected to wedge neurons, provide input (for example, visual input [17]) to the ring attractor similar to other ring neurons.

Fig 2. Integration of the sleep homeostasis circuit with a ring attractor network.

Fig 2

A: Schematic of a model where wedge neurons are connected to the sleep homeostasis circuit according to the fly connectome (see S1 Fig). In this model, fixed connections are assumed. B: Simulation of the model in A (dFB neurons not shown). Top row: rotating input to the ring attractor with frequency 0.5 Hz. Second row: bump of activity in wedge neurons encoding head direction. Third row: activity of the wedge neuron 16 (representative of any other wedge neuron). Fourth row: increasing activity of R5 neurons. C: Model with plastic connections indicated by black arrows. D: Simulation of the model in C (see caption in B). E: Dynamics of the model with plasticity: after a wake phase, high connectivity strength in the ring attractor leads to high sleep drive in R5 neurons, which leads to a switch to the sleep phase. After sleep, connectivity strength in the ring attractor is reset, producing low sleep drive.

Fig 2B shows the activity of wedge neurons and R5 neurons with a rotating input, representing any input to the ring attractor, such as visual or idiothetic cues (in blue, first row), which as expected moves the bump around the ring attractor (in green, second row). Increased activity in R5 neurons, as experimentally observed with increased sleep drive, decreases the bump amplitude in the ring attractor until it finally vanishes. Therefore, simply connecting R5 and wedge neurons as indicated by the connectome, leads to a decreasing bump of activity over time (see Methods 4.4 for details of this model).

2.4 Integration of sleep homeostasis and navigation circuits with plasticity

In Fig 2C, we propose an alternative model that can sustain a stable bump amplitude. In order to overcome a decreasing bump amplitude (which has not been experimentally observed), we hypothesize that the increase of inhibition from R5 neurons, in addition to encoding sleep drive, has the role of compensating for an increase in excitation in the head direction circuit. In particular, we hypothesize that excitatory synaptic strength between wedge neurons increases during the wake phase. This could be due to Hebbian plasticity between wedge neurons, since encoding the head direction in a bump of activity requires several wedge neurons to be active at the same time, thus strengthening the recurrent connections between them. This model is additionally motivated by the experimentally observed increase of activity as well as plasticity in R5 neurons [19]. In agreement with these data, we additionally add Hebbian plasticity from wedge neurons to R5 neurons.

In this model, R5 neurons act as a closed-loop feedback controller that prevents activity in wedge neurons from increasing due to Hebbian plasticity, by adaptively increasing inhibition. A simulation of this model is shown in Fig 2D where the bump of activity (second and third row) does not decrease as the activity of R5 neurons increases (fourth row). In the context of the sleep homeostasis circuit, dFB neurons then detect synaptic growth in R5 neurons. When R5 neural activity reaches an upper threshold, dFB neurons switch on sleep. We assume that during sleep, the plastic connections are reset with long-term depression (LTD), decreasing activity in R5 neurons (as observed in [19]) and lowering sleep drive (Fig 2E).

2.5 Two-population model with plasticity

Before we describe the full ring attractor model with plasticity (Fig 2C and 2D), we first discuss a population model of wedge and R5 neurons based on an excitatory-inhibitory rate network [42] (Fig 3A; Eq (7) in Methods). As will become clear in the following sections, this simplified model shows overall similar characteristics to the extended ring attractor model. Here, rE(t) and rI(t) represent the firing rates of wedge and R5 neuron populations, respectively, at a time t. wAB is the synaptic weight from population B to population A. Note that in this model, and as detailed below, the slow dynamics of R5 neurons will arise from the synaptic plasticity, and thus we do not set the time constant of R5 neurons to be on the order of hours, in contrast with the phenomenological sleep homeostasis model (section 2.1).

Fig 3. Two-population model.

Fig 3

A: Model describing the dynamics of the activities of excitatory wedge neurons and inhibitory R5 neurons, rE and rI respectively, and the plasticity of the synaptic weights within the wedge population wEE and from the wedge population to the ring population wIE. Green connections are excitatory, red connections inhibitory. B: Stability conditions with respect to wEE (fast-timescale limit, see Methods). C: Dynamics during wake phase. As wEE grows, the system undergoes a Hopf bifurcation (a critical point where the system starts to oscillate) and both populations start to oscillate around a fixed point. D: Dynamics with alternating sleep and wake phases. Wake phase produces LTP in wEE and wIE and increases the activity of R5 neurons. Sleep produces LTD and reduces the activity of R5 neurons. Extending the wake period produces sleep deprivation and results in stable oscillations. The subsequently required sleep period for resetting is longer (sleep rebound).

During the wake phase, we introduce plasticity rules for the excitatory weights, wEE and wIE (Eq (8) in Methods). We assume that the dynamics of the plasticity rules are much slower than the dynamics of neural populations, producing long-term plasticity. While the plasticity rule in recurrent connections wEE is a linear Hebbian rule, the one in wIE is a triplet rule with presynaptic threshold; its behavior is similar to the linear Hebbian rule with presynaptic threshold, but it has a quadratic dependency on the presynaptic activity while ensuring no change in wIE if neural activity is zero or presynaptic activity is equal to the setpoint r0 (see derivation in Methods 4.5.1 and in [43]).

The plasticity rules are motivated by our hypothesis that the observed increase in activity and synaptic strength in R5 neurons [19] balance the long-term potentiation in recurrent connections of wedge neurons, wEE. The plasticity rules therefore produce the following effects: (i) The recurrent synaptic connections between wedge neurons, wEE, as well as the connections between wedge and R5 neurons, wIE, get stronger during the wake phase. (ii) The firing rate of R5 neurons rI increases during the wake phase. (iii) The activity of wedge neurons (which represents head direction) evolves always towards a constant setpoint, rEr0. Note that activity is not constrained to the setpoint, but evolves towards it over time, since the setpoint is a stable fixed point for wedge neurons (see Methods). Therefore, the bump amplitude will deviate from the setpoint due to any input (for example visual or self-motion related; see S3 Fig), consistent with experimentally observed behavior-related changes in bump amplitude [44]. These plasticity rules avoid the problem of a vanishing bump amplitude, as observed in the model with fixed connections (compare Fig 2B and 2D).

How plasticity can drive the observed increase in R5 neuron activity with sleep pressure [19, 30] is currently unknown. Since it is the activity of R5 neurons, and not the plasticity, which is hypothesised to trigger sleep [18, 19, 30], our models assume plasticity that directly modifies the activity of R5 neurons (Fig 3C), a possibility that is consistent with the data in [19].

2.6 Dynamics of the two-population model with plasticity

We start by characterizing the dynamics of the two-population model in the wake phase. Since the change in wIE is always coupled to the change in wEE, the dynamics of the system at a given time t are completely described by wEE(t) (fast-timescale limit; see Methods 4.5.2 for details). Therefore we can study the stability of the model as a function of wEE.

Fig 3B shows how the fixed point for wedge neurons rE* remains constant, and the fixed point for R5 neurons rI* increases as the connections wEE (and therefore wIE) get stronger. If wEE ≤ 2 (light green region), the fixed point (rE*,rI*) is stable, and both neural populations evolve towards these values. This makes wedge neurons to evolve towards a constant activity, r0, in agreement with assumption (iii). If wEE increases further, wEE2(1+θ/r0), the model enters a regime of stable oscillations (light orange region). In this regime, both neural populations oscillate around the fixed point with a frequency that changes with wEE (see S2(A) Fig and Methods 4.5.2). Finally, when wEE2(1+θ/r0) (light red region), the fixed point is unstable and the activity of both populations diverges.

Fig 3C illustrates the dynamics of the full system, i.e. the activity of wedge and R5 neurons, rE(t) and rI(t), as well as synaptic weights, wEE(t) and wIE(t). In the beginning (light green region), the fixed point of ring and wedge neurons is stable because wEE < 2. When this boundary is crossed, the system enters the regime of stable oscillations (light orange region). Also, in the stable regime, wEE increases due to Hebbian plasticity, and wIE and ring neuron activity rI increase to balance increasing excitation within wedge neurons, such that rE remains constant and close to the setpoint r0.

To limit synaptic growth as well as to avoid instability and oscillations (when wEE > 2), we introduce a sleep phase, as proposed by models of sleep homeostasis [18]. In this model, dFB neurons detect the increased activity of R5 neurons and implement a switch between sleep and wake phases. dFB neurons receive as input a low-pass filter of R5 activity, motivated by the fact that R5 and dFB are not anatomically but functionally connected [19] (Eq (27)). Additionally, this filtering prevents uncontrollable switching between phases in the oscillatory regime.

During the sleep phase, the synaptic rule in wEE is inverted producing an anti-Hebbian rule. This results in wEE becoming weaker through LTD [57] according to the plasticity rule in Eq (9). The plasticity rule for wIE is the same in both sleep and wake phase. The impact of LTD on the model can be understood by inspecting Fig 3B from right to left: with decreasing value of synaptic strength wEE, the fixed points become stable (light green) and the activity of R5 neurons decreases (see Methods 4.5.2).

Fig 3D shows a simulation of the model combining subsequent wake and sleep phases. During wake phases (top, white region), dFB neurons are inactive (rdFB(t) = 0, not shown), and during sleep phases (grey region) dFB neurons are active (rdFB(t) = 1). During wakefulness, wEE and wIE undergo LTP and the activity of R5 neurons increases (light red line in second row in Fig 3D) and rE is constant.

When the switching signal (dark red line in second row) crosses an upper threshold, rI(max), dFB neurons switch the model to sleep. During sleep, wEE undergoes LTD due to the switch in plasticity, while the activity of R5 neurons decreases. Note that we do not change the plasticity rule of wIE, since this rule ensures wIE to always follow the trend (potentiation or depression) of wEE in order to maintain the activity of wedge neurons, rE(t), at a setpoint.

Once the switching signal reaches the lower threshold, the model switches back to the wake phase. Furthermore, if we prevent dFB from switching to the sleep phase (see Methods) and thus extend the wake period (sleep deprivation, upper orange region, Fig 3D), wEE crosses the boundary for stability, wEE > 2, and the model enters the regime of stable oscillations. In the subsequent sleep phase, more time is required to reset the excitatory weights, wEE and to reach the lower threshold rI(max), resulting in sleep rebound (Fig 3D, sleep phase after sleep deprivation).

The time that the system spends in the sleep and wake phases is determined by the time constant of the plasticity rule in wEE, τEE (see long-timescale limit in Methods 4.5.2), and the upper and lower thresholds of the switching signal, rI(min) and rI(max). In our simulations, we set τEE to yield dynamics on the timescale of seconds (for ease of visualization), but larger values lead to similar behavior on longer timescales (minutes or hours)

2.7 Ring attractor model with plasticity

We now extend the two-population model to a full ring attractor model (Eq (28)). The network, shown schematically in Fig 2C, is implemented with N = 32 wedge neurons (based on anatomy [45]).

Here, rE(i)(t) is the firing rate of wedge neuron i at time t (Fig 4A). For simplicity, we model the population of R5 neurons with a single variable, rI(t). wAB is the matrix of synaptic weights from population B to population A, and wEE is initialized with a Gaussian function that depends on the distance between wedge neurons along the ring. The Gaussian has two parameters, the maximum amplitude, wEE(max), and the standard deviation σ (Eq (31)). Fig 4A illustrates the connectivity from all the wedge neurons to wedge neuron 16. Additionally, each wedge neuron receives a time-varying input (for example, visual or idiothetic input). This input encompasses input from ExR1 neurons as well as from others populations. We assume that this input can be inhibited by dFB neurons, as in the sleep homeostasis model (section 2.1), and is defined as a Gaussian function where the peak is located at a given wedge neuron (Eq (32) in Methods).

Fig 4. Dynamics of ring attractor network during wake phase.

Fig 4

A Left side: representation of excitatory connections from all wedge neurons to wedge neuron rE(16). Right side: Gaussian connectivity from all wedge neurons to wedge neuron 16, with maximum amplitude wEE(max) and standard deviation σ. B: Model dynamics obtained in the fast-timescale limit (see Methods(4.7)) depend on the parameters of the excitatory connectivity, wEE(max) and σ. C: Left side: dynamics during wake phase of the ring attractor model where the bump is located around wedge neuron 16. When the total excitatory weight, wEE(16,sum), crosses a threshold, the bump starts to oscillate. Right side, top: initial excitatory connections between wedge neurons. Right side, bottom: final excitatory connections between wedge neurons; changes are a result of synaptic plasticity. D: Blow-up of the simulation in C, during the transition to the oscillatory regime.

The inhibition of input to wedge neurons during sleep is motivated by the fact that the fly does not move during sleep, suggesting that self-motion inputs are not present. On the other hand, ExR1 neurons, which contribute to visual processing and locomotion, are inhibited by dFB neurons during sleep [18]. We hypothesize that other neural populations providing visual input to the ring attractor [23] might require coincident activity from ExR1 neurons to reliably transmit visual information. This information might not be transmitted during sleep because of the suppressed ExR1 neural activity. This is consistent with the idea of an increased arousal threshold during sleep, where stronger stimuli are required to produce a behavioral response [46].

The plasticity rules during the wake phase in recurrent connections between wedge neurons, wEE, and from wedge to R5 neurons, wIE are a direct extension of the ones in the two-population model (Eq (29)).

Similar to the two-population model, the dynamics of the ring attractor network are determined by the recurrent excitatory weights wEE(t). In particular, the stability of a bump of activity centered around wedge neuron i is determined by the total excitatory connectivity towards it, wEE(i,sum)(t), defined by Eq (37) (Fig 4A). Here and in the following, we focus our analysis on wedge neuron i = 16, but the results generalize to all wedge neurons.

Fig 4B shows the different dynamic regimes of the bump as a function of the parameters wEE(max) and σ that determine the values of wEE (see Methods (4.7) and S5 Fig).

The colored lines in Fig 4B are isolines of constant wEE(16,sum), and correspond to the boundaries of distinct dynamics of the bump of activity in wedge neurons.

The boundaries are similar to the ones found in the simpler two-population model (section 2.5). The bump is stable around wedge neuron 16 if 1<wEE(16,sum)<2. As the recurrent weights wEE(ij) increase due to LTP during the wake phase, so do σ and wEE(max). The bump starts to oscillate if recurrent connections are too strong, i.e. wEE(16,sum)>2. When wEE(16,sum)>2(1+θ/r0), the bump keeps oscillating with very low activity in wedge neurons, in contrast to the instability encountered in the two-population model (see Methods 4.7).

Fig 4C illustrates the dynamics of the system with a bump centered in wedge neuron 16 (first row): since the active wedge neurons that form the bump have correlated activity, some entries in the recurrent connectivity matrix, wEE, increase due to Hebbian plasticity. Therefore the total excitatory connectivity to wedge neuron 16, wEE(16,sum), increases (fourth row). On the other hand, the weights wIE(i) (represented by the mean) also increase (fifth row), leading to increased activity of R5 neurons (third row), which in turn maintains the amplitude of the bump in wedge neuron 16 constant at the setpoint r0 (second row).

When wEE(16,sum)>2, the bump starts to oscillate, as do R5 neurons (orange region in the last four rows) (see Fig 4D for a blow-up of the transition to oscillations). In addition, the plasticity rule in the recurrent connections wEE leads to an increase of the synaptic weights around the bump position (Fig 4C, right side, top versus bottom).

As in the two-population model, we introduce a sleep phase to reset the connections in the ring attractor network by using the anti-Hebbian plasticity rule (Eq (30)). This rule produces LTD with correlated activity between neighboring wedge neurons. Fig 5A shows a simulation of this model. Again, during wake phases (top, white region) dFB neurons are inactive (rdFB(t) = 0, not shown), and during sleep phases (grey region) dFB neurons are active (rdFB(t) = 1). In the wake phase, a rotating input with a constant frequency of 0.5Hz is provided; the input reverses direction between consecutive wake phases (top row). As in the two-population model, the switching is driven by a low-pass filter of R5 activity (see Eq (27)). During the sleep phase, the input to wedge neurons is inhibited.

Fig 5. Simulation of ring attractor combined with sleep homeostasis model, using an anti-Hebbian plasticity rule during sleep.

Fig 5

A: Entire simulation over a period of 700 seconds. White and grey regions indicate the wake and sleep phases, and correspond to dFB neurons switching off and on, respectively. Top row: input (inhibited during the sleep phase), alternating between clockwise and counter-clockwise rotations at 0.5Hz. Second row: ring attractor bump activity. Third row: activity of wedge neuron 16. Fourth row, light red: activity of R5 neurons. Dark red: filtered activity. Switching between sleep and wake is carried out by dFB neurons that switch on and off depending on filtered activity crossing thresholds rI(min) and rI(max). In the third wake epoch, sleep deprivation is produced by extending the inhibition of dFB neurons (d(t) = 1 during the orange top layout; see Methods). Fifth row: diagonal elements of the connectivity matrix wEE(ij). The white line is the sum of all excitatory connections to wedge neuron 16. It passes threshold 2 at around 240 seconds leading to oscillations. The full connectivity matrix wEE(ij) at the switch times is shown in S6 Fig. Sixth row: connectivity wIE(i); black line is the mean value. B: Blow-up around 184 seconds: switch from wake to sleep phase. C: Blow-up around 370 seconds: extended wake phase leads to oscillatory behavior. Circuit switches to sleep. D: Blow-up around 518 seconds: switch from sleep to wake phase.

During the wake phase, the bump in the ring attractor closely follows the input (second row), while the activity of R5 neurons increases (light red line in the fourth row). The second to last row shows the increasing diagonal elements of wEE while the last row shows an increasing wIE. During sleep, the autonomous bump movement resets synaptic connections and the activity of R5 neurons decreases. Heterogeneity in the weights wEE (due to synaptic plasticity) makes the bump drift across wedge neurons. These autonomous dynamics reset the connectivity in the network [7]. The amplitude of the bump during autonomous dynamics is at setpoint level, that is, at the activity level in the absence of external input.

As in the two-population model, the time duration of wake and sleep phases depends on τEE, rI(min) and rI(max). This simulation shows sleep and wake phases on the order of seconds, for ease of visualization, but the simulation in S7 Fig, with an increased τEE, shows slower dynamics with sleep phases of 100 minutes, which is the mean sleep time of flies during the night [47].

Wake phases without continuous input can also show drift (see S8 Fig with intermittent input). This wake drift is however different from sleep drift, since it ends once the bump reaches the location of strongest recurrent excitation, making the synaptic weights grow in this location until sleep is initiated. Such wake drift can be reduced in our model by slowing the plasticity rules and by ensuring close to homogeneous coverage of the bump movement across all wedge neurons (see S9 Fig and Methods (4.9)).

2.8 Autonomous dynamics in the ring attractor model

To investigate how the autonomous dynamics of the bump during sleep are linked to the dynamics during the preceding wake phase, we provided sinusoidal inputs in a range of amplitudes A and frequencies f. In Fig 6A, we show a simulation with fixed amplitude, A = N/4 and different frequencies in each wake phase (0.1, 0.5, and 1 Hz). During sleep, the bump revisits wedge neurons that were active in the preceding wake phase, as seen in the distributions of the time spent around each wedge neuron during the first (left), second (center) and third (right) wake phase (in blue), and during the following sleep phase (in grey) (Fig 6B). To further probe the amplitude dependence, we simulated a wake phase and the subsequent sleep phase, and in each simulation varied the amplitude A of a sinusoidal input in the range [0, 16], with fixed frequency of f = 1Hz, during the wake phase. The standard deviation (STD) of the paths of the bump during the wake (blue) and sleep (grey) phases closely match (Fig 6C). Similarly, we investigated the frequency dependence with a stimulus with fixed amplitude, A = N/4, and varying frequency in the range [0.1, 1.5]Hz. The number of oscillatory cycles grows linearly with the input frequency in the wake phase (blue), but remains constant during sleep. Therefore, the dynamics during sleep do not depend on the input frequency during the wake phase (Fig 6C). Additionally, the frequency of oscillations of the bump around the ring can increase as the bump approaches the lower threshold of the switching signal (before waking up, S9(A) Fig). Overall, the autonomous dynamics of the model are reminiscent of activity observed during sleep in mice [48].

Fig 6. Relation between wake and sleep dynamics in the ring attractor network.

Fig 6

A: In each wake phase, a sinusoidal input is provided to the ring attractor (top row) with increasing frequency in consecutive wake phases. During sleep, an autonomous bump of activity revisits wedge neurons active in the previous wake phase (second row). The third row shows the activity of wedge neuron 16 and the fourth row shows the activity of the ring neuron (light red) and its filtered activity (dark red) used to switch between wake and sleep phases. The last two rows represent the synaptic weights that increase during wakefulness and decrease during sleep. B: Normalized distribution of time that the bump peak is localized in each wedge neuron during wake (blue) and sleep (grey) phases. The first, second and third plots show the distribution for the first, second and third wake and sleep phases, respectively. C: Top: standard deviation (STD) of the bump path during a total of 15 simulations where different amplitudes of a sinusoidal inputs are provided during the wake phase. During the wake phase, the STD of the bump path is proportional to the input amplitude (grey). During sleep, the autonomous bump path has a correlated STD (Pearson correlation coefficient: 0.99; p = 1.5 ⋅ 10−17). Bottom: number of cycles of the bump path during a total of 15 simulations with different frequencies of a sinusoidal input during wake phase. During the wake phase, the number of cycles is proportional to the input frequency. However, during sleep, the number of cycles does not change with the input frequency.

3 Discussion

In the brain of Drosophila, structurally similar neurons in the center of the brain have been assigned functionally very different roles. On the one hand, navigation related ring neurons encode spatial memory or visual features [22, 23, 49]. For these ring neurons, ring attractor networks offer a compelling structure-function relationship which can provide a rationale for their ring-shaped morphology. On the other hand, sleep related ring neurons serve as homeostatic sleep integrator, encoding sleep drive through structural [19, 31] and activity changes [19, 30]. The connectome additionally shows multiple interactions between these sleep- and navigation-related circuits [14, 35]

To elucidate the relationship between these navigation and sleep functionalities of ring neurons, and to address how the head direction system can operate in the face of plasticity in connected circuits, we therefore asked what role the homeostatic integrator could play in the ring attractor framework.

To address this question, we used the sleep homeostasis model proposed in [18] as a starting point. The connectome shows that this circuit is not isolated but interacts with the head direction system (Fig 2A). When connectivity in this circuit is fixed, however, the increasing activity of R5 neurons (which encode sleep drive) decreases the amplitude of the bump of activity in the ring attractor (Fig 2D). To overcome this problem of vanishing activity, we therefore propose a model with plasticity in R5 neurons (which is experimentally observed) and with hypothesized recurrent plasticity between wedge neurons. In this model (Fig 2C), sleep drive balances plasticity in wedge neurons, which are now able to maintain a bump of activity that evolves towards a constant amplitude setpoint over long-timescales. The model also allows variability in the bump amplitude in short-timescales with external (for example visual or self-motion related) input (S3 Fig), consistent with experimentally observed behavior-related changes in bump amplitude [44].

However, prolonged activity during wakefulness ultimately leads to unstable behavior (oscillations in Figs 4C and 5A). Therefore, to restore the connectivity in the head direction system to baseline, we introduced a sleep phase, in agreement with models of sleep homeostasis [18], where the synaptic connections between wedge neurons are reset by LTD. While the time course and dynamics of this reset are not known, we here investigated two alternatives. In one case, while dFB neurons inhibit input, the ring attractor resets to its initial state while the bump stays in place (S10 Fig). In the second case, an anti-Hebbian rule resets the ring attractor with autonomous dynamics. These dynamics are linked to the dynamics during wakefulness through their spatial (Fig 6A and 6B) but not through their frequency distributions (Fig 6A and 6C). The amplitude of the bump during autonomous dynamics is at setpoint level, that is, at the level of activity to which the amplitude settles in the absence of (visual or idiothetic) input.

In the proposed model, heterogeneities in recurrent connections of wedge neurons can also lead to drift during the wake phase with intermittent inputs (see S8 Fig). While this is consistent with the heterogenities observed in the connectome (S1(B) Fig), we maintained a low drift by having plasticity rules with sufficiently slow dynamics and assuming homogeneous activation of wedge neurons over time (S9 Fig). Other solutions to avoid drift in ring attractors have however been developed (for example [5052]).

Many aspects of this model can also be captured by a simpler two-population model, which shows similar dynamics and related boundaries between the different dynamic regimes (Figs 3B and 4B).

The introduction of plasticity was motivated by the observation of structural, synaptic and functional changes in R5 neurons [19, 30, 31] as well as their interaction with the head direction system as suggested by the connectome [14, 35, 53]. The proposed combined sleep homeostasis and ring attractor model can capture this increase in activity in R5 neurons during wakefulness [19, 31] (Fig 5A and S7(A) Fig, fourth row).

Additionally, in the proposed models, sleep deprivation leads to a qualitative change in the behavior of R5 neurons towards oscillatory dynamics which is reminiscent of the experimentally observed transition to bursting dynamics [19] or increase in oscillatory dynamics [30]. Whether sleep deprivation compromises the head direction system in behaving flies is currently not known, although navigation related memories are for example affected by sleep deprivation in bees [54, 55].

The proposed model relies on several hypotheses that could be tested experimentally, summarized in Table 1. First, we assume that the bump amplitude in wedge neurons evolves towards a setpoint in the absence of changing input (consistent with experiments [25]). We further hypothesize LTP and LTD plasticity in the recurrent connections of wedge neurons during wakefulness and sleep respectively (which could also be achieved through an intermediate population [39] such as EL neurons, see S1(B) Fig). This plasticity in wEE is assumed to be Hebbian plasticity, potentially produced by correlated activity between neighboring wedge neurons. The switch in the plasticity rule between wakefulness (LTP) and sleep (LTD) has been proposed in several models of sleep (for example [56]; see [4] for review). A potential mechanism could for example be neuromodulation of an STDP gate [57, 58], which has been observed in insects [59, 60] and could involve the strong innervation of the central complex by neuromodulatory neurons [61]. For example, ExR1 neurons described in [18] (modeled in Fig 1A and 1B) could produce the switch in plasticity between sleep and wake phases, potentially through neuromodulation (similar to the related serotonergic ExR3 neurons [21, 35, 62]). Finally, we assume LTP in connections from wedge to ring neurons (wIE) and slowly increasing firing rate in R5 neurons during wakefulness (consistent with experiments [19]). During sleep, we hypothesize that these connections are reset and R5 neurons slowly decrease their firing rate.

Table 1. Model hypothesis and predictions.

Model hypothesis Model prediction
i) The bump amplitude in wedge neurons evolves towards a setpoint in the absence of changing input (rE evolves towards a setpoint, r0) i) Prolonged wakefulness leads to oscillations in both wedge and R5 neurons
ii) Plasticity in recurrent connections between wedge neurons (wEE):
- LTP during the wake phase
- LTD during the sleep phase
ii) Prolonged wakefulness prevents wedge neurons from tracking external inputs
iii) R5 neurons keep the bump amplitude constant over long-timescales.
R5 neurons balance plasticity in wedge neurons (wEE) with plasticity (wIE) and increasing/decreasing activity (rI)
iii) During sleep, wedge neurons show autonomous dynamics
iv) The width of the bump changes over long-timescales:
- decreases during the wake phase
- increases during the sleep phase

The model makes several predictions. First, the model predicts that prolonged wakefulness leads to oscillation in wedge and R5 neurons, due to LTP in the circuit. Second, as a result of this plasticity, the bump width changes with wEE, decreasing over time spent awake due to LTP in wedge neurons and therefore increasing spatial resolution (and vice versa during sleep, S5(C) Fig). Generally, there is a range of bump widths that can be sustained by the ring attractor (Fig 4). Third, extended wakefulness can disrupt the head direction system by producing oscillatory or bursting behavior and will lock the bump position in place (independent of external input, Fig 5A, sleep deprivation). Additionally, sleep results in autonomous dynamics in the ring attractor model (Fig 5), with the network transitioning towards faster dynamics towards the end of the sleep phase (S9 Fig). Such autonomous dynamics are reminiscent of activity of the head direction system observed in mice during sleep [48].

The resulting weakening of synaptic strength during sleep underlies several hypotheses about sleep function [46, 8]. The approach implemented here is based on the idea of reverse learning [57]: during sleep, attractors within the ring attractor network generated during wake phase are removed and the corresponding increased weights are weakened. Autonomous dynamics during sleep could be functionally relevant for memory consolidation and organization [63]. For instance, flies could partially replay (in wedge neurons) trajectories during sleep that they performed during navigation in the wake phase (see Fig 6A), which could be used by downstream circuits to consolidate navigation-related memories. Navigation memories are for example consolidated during sleep in bees [54], and replay of neural activity in the central complex during sleep has been suggested to consolidate courtship memory in flies [64].

While synaptic changes during sleep and wakefulness are observed across the fly brain (for example [65]), one could hypothesize that such activity-related changes are stronger in areas where activity is persistent with a possible role in working memory, such as the head direction system [25, 49]. Therefore, inhibitory R5 neurons might increase their activity faster and require resetting through sleep sooner than other transiently active neurons, ultimately being responsible for signaling sleep drive. We additionally did not differentiate between different ring attractor inputs (for example visual or idiothetic) and such different signals could also be integrated in different ring neurons or homeostats [11] (taking for example into account that visual experience increases sleep need [66]).

The connectome shows that both the head direction as well as the sleep homeostasis circuits encompass a large number of connected cell types in the central complex [35, 67]. Nevertheless, strongly simplified models of ring attractor networks with only a limited subset of actually involved cell types have proven useful for the description of the head direction system. Similarly, for the sleep homeostasis circuit, many more connected cell types could be considered and we here only investigated a simplified network that nevertheless can capture several experimental observations.

Circadian input could be integrated in the proposed model to synchronize sleep and wake phases to day and night cycles. This input would need to interact with the sleep switch (dFB neurons), as experimentally observed [68]. For example, inhibitory circadian input to dFB neurons could delay the switch to sleep (similar to sleep deprivation), while excitatory circadian input to dFB neurons could promote early sleep.

Overall, the interaction of the homeostatic integrator and the head direction systems together with mounting evidence for a close structure-function relationship in these circuits, suggest that a relationship between the control and function of sleep could be established in this network using theoretical modeling and experiments.

4 Methods

4.1 Anatomy based on the fly connectome

The connectivity of the proposed model is based on the fly connectome [14] and incorporates the populations R5 (ER5), ExR1, EPG and EL, as described in the Neuprint database. Each population and its innervation in the ellipsoid body are shown in S1(A) Fig. EL and EPG neurons, respectively, have diagonal connectivity matrices within and across populations as shown in S1(B) Fig.

4.2 Numerical simulation of models

We numerically solved all models with forward Euler with a time step of dt = 0.0001 seconds. Our code is implemented in Python, and is available at https://gitlab.com/anflorescaesar/integration_of_sleep_pressure_and_navigation_simulations

4.3 Sleep homeostasis circuit

In this and the following, we use rate-based models to simulate dynamics of entire neural populations and dynamics of single wedge neurons. The differential equations used to model the sleep homeostasis circuit are as follows:

{τR5rR5˙(t)=-rR5(t)+[rExR1(t)]+τr˙ExR1(t)=-rExR1(t)+[1-rdFB(t)]+τr˙dFB(t)=-rdFB(t)+[G(rI)-d(t)]+. (1)

The variables rI(t), rExR1(t) and rdFB(t) are the population firing rates of R5 neurons, ExR1 neurons and dFB neurons, respectively. τI is the time constant of R5 neurons (on the order of hours) and τ is the effective population time constant (in the millisecond range). [⋅]+ is a threshold-linear function to ensure positive-valued firing rates. The variable d(t), which can take values 0 or 1, represents an input to dFB neurons such as a wake-promoting dopaminergic signal [34]. The switch behavior of dFB neurons is modeled by simple hysteresis (Fig 1C), according to the following equation:

G(rR5)={0ifrR5(t)<rI(max)andrR5˙(t)>01ifrR5(t)rI(max)andrR5˙(t)>01ifrR5(t)>rI(min)andrR5˙(t)<00ifrR5(t)rI(min)andrR5˙(t)<0 (2)

Such a switch behavior in dFB neurons could be implemented, for example, by adding an additional wake-promoting population, which together with dFB neurons, could mutually inhibit each other to create a flip-flop switch, similar to sleep models proposed in mammals [6972]. Candidates for the wake-promoting population in the fly are dopaminergic neurons in the PPM3 and PPL1 clusters [34]. Alternatively, this switch behavior could be generated by a single-cell mechanism in dFB neurons, which are known to increase excitability with extended wake time [34].

In this model, the wake and sleep time depend on the effective time constant τR5 and the thresholds rI(min) and rI(max). The time spent in the sleep phase, tS (sleep time) as a function of the time spent in the wake phase, tW (wake time), can be computed by solving the differential equation for R5 neurons, rR5, during the sleep phase and wake phase, respectively:

tS(tW)=τR5log(1+(rI(min)-1)e-tW/τR5rI(min)) (3)

Considering that tW is small, we can expand this expression in a Taylor series, taking only first order terms:

tS1-rI(min)rI(min)tW (4)

For small waking time periods, the sleep time tS increases linearly, resulting in sleep rebound as required for homeostasis (increased time spent awake leads to more sleep afterwards). However, for long wake times, the preceding sleep time saturates at a constant value tS(sat), given by the following expression:

tS(sat)=τR5log(1rI(min)) (5)

This saturation time prevents very large sleep times after large preceding wake times, and it is also a feature observed experimentally [32].

4.4 Sleep homeostasis and ring attractor with fixed connections

We asked how increasing activity in R5 neurons affects the head direction circuit in the absence of plasticity. Given the fact that R5 and wedge neurons are connected, we modeled a ring attractor network where wedge neurons encode head direction and R5 neurons provide increasing inhibitory input to wedge neurons. The model is shown schematically in Fig 2A and described by the following system of equations:

{τr˙E(i)(t)=-rE(i)(t)+[jNwEE(ij)rE(j)(t)-wER5rR5+θ+I(i)(m,t)]+fori=1,,NτR5r˙R5(t)=-rR5(t)+[jNwR5E(j)rE(j)(t)+rExR1(t)]+, (6)

where rE(t)(i) represents the activity of a wedge neuron i (in total, N = 32), rR5(t) is the population activity of R5 neurons and the time constants, τR5 and τ, are the same as in the sleep homeostasis model. We only model the wake phase for simplicity, where dFB neurons are assumed to have zero activity and activity in ExR1 neurons is defined as rExR1(t) = 1, similar to the sleep homeostasis model. We neglect the connection from wedge to ExR1 neurons for simplicity, since we focus on the interaction between wedge and R5 neurons. The weights wAB represent the connectivity from population B to population A. The recurrent connectivity wEE(ij) is a matrix, in which for a given postsynaptic wedge neuron, i, the element (ij) is given by a gaussian function that depends on the distance to the presynaptic wedge neuron j along the ring, given by Eq (31) (see for example Fig 4A). In this model, the synaptic weight wR5E is tuned such that the activity of ring neurons increases, as in the sleep homeostasis model.

Fig 2B shows a simulation of the model, where a rotating input I(m, t) is provided to wedge neurons at 0.5 Hz (top row, blue). The activity of R5 neurons increases, as imposed by our parameter choice (third row, red). The wedge neurons, (second row, green) follow the rotating input while receiving this increasing inhibition, such that the bump amplitude decreases over time until inhibition gets strong enough so that the bump vanishes.

4.5 Two-population model with plasticity for R5 and wedge neurons

To simplify the analysis and build intuitions about the complete ring attractor model combined with the sleep homeostasis circuit, we first developed a simpler model. This model is a population model based on an excitatory-inhibitory network [42] (Fig 3A) and describes the interaction between wedge and R5 neurons. The respective dynamics are described by the following system of differential equations:

{τr˙E(t)=-rE(t)+[wEE(t)rE(t)-wEIrI(t)+θ]+τr˙I(t)=-rI(t)+[wIE(t)rE(t)]+, (7)

where rE(t) and rI(t) are the firing rates at time t of wedge neurons and ring neurons, respectively, wAB is the synaptic weight from population B to population A, θ is a constant background input onto wedge neurons, [⋅]+ is a threshold-linear function to ensure positive-valued firing rates, and τ is the effective population time constant. Note that now we model R5 neurons with a time constant τ on the millisecond range, in contrast with the previous models.

4.5.1 Plasticity rules

We introduce plasticity rules for the excitatory weights wEE and wIE during the wake phase:

{τEEw˙EE(t)=crE(t)rE(t)τIEw˙IE(t)=crI(t)rE(t)(rE(t)-r0), (8)

During the sleep phase we change the plasticity rule in wEE, while leaving unchanged the plasticity rule in wIE:

{τEEw˙EE(t)=-crE(t)rE(t)τIEw˙IE(t)=crI(t)rE(t)(rE(t)-r0), (9)

where τEE and τIE are time constants, r0 is a positive presynaptic threshold, and c is a proportionality constant. While the first plasticity rule is a linear Hebbian rule, the second is a triplet rule with presynaptic threshold. These plasticity rules can be extracted from a general form of Hebbian plasticity. A general Hebbian plasticity rule for a synaptic weight wij can be defined as follows:

τijw˙ij=F(wij,ri,rj), (10)

where τij is the time constant of the rule, and F(⋅) is a function that depends on the synaptic weight, wij, and on pre- and postsynaptic activities, rj and ri, respectively [43]. The function F(⋅) needs to fulfill Hebb’s condition: to produce a change in the synaptic weight wij, the pre- and postsynaptic neurons must be active: ri > 0, rj > 0. In principle, this function is unknown, but we can expand it in a Taylor series [43] around rI = rE = 0:

τijw˙ijc00+c10ri+c11rj+c20ri2+c21rirj+c22rj2+c30ri3+c31ri2rj+c32rirj2+c33rj3+O(r4), (11)

where each coefficient depends on the connection strength cmn = cmn(wij). The values of these coefficients determine the plasticity rule. For instance, Hebbian plasticity rules that are linear in the neural activities can be obtained by setting second or higher order coefficients to zero [43]. Keeping higher order coefficients leads to rules with non-linearities.

We assume that the plasticity rule in wEE(t) during the wake phase is linear, obtained by setting c21 = c and all other coefficients to zero, while the plasticity rule in wIE is non linear on the presynaptic neural activity, obtained by setting c21 = −cr0, c32 = c and the other coefficients to zero (Eq (9)). To ensure that synapses remain excitatory or inhibitory throughout the system’s dynamics at any time, the plasticity rules are threshold-rectified at zero if the synaptic weights are zero:

{w˙EE(t)=[w˙EE(t)]+ifwEE(t)=0w˙IE(t)=[w˙IE(t)]+ifwIE(t)=0. (12)

Finally, we note that the dynamics of the plasticity rules are much slower than the dynamics of neural populations, so that τEE, τIE >>τ. The parameters for the two-population model used for simulations are shown in Table A in S1 Text, but the following stability analysis is performed without any assumption on the parameter values. Also note that the plasticity rules produce changes in the weights wEE and wIE that are proportional to neural activities, rE and rI. These changes are scaled by the constants τEE and τIE, which are constants with units in seconds, but do not define an exponential decay as for example the time constant τ. Therefore, the constant c is introduced and tuned experimentally such that the values of τEE and τIE define the timescale of the simulations.

4.5.2 Stability of the two-population model

Fast-timescale limit In the fast-timescale limit, we can assume that τEE, τIE → ∞, meaning that synaptic plasticity is sufficiently slow compared to the dynamics of the neural populations so that it can be assumed to be constant. This allows us to study the dynamics of the model at the timescale of τ (milliseconds range). In that case, we can treat the synaptic weight wEE as a free parameter with a fixed value, assuming that wIE has already evolved through its plasticity rule to its equilibrium value, rEr0. Therefore, for a given value of wEE, we set the value of wEI such that the fixed point for the wedge neurons is r0. In this way, the value of wIE is coupled to the value of wEE. The stability of the 2-dimensional system given by equations in (7) is then analyzed with respect to the value of wEE. Since the system is piecewise linear due to the threshold function [⋅]+, we perform a linear analysis assuming that the inputs to the neurons are positive. Under these conditions, the fixed point of the system, (rE*,rI*), is given by the following expressions:

{rE*=wEErE*-wEIrI*+θ=r0rI*=wIEr0. (13)

Since we force the fixed point of wedge neurons to be r0, we can extract the equilibrium value of wIE as a function of wEE:

wIE=θwEIr0+wEE-1wEI. (14)

The fixed point of the system can be described with respect to wEE as:

{rE*=r0rI*=θwEI+r0wEE-1wEI (15)

Both the fixed point of ring neuron activity, rI*, and the equilibrium value of the connectivity, wIE, depend linearly on wEE, implying that if wEE increases, both wIE and rI* increase as well as long as the fixed point is stable. We analyze the stability of the system by calculating the eigenvalues:

λ±=12τ((wEE-2)±(wEE-2)2-4θr0). (16)

Both eigenvalues are shown in S2(A) Fig with respect to different values of wEE. This leads to four different cases:

{(1)wEE[1,2-2θ/r0](2)wEE(2-2θ/r0,2](3)wEE(2,2+2θ/r0](4)wEE>2+2θ/r0 (17)

In case (1), both eigenvalues are real and negative: the fixed point is stable (Eq (15)). In case (2), the real part of the eigenvalues is negative and the imaginary part is non-zero: the system evolves towards the fixed point with damped oscillations. In case (3), the real part of the eigenvalues is positive and the imaginary part is non-zero: the system diverges towards infinity, oscillating with amplitudes which increase exponentially. In case (4), the eigenvalues are real and positive: the fixed point is unstable. This analysis predicts a bifurcation in the stability of the fixed point when wEE = 2. This behavior is shown in Fig 3C.

The non-linearity of the linear threshold function changes the behavior of the model slightly. While the behavior stays the same for the cases (1), (2) and (4), because the model is mostly in the linear regime, case (3) differs and the non-linearity produces stable cycles around the fixed point. This behavior is found empirically from simulating the non-linear model, and is summarized in Fig 3B.

Slow-timescale limit In the slow-timescale limit, we consider the fact that the firing rates change sufficiently fast compared with the synaptic weights so that these changes can be considered instantaneous (τ → 0). This allow us to study the dynamics of the model on the timescale of τEE and τIE (minutes to hours range). We therefore analyze the conditions under which the synaptic rules in Eqs (8) and (9) stabilize the model. We again first consider the linear range of the function [⋅]+ where the inputs to the neurons are positive. We approximate the instantaneous value of the firing rates in Eq (7) as follows:

{rE=wEE(t)rE-wEIrI+θrI=wIE(t)rE (18)

This linear system allows extracting the values of rE and rI in terms of the synaptic weights as:

{rE=θ1-wEE+wEIwIErI=wIEθ1-wEE+wEIwIE (19)

We can now compute the vector field for wedge and ring neuron activity as a consequence of the slow dynamics of synaptic plasticity:

{rE˙=rEwEEw˙EE+rEwIEw˙IErI˙=rIwEEw˙EE+rIwIEw˙IE (20)

4.5.3 Two-population dynamics during wakefulness

Considering the plasticity rules during the wake phase (8), Eq (20) leads to the following system of differential equations:

{rE˙=c(wEIrIτEE-τIE)τEEτIErE3θ(-rE+(1+τIEwEIrIτEE-τIE)r0)rI˙=rI3rEθ(cτEE+c(1-wEE)τIE(rE-r0)) (21)

The second equation gives the dynamics of ring neurons, which increase activity with c/τEE. The first equation gives the dynamics of the population of wedge neurons approaching a setpoint only when the effective decay time constant (the first factor in the right hand side) is positive, otherwise the equation diverges to infinity and the system is unstable. This gives the following criterion for τEE and τIE:

τEEτIE>1wEIrI (22)

This relationship supports the idea that plasticity in wIE has to be fast enough with respect to the LTP in wEE; otherwise, if wEE increases faster than wIE, the model diverges. Let us compute the upper limit of inequality (22), which corresponds to the minimum of rI. For that, we approximate the firing rate of wedge neurons by rE = r0, and rI = wIE r0. Then, we can write wIE as a function of wEE as in Eq (14). The upper limit of inequality (22) will therefore happen at the minimum of wEE. As the minimum is wEE = 1, the upper limit of the stability condition is:

τEEτIE>1θ. (23)

When this condition holds, the setpoint of wedge neurons in Eq (21), which is not r0 as approximated previously, is given by

rE*=(1+1wEIrIτEEτIE-1)r0, (24)

which is generally different from r0 due to the inertia of the dynamics of wEE. In the limit τEE → ∞ (no plasticity in wEE), the fixed point is r0, as expected from the fast-timescale analysis.

S2(B) Fig shows the vector field for the system of Eq (21). The green line shows the trajectory of the setpoint in wedge neurons as the activity of ring neurons increase. As rI increases due to increasing wEE, the setpoint in rE approaches r0.

During wakefulness, the fixed point for wedge neurons rE* remains mostly constant, and the fixed point for ring neurons rI* changes with wEE (Fig 3B). If wEE ≤ 2 (light green region), the fixed point (rE*,rI*) is stable, and both neural populations evolve towards these values. With increasing wEE, the fixed point of ring neurons rI* also increases while the fixed point of wedge neurons rE* remains constant. If wEE increases further to 2<wEE2(1+θ/r0), the model enters a regime of stable oscillations (light orange region of Fig 3B). In this regime, both neural populations oscillate around the fixed point with a frequency that changes with wEE (see S2(A) Fig), as explained in the fast-timescale limit. In addition, ring neurons increase their amplitude of oscillations as wEE increases. Finally, when wEE2(1+θ/r0) (light red region), the fixed point is unstable and the activity of both populations diverges.

Fig 3C illustrates the dynamics of the full system, i.e. the activity of wedge and ring neurons, rE(t) and rI(t), as well as synaptic weights, wEE(t) and wIE(t). In the beginning (light green region), the fixed point of ring and wedge neurons is stable because wEE < 2. When this boundary is crossed, the system enters the regime of stable oscillations (light orange region). Also, in the stable region of the simulation in Fig 3C, wEE, wIE and ring neuron activity rI increase, while the activity of wedge neurons rE remains constant as imposed by conditions (i)-(iii). wEE, wIE and rI constitute therefore a measure of how far the network has moved from its initial state.

4.5.4 Two-population model dynamics during sleep

In order to reset the system back to its stable state (wEE < 2) after prolonged activity (wakefulness), we introduce a sleep phase with inverted plasticity [57]. For this, we assume that during sleep the recurrent connection between wedge neurons, wEE, gets weaker through LTD [4, 7], while the plasticity rule for wIE is the same as in the wake phase (Eq (9)).

We can perform the same analysis during sleep as in the wake phase by considering the plasticity rule in Eq (9) during sleep, so that the Eq (20) lead to the following system of differential equations:

{rE˙=c(wEIrIτEE+τIE)τEEτIErE3θ(-rE+(1-τIEwEIrIτEE+τIE)r0)rI˙=rI3rEθ(-cτEE+c(1-wEE)τIE(rE-r0)). (25)

The second equation shows how ring neurons decrease their activity with c/τEE, at the same rate as in the wake phase. The first equation shows a fixed point for wedge neurons that is lower than r0, due to the inertia of a decreasing wEE during sleep, given by:

rE*=(1-1wEIrIτEEτIE+1)r0. (26)

S2(C) Fig shows the vector field given by Eq (25) during the sleep phase, where the trajectory of the setpoint of wedge neurons (the green line) diverges from r0 as the activity of ring neurons decreases.

The impact of LTD on the model during sleep can be understood by inspecting Fig 3B: with decreasing value of wEE, the fixed points become stable (light green) and the activity of ring neurons decreases (as shown in the fast-timescale limit). The switch between the wake and sleep phases is performed by dFB neurons that sense activity of R5 neurons [19]. Since R5 and dFB are not anatomically but functionally connected [19], we apply a low-pass filter to the activities of R5 neurons, which act as an input to dFB neurons and remove possible oscillations. We refer to this filtered activity as the switching signal, and it is modeled, together with dFB neurons as follows:

{τfr˙I(f)(t)=-rI(f)(t)+rI(t)τrdFB˙(t)=-rdFB(t)+[G(rI(f)(t))-d(t)]+ (27)

where τf is the time constant of the low-pass filter rI(f) and rdFB(t) is the activity of dFB neurons with a switching behavior modeled by Eq (2). The variable d(t) is a variable intended to produce sleep deprivation.

Fig 3D shows a simulation of the model combining subsequent wake (white regions), where dFB neurons are inactive, and sleep phases (grey), where dFB are active. During wakefulness, wEE and wIE undergo LTP and the activity of R5 neurons increases (light red line in second row in Fig 3D) and rE is constant. When the switching signal (dark red line in second row) crosses an upper threshold, rI(max), dFB neurons switch the model to sleep. During sleep, wEE undergoes LTD due to the switch in plasticity, while the activity of R5 neurons decreases. wIE also undergoes LTD (note that the plasticity rule does not change) since it follows the trend of wEE to impose the set-point r0 to the wedge neurons.

Therefore, sleep resets synaptic plasticity and activity of R5 neurons. Once the switching signal reaches a lower threshold, rI(min), the model is switched back to the wake phase. In the third wake phase, we simulated sleep deprivation by setting d(t) = 1 (top orange region). Here, wEE crosses the bifurcation boundary, wEE > 2, and the model enters the domain of stable oscillations.

During the following sleep phase, the system needs more time to fully reset and reach the lower threshold. Such sleep rebound after sleep deprivation is an experimentally described feature of sleep homeostasis circuits [17, 18].

The time that the system spends in the sleep and wake phases is determined by the time constants of the plasticity rules, τEE and τIE, and the upper and lower thresholds of the switching signal, rI(min) and rI(max). In our simulations, we set τEE and τIE to yield dynamics on the timescale of seconds (for ease of visualization), but larger values lead to similar behavior on longer timescales (minutes or hours, see S8 Fig).

4.6 Ring attractor network with plasticity

We expand the two-population model to a ring attractor network. A total of N = 32 individual wedge neurons are modeled by rE(i)(t). For simplicity, ring neurons are modeled as a population, rI(t). The model is schematically shown in Fig 2D. The dynamics of the ring attractor network are given by the following equations:

{τr˙E(i)(t)=-rE(i)(t)+[jNwEE(ij)(t)rE(j)(t)-wEIrI(t)+θ+I(i)(m)]+fori=1,,Nτr˙I(t)=-rI(t)+[jNwIE(j)(t)rE(j)(t)]+. (28)

The synaptic plasticity rules are also extended from the two-population model during the wake phase:

{τEEw˙EE(ij)(t)=crE(i)(t)rE(j)(t)fori,j=1,,NτIEw˙IE(i)(t)=crI(t)rE(i)(t)(rE(i)(t)-r0)fori=1,,N, (29)

and during the sleep phase:

{τEEw˙EE(ij)(t)=-crE(i)(t)rE(j)(t)fori,j=1,,NτIEw˙IE(i)(t)=crI(t)rE(i)(t)(rE(i)(t)-r0)fori=1,,N. (30)

We initialize the synaptic weights wEE(ij) with a Gaussian function with amplitude wEE(max) and standard deviation σ:

wEE(ij)=wEE(max)exp(-(min[|i-j|,N-|i-j|])22σ2). (31)

Additionally we provide a Gaussian input to the ring attractor around a given wedge neuron m with amplitude Imax and standard deviation Iσ:

I(i)(m,t)=Imax[exp(-(min[|i-m(t)|,N-|i-m(t)|])22Iσ2)-rdFB(t)]. (32)

This input allows changing the position of the bump in the simulations, and can represent visual or idiothetic input to update the head direction of the animal.

We use the low-pass filtered activity of ring neurons to switch between sleep and wake phases, as in Eq (27). The values of the parameters in Table B in S1 Text are used in all simulations unless stated otherwise.

Synaptic plasticity in ring and wedge neurons has been discussed in several studies [19, 30, 31, 73, 74]. Note that we here focus on plasticity in the connections from wedge to ring neurons, while leaving the connectivity in the opposite direction constant. This is in contrast with [73, 74], where plasticity from ring to wedge neurons is assumed, while the other direction is left constant. This choice is motivated by the increasing activity in R5 neurons during the wake phase [19], which could be explained by the growth of dendritic synaptic sites (pre-synaptic plasticity), for instance from wedge to R5 neurons—consistent with the data and interpretation in [19] –, but not by the growth of axonal synaptic sites (post-synaptic plasticity).

4.7 Ring attractor network: Bump stability analysis

To analyze the stability of the ring attractor model, we use an approach similar to the one in the fast-timescales analysis of the two-population model. First, we assume no plasticity in the recurrent connections wEE(ij) but only in wIE(ij),

{τEEw˙EE(ij)(t)=0τIEw˙IE(i)(t)=crI(t)rE(i)(t)(rE(i)(t)-r0)fori=1,,N. (33)

We analyze the stability and behavior of the network while gradually changing the values wEE(ij). We initialize the ring attractor network with a bump profile, where neuron number 16 has maximum activity rE(16)>rE(j),j16. Given that only the connections wIE(i) are plastic, the activity of ring neurons converges to a stable value given by

rIwIE(16)r0. (34)

This can be understood by looking at the plasticity rule for wIE(i) (33). First, all the synaptic weights evolve so that wedge neuron 16 approaches the activity r0. As all wedge neurons receive the same global inhibition, and wedge neuron 16 has maximum activity, the activity of the other wedge neurons is lower than r0. At this point, the weights wIE(k) for wedge neurons k ≠ 16 with non-zero activity, decrease over time until reaching zero. On the other hand, if a wedge neuron k ≠ 16 has zero activity, it does not provide any input to the ring neurons. As for wedge neuron 16, the synaptic plasticity rule changes the value of wIE(16) such that its activity approaches r0. An example of this behavior can be seen in S4(A) Fig, where we initialize the system with an input such that the peak of the bump is at wedge neuron 16. The synaptic weights wIE(k) for wedge neurons k ≠ 16 which have non-zero activity evolve towards zero.

The value of wIE(16) is determined by the bump profile, because rE(16) is receiving input from any wedge neuron with non-zero activity. Thus wIE(16) has to balance the total excitation to set the activity of the wedge neuron 16 to r0. Furthermore, the bump profile is determined by the parameters of the recurrent connectivity profile wEE(ij), i.e. wEE(max) and σ (Eq (31)). If we fix the amplitude wEE(max) and increase the standard deviation σ, the width of the bump, that is the number of active wedge neurons, decreases. This is because more wedge neurons are providing input to wedge neuron 16 as σ increases, and the value of wIE(16) increases to set rE(16)=r0, which in turn provides more inhibition through ring neurons to all the wedge neurons and lowers their activities, reducing at the same time the bump width. This behavior is seen in S4(A) and S4(B) Fig.

The bump also shows oscillatory behavior (S4(C) Fig) depending on the value of σ. In general, the state of the ring attractor network and its stability can be described in terms of the recurrent connectivity distribution, wEE(ij), consistent with the fast-timescale limit analysis in the two-population model.

To investigate how the behavior and stability of the ring attractor network depend on the recurrent connections wEE(ij), we simulated the ring attractor model for a grid of values for the parameters wEE(max) and σ:

{wEE(max)[0.1,0.6)withstep0.005σ[1,6)withstep0.05. (35)

In total, we performed 10000 simulations where we initialize the bump peak in wedge neuron 16 with a predefined input of 0.5 seconds, and let the network evolve for 10 seconds. We then analyzed the stability and behavior of the system in the last second of each simulation, therefore assuming that the state of the network does not change. S4 Fig shows an example of 3 simulations with different σ values; the light orange band across all simulations highlights the region used for analysis.

In this region we computed for each simulation the following:

  • Oscillation frequency: the frequency at which wedge neuron 16 oscillates. For this, we computed the Discrete Fourier Transform, and the resulting peak value corresponds to the oscillation frequency.

  • Mean bump FWHM: the mean value over time of the full width at half maximum of the bump, a proxy for the width of the bump.

  • Maximum bump peak: the maximum firing rate of wedge neuron 16 over time.

  • Mean bump peak: the mean firing rate over time of wedge neuron 16. If the bump does not oscillate, this value is equivalent to the maximum bump peak value.

  • Mean ring neuron activity: the mean of ring neuron activity over time.

These measures are displayed in S5(B)–S5(F) Fig, as a function of the recurrent connectivity parameters wEE(max) and σ. S5(B) Fig shows how the network starts oscillating with increasing wEE(max) and σ. On the other hand, the FWHM in S5(C) Fig shows how at low wEE(max) and σ values, the bump disappears and all wedge neurons have constant activity at r0. As the parameter values increase, a bump of activity appears and the FWHM decreases, as observed in Fig 4C and S4(A) and S4(B) Fig. Finally, the activity of ring neurons increases as wEE(max) and σ increase.

We further characterise the behavior and stability of the bump in the network with the total excitatory connectivity to the wedge neuron with maximal activity, i.e. wedge neuron 16, wEE(16,sum):

wEE(16,sum)=jNwEE(16,j). (36)

S5(A) Fig highlights the isolines where wEE(16,sum) is constant for different values of wEE(max) and σ. Note how the constant values of wEE(16,sum)=2 and wEE(16,sum)=2(1+θ/r0) coincide with the boundaries of the different dynamic regimes. Therefore, the quantity wEE(16,sum) has in the ring attractor model a similar role as does the recurrent connection wEE in the two-population model. For wEE(16,sum)<1, the bump disappears, similar to the two-population network model when wEE < 1. However, unlike in the two-population model, which is unstable for wEE>2(1+θ/r0), in the ring attractor network, for wEE(16,sum)>2(1+θ/r0) the wedge neurons are strongly inhibited by high activity in ring neurons.

From the above analysis, we extracted regions of stability that are shown in Fig 4B. Constant lines of wEE(16,sum) are computed as follows: in the continuous limit, i.e. N → ∞, the total excitatory connectivity is given by the following integral:

wEE(16,sum)=wEE(max)ex22σ2dx=wEE(max)σ2π. (37)

Therefore, the isolines of constant wEE(16,sum) are given by wEE(max)=wEE(16,sum)/σ2π. For the discrete case, we empirically found wEE(16,sum) to be well approximated by:

wEE(max)=wEE(16,sum)Kσ, (38)

for any constant line wEE(16,sum), where K ≈ 2.697.

4.8 Ring attractor network: Autonomous bump path analysis

To simulate how the bump in the ring attractor changes position to update the head direction during the wake phase, we use a simple clockwise or counter-clockwise rotating input with frequency f defined by:

m(t)=±fNt. (39)

m(t) is the wedge neuron where the ring attractor receives the Gaussian input I(i)(m(t)) (Eq (32)), and it is a cyclic variable, so that:

{ifm(t)=N+1m(t)=1ifm(t)=0m(t)=N. (40)

During the sleep phase, the bump in the ring attractor shows autonomous dynamics (Fig 5A). To investigate the relationship between the path of the bump during sleep and in the preceding wake phase, we use a sinusoidal input during the wake phase, defined by the amplitude A, frequency f, and the center C:

m(t)=C+Asin(2πft). (41)

An example of this input with different frequencies f and centers C is shown in Fig 6A. We can obtain the position of the bump during wake and sleep phases as:

Pbump(t)=argmaxi[rE(i)(t)], (42)

so that the position of the bump corresponds to the wedge neuron with maximum activity. We can now compute the distribution of times that the bump is localized around each wedge neuron i during sleep and wake phases, respectively, as:

{twake(i)=wakeδ(Pbump(t)-i)dttsleep(i)=sleepδ(Pbump(t)-i)dt, (43)

where δ(⋅) is the Dirac delta function and integrals extend over the wake and sleep phases. Fig 6B shows these distributions normalized for the three wake phases in Fig 6A and their following sleep phases. The distributions are very similar, meaning that during the sleep phase, the bump revisits the same wedge neurons that were active during the wake phase.

We further asked how the autonomous bump path changes during sleep with respect to the amplitude of the sine-shaped input, A, and frequency, f, during sleep. We first fixed the frequency of the input at f = 1Hz and the center at C = 16 while varying the amplitude in the range of [0, 15] with an increment of 1. This resulted in 15 simulations where we computed the standard deviation of the bump path during sleep and wake:

{STDwake=1Twakewake(Pbump(t)-16)2dtSTDsleep=1Tsleepsleep(Pbump(t)-16)2dt, (44)

where Twake and Tsleep are the duration of wake and sleep phases, respectively. Fig 6C shows the standard deviation in both phases with respect to the amplitude A. Note the similarity between both phases.

Secondly, we fixed the value of the amplitude at A = 8 and the center at C = 16 while varying the frequency, f, in the range [0.1, 1.5] at increments of 0.1Hz, resulting in 15 simulations. We quantify the number of cycles during both the sleep and wake phase. During the wake phase, the number of cycles is proportional to the input frequency f. During sleep, however, Fig 6C, bottom, shows that the number of cycles of the autonomously rotating bump does not change as the input frequency increases. An example of this can be seen in Fig 6A, where we increase the frequency in consecutive wake phases and the path of the bump during sleep does not increase its rotation frequency.

4.9 Ring attractor network: Bump drift during wake phase

In the simulations and analyses above, we provided input during the wake phase and the ring attractor network closely followed the input with a bump of activity. However, a ring attractor network should be able to sustain the bump of activity in the absence of input. It is known that small changes in the synaptic connections of wedge neurons wEE(ij) can cause drifts of the bump in the absence of input [5052].

To test for drift during the wake phase, we used a flashing rotating input that turns on and off. The input around a wedge neuron m is on for 0.2 sec (Eq (32)), and then is turned off for 0.3 sec. Therefore, for N neurons, the rotating input frequency is 1/(0.5N). S8(A) Fig shows such a simulation with three wake and sleep phases and S8(B)–S8(D) Fig show blow-ups around different times. Note how the bump drifts from the provided visual input, due to the synaptic changes in wEE(ij).

This drift depends on the plasticity time constants. For instance, S9 Fig shows a simulation with 100 times larger time constants, τEE = τIE = 5000 seconds. The duration of wake and sleep phases are now on the order of hours, compared to the simulation in S9 Fig. Note in the blow-ups of S9(B)–S9(D) Fig that the bump of activity is sustained during the off time of the visual input without drifting. Since there are many more rotations during the wake phase and the synaptic changes in wEE(ij) are very small in each rotation, the weights increase all together very homogeneously.

Supporting information

S1 Fig. Connectivity between the navigation-related populations (EPG and EL) and sleep-related populations (R5 and ExR1).

A: On the left, neural projections of EPG and EL, referred as wedge neurons (green). On the right, neural projections of R5 (red) and ExR1 (blue). B: Recurrent connectivity between wedge neurons. The matrix in each figure represents the number of synaptic sites between presynaptic neurons (horizontal axis) and postsynaptic neurons (vertical axis) [14]. C: Connectivity between wedge neurons and R5 neurons in both directions. D: Connectivity between wedge neurons and ExR1 neurons in both directions. Data and neurons are reproduced from [14].

(TIF)

S2 Fig. Analysis of the two-population model in the fast and slow-timescale limits.

A: Eigenvalues in the two-population model in the fast-timescales limit. The real (in blue) and imaginary (in orange) parts of the eigenvalues are plotted as a function of wEE. B: Vector field of wedge and ring neurons dependent on synaptic plasticity during the wake phase in the slow-timescale limit. The green line represents the set point trajectory of wedge neurons. C: Vector field of wedge and ring neurons due to plasticity in the sleep phase in the slow-timescale limit. The green line is the trajectory of the set point in wedge neurons.

(TIF)

S3 Fig. Bump profile in the ring attractor network in response to inputs of different amplitudes Imax and standard deviations Iσ.

When input (first row) is provided to the ring attractor the plasticity rule for wIE(i) brings the activity of the wedge neuron rE(16) (where the bump peak is located, second row) back to r0 (third row). The bump is not constrained to have constant activity (third row), but always relaxes towards r0 over time in the absence of changing input. For ease of visualization, we used a slower time constant for the plasticity of wEE(ij) (τEE = 1000000), thus avoiding oscillations in the bump throughout the simulation.

(TIF)

S4 Fig. Ring attractor network with no plasticity in wEE(ij) and different initial distributions of weights.

A: Left: initial wEE(ij) values; right: 10 seconds of simulated dynamics. First row: input positioning the bump around wedge neuron 16. Second row: bump profile over time. Third row: activity of wedge neuron 16 evolving towards r0 due to plasticity in wIE(i). Fourth row: activity of ring neurons. Fifth row: the synaptic weights wIE(i). The orange band at the end of the simulations represents the period in which the stability of the bump is analyzed. B: Same as A but with larger σ. C: Same as A, B but again increasing σ. In this simulation, the bump shows stable oscillations.

(TIF)

S5 Fig. Stability analysis of the bump in the ring attractor network.

All subfigures are plots of different measures as a function of σ and wEE(max), which parameterize the initial synaptic weights wEE(ij) (Methods (4.7)). All variables in B, C, D, E, and F are calculated in a time window of 1 sec at the end of each simulation (orange area in Fig 3). A: Isolines of wEE(16,sum). These isolines are overlaid in white in the other subfigures and represent approximate boundaries of stability. B: Frequency of the oscillations in the bump across the analysis time window. Above the isoline wEE(16,sum)=2, the bump oscillates. C: Mean FWHM over the analysis time window. Below the isoline wEE(16,sum)=1 and above the isoline wEE(16,sum)=2(1+θ/r0), there is no bump because the FWHM is equal to the number of neurons, N. D: Maximum peak of the bump in the analysis time window (maximum activity of wedge neuron 16, max(rE(16)(t))). Below the isoline wEE(16,sum)=2, the maximum is r0 as forced by the plasticity rule in wIE(i). Between the isolines wEE(16,sum)=2 and wEE(16,sum)=2(1+θ/r0), the bump oscillates and the amplitude is given by the maximum, in this case 2r0. Above wEE(16,sum)=2(1+θ/r0), there is close-to-zero activity in wedge neurons, since the maximum is near zero. E: Mean of the bump peak over the analysis time window (mean activity of the wedge neuron 16, <rE(16)(t)>). In case of no oscillations, this value should be equivalent to the maximum bump peak in panel D. During oscillations, the value closely represents the center of oscillations. Note that between isolines wEE(16,sum)=2 and wEE(16,sum)=2(1+θ/r0) this value is lower than r0. F: Mean activity over the analysis time window of ring neurons, <rI(t)>. Below the isoline wEE(16,sum)=2(1+θ/r0), the activity of ring neurons increases. Above the isoline, the activity of ring neurons first decreases and then rapidly increases. We clipped the values of the mean activity above 100 to facilitate visualization, but the increment of activity in this area reached values over 1000.

(TIF)

S6 Fig. Values of the synaptic weights wEE(ij) in the simulation of Fig 4.

From left to right and from top to bottom: each plot shows the values each time there is a switch between wake and sleep phase and vice versa. Top, left: initial values of the weights set by the initial values of wEE(max) and σ in Table B in S1 Text. Top, center left: weights at the end of the first wake phase. Top, center right: after the subsequent sleep phase. Top, right: after the second wake phase. Bottom, left: weights after the second sleep phase. Bottom, center left: after sleep deprivation. Bottom, center right: after sleep rebound. Bottom, right: weights after the third wake phase. Note how the weights after each wake phase are increased (specially after sleep deprivation in the sixth plot) and how the sleep phase resets the weights to close to the initial conditions.

(TIF)

S7 Fig. Simulation of the ring attractor network with flashing input during the wake phase with slow plasticity time constants (details in Methods(4.9)).

The time constants τEE and τIE in this simulation are 210 times larger than in Table B in S1 Text. We decreased the time resolution of the simulation (time step is 0.001 seconds) and decreased the value rI(max) to 30. A: Full simulation with three wake phases and three sleep phases. We used the same input rotation as in Fig 5 (rotating input at 0.5Hz). B: Blow-up around 70 minutes in the first wake phase of the simulation. C: Blow-up around 220 seconds in the second wake phase. D: Blow-up around 410 seconds in the third wake phase. Note that the duration of sleep and wake phases are now on the order of hours due to the increased time constants in the plasticity rules.

(TIF)

S8 Fig. Simulation of the ring attractor network with flashing input during the wake phase (details in Methods(4.9)).

A: Simulation with three wake phases and three sleep phases. A flashing input that turns on and off is provided during the wake phase. During the off period, the ring attractor sustains a bump of activity that drifts due to changes in the synaptic weights wEE(ij). B: Blow-up around 15 seconds in the first wake phase of the simulation. C: Blow-up around 50 seconds in the second wake phase. D: Blow-up around 110 seconds in the third wake phase.

(TIF)

S9 Fig. Simulation of the ring attractor network with flashing input during the wake phase with slow plasticity time constants (details in Methods(4.9)).

The time constants in this simulation are 100 times larger than in the previous ring attractor simulations. A: Full simulation with three wake phases and three sleep phases. We used the same input rotation frequency as in S6 Fig. As in S6 Fig, we provide a flashing input that turns on and off during the wake phase. B: Blow-up around 2000 seconds in the first wake phase of the simulation. C: Blow-up around 4480 seconds in the second wake phase. D: Blow-up around 7040 seconds in the third wake phase. Note how the duration of sleep and wake phases are now on the order of hours due to the increased time constants in the plasticity rules. Note also how the bump of activity is sustained in place without drifting after the input switches off.

(TIF)

S10 Fig. Simulation of ring attractor combined with sleep homeostasis model, using an exponentially decaying plasticity rule during sleep (see S1 Text).

A: Entire simulation over a period of 800 seconds. White and grey regions indicate the sleep and wake phases, and correspond to dFB neurons switching off and on, respectively. Top row: input (inhibited during the sleep phase), alternating between clockwise and counter-clockwise rotations at 0.5Hz. Second row: ring attractor bump activity. Third row: activity of wedge neuron 16. Fourth row, light red: activity of R5 neurons. Dark red: filtered activity. Switching between sleep and wake is carried out by dFB neurons that switch on and off depending on filtered activity crossing thresholds rI(min) and rI(max). In the third wake epoch, sleep deprivation is produced by extending the inhibition of dFB neurons (d(t) = 1 during the orange top layout). Fifth row: diagonal elements of the connectivity matrix wEE(ij). The white line is the sum of all excitatory connections to wedge neuron 16. It passes threshold 2 at around 240 seconds leading to oscillations. The full connectivity matrix wEE(ij) at the switch times is shown in S6 Fig. Sixth row: connectivity wIE(i); black line is the mean value. B: Blow-up around 256 seconds: switch from wake to sleep phase. C: Blow-up around 474 seconds: extended wake phase leads to oscillatory behavior. Circuit switches to sleep. C Blow-up around 610 seconds: switch from sleep to wake phase.

(TIF)

S1 Text. Parameter values for simulations and additional weight resetting model.

Table A shows parameter values used in the two-population model, Table B shows parameter values used in the ring attractor network and a model for ring attractor network resetting of weights during sleep without autonomous activity is presented.

(PDF)

Acknowledgments

We would like to thank Raoul-Martin Memmesheimer for helpful discussions and comments on the manuscript, and Gerry Rubin, Julijana Gjorgjieva, Felipe Kalle Kossio, and Marina Elaine Wosniack for helpful discussions.

Data Availability

Code and simulation are available at https://gitlab.com/anflorescaesar/integration_of_sleep_pressure_and_navigation_simulations.

Funding Statement

AFV and JDS were supported by the Max Planck Society and the Center of Advanced European Studies and Research (caesar). PJG was supported by the German Research Foundation (DFG) through SFB 1089 ‘Synaptic Microcircuits’ The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

References

  • 1. Killgore WD. Effects of sleep deprivation on cognition. In: Progress in brain research. vol. 185. Elsevier; 2010. p. 105–129. [DOI] [PubMed] [Google Scholar]
  • 2. Krause AJ, Simon EB, Mander BA, Greer SM, Saletin JM, Goldstein-Piekarski AN, et al. The sleep-deprived human brain. Nature Reviews Neuroscience. 2017;18(7):404. doi: 10.1038/nrn.2017.55 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3. Tobaldini E, Costantino G, Solbiati M, Cogliati C, Kara T, Nobili L, et al. Sleep, sleep deprivation, autonomic nervous system and cardiovascular diseases. Neuroscience & Biobehavioral Reviews. 2017;74:321–329. doi: 10.1016/j.neubiorev.2016.07.004 [DOI] [PubMed] [Google Scholar]
  • 4. Rennó-Costa C, da Silva ACC, Blanco W, Ribeiro S. Computational models of memory consolidation and long-term synaptic plasticity during sleep. Neurobiology of learning and memory. 2019;160:32–47. doi: 10.1016/j.nlm.2018.10.003 [DOI] [PubMed] [Google Scholar]
  • 5. Crick F, Mitchison v. The function of dream sleep. Nature. 1983;304(5922):111–114. doi: 10.1038/304111a0 [DOI] [PubMed] [Google Scholar]
  • 6. Hopfield JJ, Feinstein D, Palmer R. ‘Unlearning’has a stabilizing effect in collective memories. Nature. 1983;304(5922):158–159. doi: 10.1038/304158a0 [DOI] [PubMed] [Google Scholar]
  • 7.Thiele J, Diehl P, Cook M. A wake-sleep algorithm for recurrent, spiking neural networks. arXiv preprint arXiv:170306290. 2017.
  • 8. Tononi G, Cirelli C. Sleep and the price of plasticity: from synaptic and cellular homeostasis to memory consolidation and integration. Neuron. 2014;81(1):12–34. doi: 10.1016/j.neuron.2013.12.025 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. Cirelli C, Tononi G. Linking the need to sleep with synaptic function. Science. 2019;366(6462):189–190. doi: 10.1126/science.aay5304 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10. Liu D, Dan Y. A motor theory of sleep-wake control: arousal-action circuit. Annual review of neuroscience. 2019. doi: 10.1146/annurev-neuro-080317-061813 [DOI] [PubMed] [Google Scholar]
  • 11. Kirszenblat L, van Swinderen B. Sleep in Drosophila. In: Handbook of Behavioral Neuroscience. vol. 30. Elsevier; 2019. p. 333–347. [Google Scholar]
  • 12. Jenett A, Rubin GM, Ngo TT, Shepherd D, Murphy C, Dionne H, et al. A GAL4-driver line resource for Drosophila neurobiology. Cell reports. 2012;2(4):991–1001. doi: 10.1016/j.celrep.2012.09.011 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13. Simpson JH, Looger LL. Functional imaging and optogenetics in Drosophila. Genetics. 2018;208(4):1291–1309. doi: 10.1534/genetics.117.300228 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Xu CS, Januszewski M, Lu Z, Takemura Sy, Hayworth K, Huang G, et al. A connectome of the adult drosophila central brain. BioRxiv. 2020. doi: 10.7554/eLife.57443 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15. Beckwith EJ, French AS. Sleep in Drosophila and its context. Frontiers in physiology. 2019;10:1167. doi: 10.3389/fphys.2019.01167 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16. Dubowy C, Sehgal A. Circadian rhythms and sleep in Drosophila melanogaster. Genetics. 2017;205(4):1373–1397. doi: 10.1534/genetics.115.185157 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. Donlea JM, Alam MN, Szymusiak R. Neuronal substrates of sleep homeostasis; lessons from flies, rats and mice. Current opinion in neurobiology. 2017;44:228–235. doi: 10.1016/j.conb.2017.05.003 [DOI] [PubMed] [Google Scholar]
  • 18. Donlea JM, Pimentel D, Talbot CB, Kempf A, Omoto JJ, Hartenstein V, et al. Recurrent circuitry for balancing sleep need and sleep. Neuron. 2018;97(2):378–389. doi: 10.1016/j.neuron.2017.12.016 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19. Liu S, Liu Q, Tabuchi M, Wu MN. Sleep drive is encoded by neural plastic changes in a dedicated circuit. Cell. 2016;165(6):1347–1360. doi: 10.1016/j.cell.2016.04.013 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Donlea JM, Pimentel D, Miesenböck G. Neuronal machinery of sleep homeostasis in Drosophila. Neuron. 2014;81(4):860–872. doi: 10.1016/j.neuron.2013.12.013 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21. Omoto JJ, Nguyen BCM, Kandimalla P, Lovick JK, Donlea JM, Hartenstein V. Neuronal constituents and putative interactions within the Drosophila ellipsoid body neuropil. Frontiers in neural circuits. 2018;12:103. doi: 10.3389/fncir.2018.00103 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22. Ofstad TA, Zuker CS, Reiser MB. Visual place learning in Drosophila melanogaster. Nature. 2011;474(7350):204–207. doi: 10.1038/nature10131 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Seelig JD, Jayaraman V. Feature detection and orientation tuning in the Drosophila central complex. Nature. 2013;503(7475):262. doi: 10.1038/nature12601 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24. Okubo TS, Patella P, D’Alessandro I, Wilson RI. A neural network for wind-guided compass navigation. Neuron. 2020;107(5):924–940. doi: 10.1016/j.neuron.2020.06.022 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25. Seelig JD, Jayaraman V. Neural dynamics for landmark orientation and angular path integration. Nature. 2015;521(7551):186. doi: 10.1038/nature14446 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Skaggs WE, Knierim JJ, Kudrimoti HS, McNaughton BL. A model of the neural basis of the rat’s sense of direction. In: Advances in neural information processing systems; 1995. p. 173–180. [PubMed]
  • 27. Cope AJ, Sabo C, Vasilaki E, Barron AB, Marshall JA. A computational model of the integration of landmarks and motion in the insect central complex. PloS one. 2017;12(2). doi: 10.1371/journal.pone.0172325 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28. Stone T, Webb B, Adden A, Weddig NB, Honkanen A, Templin R, et al. An anatomically constrained model for path integration in the bee brain. Current Biology. 2017;27(20):3069–3085. doi: 10.1016/j.cub.2017.08.052 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Su TS, Lee WJ, Huang YC, Wang CT, Lo CC. Coupled symmetric and asymmetric circuits underlying spatial orientation in fruit flies. Nature communications. 2017;8(1):1–15. doi: 10.1038/s41467-017-00191-6 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30. Raccuglia D, Huang S, Ender A, Heim MM, Laber D, Suárez-Grimalt R, et al. Network-specific synchronization of electrical slow-wave oscillations regulates sleep drive in Drosophila. Current Biology. 2019;29(21):3611–3621. doi: 10.1016/j.cub.2019.08.070 [DOI] [PubMed] [Google Scholar]
  • 31. Huang S, Piao C, Beuschel CB, Götz T, Sigrist SJ. Presynaptic Active Zone Plasticity Encodes Sleep Need in Drosophila. Current Biology. 2020. doi: 10.1016/j.cub.2020.01.019 [DOI] [PubMed] [Google Scholar]
  • 32. Borbély AA. A two process model of sleep regulation. Hum neurobiol. 1982;1(3):195–204. [PubMed] [Google Scholar]
  • 33. Borbély AA, Daan S, Wirz-Justice A, Deboer T. The two-process model of sleep regulation: a reappraisal. Journal of sleep research. 2016;25(2):131–143. doi: 10.1111/jsr.12371 [DOI] [PubMed] [Google Scholar]
  • 34. Pimentel D, Donlea JM, Talbot CB, Song SM, Thurston AJ, Miesenböck G. Operation of a homeostatic sleep switch. Nature. 2016;536(7616):333. doi: 10.1038/nature19055 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35. Hulse BK, Haberkern H, Franconville R, Turner-Evans DB, Takemura S, Wolff T, et al. A connectome of the Drosophila central complex reveals network motifs suitable for flexible navigation and context-dependent action selection. bioRxiv. 2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36. Franconville R, Beron C, Jayaraman V. Building a functional connectome of the Drosophila central complex. Elife. 2018;7:e37017. doi: 10.7554/eLife.37017 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37. Kim SS, Rouault H, Druckmann S, Jayaraman V. Ring attractor dynamics in the Drosophila central brain. Science. 2017;356(6340):849–853. doi: 10.1126/science.aal4835 [DOI] [PubMed] [Google Scholar]
  • 38. Hulse BK, Jayaraman V. Mechanisms Underlying the Neural Computation of Head Direction. Annual Review of Neuroscience. 2019;43. [DOI] [PubMed] [Google Scholar]
  • 39. Green J, Maimon G. Building a heading signal from anatomically defined neuron types in the Drosophila central complex. Current opinion in neurobiology. 2018;52:156–164. doi: 10.1016/j.conb.2018.06.010 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40. Hanesch U, Fischbach KF, Heisenberg M. Neuronal architecture of the central complex in Drosophila melanogaster. Cell and Tissue Research. 1989;257(2):343–366. doi: 10.1007/BF00261838 [DOI] [Google Scholar]
  • 41. Lin CY, Chuang CC, Hua TE, Chen CC, Dickson BJ, Greenspan RJ, et al. A comprehensive wiring diagram of the protocerebral bridge for visual information processing in the Drosophila brain. Cell reports. 2013;3(5):1739–1753. doi: 10.1016/j.celrep.2013.04.022 [DOI] [PubMed] [Google Scholar]
  • 42. Dayan P, Abbott LF. Theoretical neuroscience: computational and mathematical modeling of neural systems. 2001. [Google Scholar]
  • 43. Gerstner W, Kistler WM. Mathematical formulations of Hebbian learning. Biological cybernetics. 2002;87(5-6):404–415. doi: 10.1007/s00422-002-0353-y [DOI] [PubMed] [Google Scholar]
  • 44. Dana H, Sun Y, Mohar B, Hulse BK, Kerlin AM, Hasseman JP, et al. High-performance calcium sensors for imaging activity in neuronal populations and microcompartments. Nature Methods. 2019;16(7):649–657. doi: 10.1038/s41592-019-0435-6 [DOI] [PubMed] [Google Scholar]
  • 45. Wolff T, Iyer NA, Rubin GM. Neuroarchitecture and neuroanatomy of the Drosophila central complex: A GAL4-based dissection of protocerebral bridge neurons and circuits. Journal of Comparative Neurology. 2015;523(7):997–1037. doi: 10.1002/cne.23705 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46. Faville R, Kottler B, Goodhill G, Shaw P, Van Swinderen B. How deeply does your mutant sleep? Probing arousal to better understand sleep defects in Drosophila. Scientific reports. 2015;5:8454. doi: 10.1038/srep08454 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47. Andretic R, Shaw PJ. Essentials of sleep recordings in Drosophila: moving beyond sleep time. Methods in enzymology. 2005;393:759–772. doi: 10.1016/S0076-6879(05)93040-1 [DOI] [PubMed] [Google Scholar]
  • 48. Peyrache A, Lacroix MM, Petersen PC, Buzsáki G. Internally organized mechanisms of the head direction sense. Nature neuroscience. 2015;18(4):569–575. doi: 10.1038/nn.3968 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49. Neuser K, Triphan T, Mronz M, Poeck B, Strauss R. Analysis of a spatial orientation memory in Drosophila. Nature. 2008;453(7199):1244–1247. doi: 10.1038/nature07003 [DOI] [PubMed] [Google Scholar]
  • 50. Renart A, Song P, Wang XJ. Robust spatial working memory through homeostatic synaptic scaling in heterogeneous cortical networks. Neuron. 2003;38(3):473–485. doi: 10.1016/S0896-6273(03)00255-1 [DOI] [PubMed] [Google Scholar]
  • 51. Itskov V, Hansel D, Tsodyks M. Short-term facilitation may stabilize parametric working memory trace. Frontiers in computational neuroscience. 2011;5:40. doi: 10.3389/fncom.2011.00040 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52. Seeholzer A, Deger M, Gerstner W. Stability of working memory in continuous attractor networks under the control of short-term plasticity. PLoS computational biology. 2019;15(4):e1006928. doi: 10.1371/journal.pcbi.1006928 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53. Turner-Evans DB, Jensen K, Ali S, Paterson T, Sheridan A, Ray RP, et al. The neuroanatomical ultrastructure and function of a biological ring attractor. bioRxiv. 2019; p. 847152. [Google Scholar]
  • 54. Beyaert L, Greggers U, Menzel R. Honeybees consolidate navigation memory during sleep. Journal of Experimental Biology. 2012;215(22):3981–3988. doi: 10.1242/jeb.075499 [DOI] [PubMed] [Google Scholar]
  • 55. Vorster AP, Born J. Sleep and memory in mammals, birds and invertebrates. Neuroscience & Biobehavioral Reviews. 2015;50:103–119. doi: 10.1016/j.neubiorev.2014.09.020 [DOI] [PubMed] [Google Scholar]
  • 56. Nere AT, Hashmi A, Cirelli C, Tononi G. Sleep-dependent synaptic down-selection (I): modeling the benefits of sleep on memory consolidation and integration. Frontiers in neurology. 2013;4:143. doi: 10.3389/fneur.2013.00143 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57. Brzosko Z, Mierau SB, Paulsen O. Neuromodulation of Spike-Timing-Dependent plasticity: past, present, and future. Neuron. 2019;103(4):563–581. doi: 10.1016/j.neuron.2019.05.041 [DOI] [PubMed] [Google Scholar]
  • 58. Pawlak V, Wickens JR, Kirkwood A, Kerr JN. Timing is not everything: neuromodulation opens the STDP gate. Frontiers in synaptic neuroscience. 2010;2:146. doi: 10.3389/fnsyn.2010.00146 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59. Cassenaer S, Laurent G. Conditional modulation of spike-timing-dependent plasticity for olfactory learning. Nature. 2012;482(7383):47–52. doi: 10.1038/nature10776 [DOI] [PubMed] [Google Scholar]
  • 60. Feldman DE. The spike-timing dependence of plasticity. Neuron. 2012;75(4):556–571. doi: 10.1016/j.neuron.2012.08.001 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 61. Kahsai L, Winther ÅM. Chemical neuroanatomy of the Drosophila central complex: distribution of multiple neuropeptides in relation to neurotransmitters. Journal of Comparative Neurology. 2011;519(2):290–315. doi: 10.1002/cne.22520 [DOI] [PubMed] [Google Scholar]
  • 62. Liu C, Meng Z, Wiggin TD, Yu J, Reed ML, Guo F, et al. A serotonin-modulated circuit controls sleep architecture to regulate cognitive function independent of total sleep in Drosophila. Current Biology. 2019;29(21):3635–3646. doi: 10.1016/j.cub.2019.08.079 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 63. Sejnowski TJ. Neural networks: Sleep and memory. Current Biology. 1995;5(8):832–834. doi: 10.1016/S0960-9822(95)00165-5 [DOI] [PubMed] [Google Scholar]
  • 64. Dag U, Lei Z, Le JQ, Wong A, Bushey D, Keleman K. Neuronal reactivation during post-learning sleep consolidates long-term memory in Drosophila. ELife. 2019;8:e42786. doi: 10.7554/eLife.42786 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 65. Bushey D, Tononi G, Cirelli C. Sleep and synaptic homeostasis: structural evidence in Drosophila. Science. 2011;332(6037):1576–1581. doi: 10.1126/science.1202839 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 66. Kirszenblat L, Yaun R, van Swinderen B. Visual experience drives sleep need in Drosophila. Sleep. 2019. doi: 10.1093/sleep/zsz102 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 67. Shiozaki HM, Ohta K, Kazama H. A Multi-regional Network Encoding Heading and Steering Maneuvers in Drosophila. Neuron. 2020. doi: 10.1016/j.neuron.2020.01.009 [DOI] [PubMed] [Google Scholar]
  • 68. Ni JD, Gurav AS, Liu W, Ogunmowo TH, Hackbart H, Elsheikh A, et al. Differential regulation of the Drosophila sleep homeostat by circadian and arousal inputs. Elife. 2019;8:e40487. doi: 10.7554/eLife.40487 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 69. Saper CB, Chou TC, Scammell TE. The sleep switch: hypothalamic control of sleep and wakefulness. Trends in neurosciences. 2001;24(12):726–731. doi: 10.1016/S0166-2236(00)02002-6 [DOI] [PubMed] [Google Scholar]
  • 70. Behn CGD, Brown EN, Scammell TE, Kopell NJ. Mathematical model of network dynamics governing mouse sleep–wake behavior. Journal of neurophysiology. 2007;97(6):3828–3840. doi: 10.1152/jn.01184.2006 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 71. Rempe MJ, Best J, Terman D. A mathematical model of the sleep/wake cycle. Journal of mathematical biology. 2010;60(5):615–644. doi: 10.1007/s00285-009-0276-5 [DOI] [PubMed] [Google Scholar]
  • 72. Dunmyre JR, Mashour GA, Booth V. Coupled flip-flop model for REM sleep regulation in the rat. PLoS One. 2014;9(4):e94481. doi: 10.1371/journal.pone.0094481 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 73. Kim SS, Hermundstad AM, Romani S, Abbott L, Jayaraman V. Generation of stable heading representations in diverse visual scenes. Nature. 2019;576(7785):126–131. doi: 10.1038/s41586-019-1767-1 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 74. Fisher YE, Lu J, D’Alessandro I, Wilson RI. Sensorimotor experience remaps visual input to a heading-direction network. Nature. 2019;576(7785):121–125. doi: 10.1038/s41586-019-1772-4 [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

S1 Fig. Connectivity between the navigation-related populations (EPG and EL) and sleep-related populations (R5 and ExR1).

A: On the left, neural projections of EPG and EL, referred as wedge neurons (green). On the right, neural projections of R5 (red) and ExR1 (blue). B: Recurrent connectivity between wedge neurons. The matrix in each figure represents the number of synaptic sites between presynaptic neurons (horizontal axis) and postsynaptic neurons (vertical axis) [14]. C: Connectivity between wedge neurons and R5 neurons in both directions. D: Connectivity between wedge neurons and ExR1 neurons in both directions. Data and neurons are reproduced from [14].

(TIF)

S2 Fig. Analysis of the two-population model in the fast and slow-timescale limits.

A: Eigenvalues in the two-population model in the fast-timescales limit. The real (in blue) and imaginary (in orange) parts of the eigenvalues are plotted as a function of wEE. B: Vector field of wedge and ring neurons dependent on synaptic plasticity during the wake phase in the slow-timescale limit. The green line represents the set point trajectory of wedge neurons. C: Vector field of wedge and ring neurons due to plasticity in the sleep phase in the slow-timescale limit. The green line is the trajectory of the set point in wedge neurons.

(TIF)

S3 Fig. Bump profile in the ring attractor network in response to inputs of different amplitudes Imax and standard deviations Iσ.

When input (first row) is provided to the ring attractor the plasticity rule for wIE(i) brings the activity of the wedge neuron rE(16) (where the bump peak is located, second row) back to r0 (third row). The bump is not constrained to have constant activity (third row), but always relaxes towards r0 over time in the absence of changing input. For ease of visualization, we used a slower time constant for the plasticity of wEE(ij) (τEE = 1000000), thus avoiding oscillations in the bump throughout the simulation.

(TIF)

S4 Fig. Ring attractor network with no plasticity in wEE(ij) and different initial distributions of weights.

A: Left: initial wEE(ij) values; right: 10 seconds of simulated dynamics. First row: input positioning the bump around wedge neuron 16. Second row: bump profile over time. Third row: activity of wedge neuron 16 evolving towards r0 due to plasticity in wIE(i). Fourth row: activity of ring neurons. Fifth row: the synaptic weights wIE(i). The orange band at the end of the simulations represents the period in which the stability of the bump is analyzed. B: Same as A but with larger σ. C: Same as A, B but again increasing σ. In this simulation, the bump shows stable oscillations.

(TIF)

S5 Fig. Stability analysis of the bump in the ring attractor network.

All subfigures are plots of different measures as a function of σ and wEE(max), which parameterize the initial synaptic weights wEE(ij) (Methods (4.7)). All variables in B, C, D, E, and F are calculated in a time window of 1 sec at the end of each simulation (orange area in Fig 3). A: Isolines of wEE(16,sum). These isolines are overlaid in white in the other subfigures and represent approximate boundaries of stability. B: Frequency of the oscillations in the bump across the analysis time window. Above the isoline wEE(16,sum)=2, the bump oscillates. C: Mean FWHM over the analysis time window. Below the isoline wEE(16,sum)=1 and above the isoline wEE(16,sum)=2(1+θ/r0), there is no bump because the FWHM is equal to the number of neurons, N. D: Maximum peak of the bump in the analysis time window (maximum activity of wedge neuron 16, max(rE(16)(t))). Below the isoline wEE(16,sum)=2, the maximum is r0 as forced by the plasticity rule in wIE(i). Between the isolines wEE(16,sum)=2 and wEE(16,sum)=2(1+θ/r0), the bump oscillates and the amplitude is given by the maximum, in this case 2r0. Above wEE(16,sum)=2(1+θ/r0), there is close-to-zero activity in wedge neurons, since the maximum is near zero. E: Mean of the bump peak over the analysis time window (mean activity of the wedge neuron 16, <rE(16)(t)>). In case of no oscillations, this value should be equivalent to the maximum bump peak in panel D. During oscillations, the value closely represents the center of oscillations. Note that between isolines wEE(16,sum)=2 and wEE(16,sum)=2(1+θ/r0) this value is lower than r0. F: Mean activity over the analysis time window of ring neurons, <rI(t)>. Below the isoline wEE(16,sum)=2(1+θ/r0), the activity of ring neurons increases. Above the isoline, the activity of ring neurons first decreases and then rapidly increases. We clipped the values of the mean activity above 100 to facilitate visualization, but the increment of activity in this area reached values over 1000.

(TIF)

S6 Fig. Values of the synaptic weights wEE(ij) in the simulation of Fig 4.

From left to right and from top to bottom: each plot shows the values each time there is a switch between wake and sleep phase and vice versa. Top, left: initial values of the weights set by the initial values of wEE(max) and σ in Table B in S1 Text. Top, center left: weights at the end of the first wake phase. Top, center right: after the subsequent sleep phase. Top, right: after the second wake phase. Bottom, left: weights after the second sleep phase. Bottom, center left: after sleep deprivation. Bottom, center right: after sleep rebound. Bottom, right: weights after the third wake phase. Note how the weights after each wake phase are increased (specially after sleep deprivation in the sixth plot) and how the sleep phase resets the weights to close to the initial conditions.

(TIF)

S7 Fig. Simulation of the ring attractor network with flashing input during the wake phase with slow plasticity time constants (details in Methods(4.9)).

The time constants τEE and τIE in this simulation are 210 times larger than in Table B in S1 Text. We decreased the time resolution of the simulation (time step is 0.001 seconds) and decreased the value rI(max) to 30. A: Full simulation with three wake phases and three sleep phases. We used the same input rotation as in Fig 5 (rotating input at 0.5Hz). B: Blow-up around 70 minutes in the first wake phase of the simulation. C: Blow-up around 220 seconds in the second wake phase. D: Blow-up around 410 seconds in the third wake phase. Note that the duration of sleep and wake phases are now on the order of hours due to the increased time constants in the plasticity rules.

(TIF)

S8 Fig. Simulation of the ring attractor network with flashing input during the wake phase (details in Methods(4.9)).

A: Simulation with three wake phases and three sleep phases. A flashing input that turns on and off is provided during the wake phase. During the off period, the ring attractor sustains a bump of activity that drifts due to changes in the synaptic weights wEE(ij). B: Blow-up around 15 seconds in the first wake phase of the simulation. C: Blow-up around 50 seconds in the second wake phase. D: Blow-up around 110 seconds in the third wake phase.

(TIF)

S9 Fig. Simulation of the ring attractor network with flashing input during the wake phase with slow plasticity time constants (details in Methods(4.9)).

The time constants in this simulation are 100 times larger than in the previous ring attractor simulations. A: Full simulation with three wake phases and three sleep phases. We used the same input rotation frequency as in S6 Fig. As in S6 Fig, we provide a flashing input that turns on and off during the wake phase. B: Blow-up around 2000 seconds in the first wake phase of the simulation. C: Blow-up around 4480 seconds in the second wake phase. D: Blow-up around 7040 seconds in the third wake phase. Note how the duration of sleep and wake phases are now on the order of hours due to the increased time constants in the plasticity rules. Note also how the bump of activity is sustained in place without drifting after the input switches off.

(TIF)

S10 Fig. Simulation of ring attractor combined with sleep homeostasis model, using an exponentially decaying plasticity rule during sleep (see S1 Text).

A: Entire simulation over a period of 800 seconds. White and grey regions indicate the sleep and wake phases, and correspond to dFB neurons switching off and on, respectively. Top row: input (inhibited during the sleep phase), alternating between clockwise and counter-clockwise rotations at 0.5Hz. Second row: ring attractor bump activity. Third row: activity of wedge neuron 16. Fourth row, light red: activity of R5 neurons. Dark red: filtered activity. Switching between sleep and wake is carried out by dFB neurons that switch on and off depending on filtered activity crossing thresholds rI(min) and rI(max). In the third wake epoch, sleep deprivation is produced by extending the inhibition of dFB neurons (d(t) = 1 during the orange top layout). Fifth row: diagonal elements of the connectivity matrix wEE(ij). The white line is the sum of all excitatory connections to wedge neuron 16. It passes threshold 2 at around 240 seconds leading to oscillations. The full connectivity matrix wEE(ij) at the switch times is shown in S6 Fig. Sixth row: connectivity wIE(i); black line is the mean value. B: Blow-up around 256 seconds: switch from wake to sleep phase. C: Blow-up around 474 seconds: extended wake phase leads to oscillatory behavior. Circuit switches to sleep. C Blow-up around 610 seconds: switch from sleep to wake phase.

(TIF)

S1 Text. Parameter values for simulations and additional weight resetting model.

Table A shows parameter values used in the two-population model, Table B shows parameter values used in the ring attractor network and a model for ring attractor network resetting of weights during sleep without autonomous activity is presented.

(PDF)

Data Availability Statement

Code and simulation are available at https://gitlab.com/anflorescaesar/integration_of_sleep_pressure_and_navigation_simulations.


Articles from PLoS Computational Biology are provided here courtesy of PLOS

RESOURCES