Skip to main content
eLife logoLink to eLife
. 2024 May 30;13:e91533. doi: 10.7554/eLife.91533

Theoretical principles explain the structure of the insect head direction circuit

Pau Vilimelis Aceituno 1,†,✉, Dominic Dall'Osto 1,†, Ioannis Pisokas 2,‡,✉
Editors: Laura L Colgin3, Laura L Colgin4
PMCID: PMC11139481  PMID: 38814703

Abstract

To navigate their environment, insects need to keep track of their orientation. Previous work has shown that insects encode their head direction as a sinusoidal activity pattern around a ring of neurons arranged in an eight-column structure. However, it is unclear whether this sinusoidal encoding of head direction is just an evolutionary coincidence or if it offers a particular functional advantage. To address this question, we establish the basic mathematical requirements for direction encoding and show that it can be performed by many circuits, all with different activity patterns. Among these activity patterns, we prove that the sinusoidal one is the most noise-resilient, but only when coupled with a sinusoidal connectivity pattern between the encoding neurons. We compare this predicted optimal connectivity pattern with anatomical data from the head direction circuits of the locust and the fruit fly, finding that our theory agrees with experimental evidence. Furthermore, we demonstrate that our predicted circuit can emerge using Hebbian plasticity, implying that the neural connectivity does not need to be explicitly encoded in the genetic program of the insect but rather can emerge during development. Finally, we illustrate that in our theory, the consistent presence of the eight-column organisation of head direction circuits across multiple insect species is not a chance artefact but instead can be explained by basic evolutionary principles.

Research organism: D. melanogaster, Other

eLife digest

Insects, including fruit flies and locusts, move throughout their environment to find food, interact with each other or escape danger. To navigate their surroundings, insects need to be able to keep track of their orientation. This tracking is achieved through visual cues and integrating information about their movements whilst flying so they know which direction their head is facing.

The set of neurons responsible for relaying information about the direction of the head (also known as heading) are connected together in a ring made up of eight columns of cells. Previous studies showed that the level of activity across this ring of neurons resembles a sinusoid shape: a smooth curve with one peak which encodes the animal’s heading. Neurons downstream from this eight-column ring, which relay velocity information, also display this sinusoidal pattern of activation.

Aceituno, Dall’Osto and Pisokas wanted to understand whether this sinusoidal pattern was an evolutionary coincidence, or whether it offers a particular advantage to insects. To answer this question, they established the mathematical criteria required for neurons in the eight-column ring to encode information about the heading of the animal. This revealed that these conditions can be satisfied by many different patterns of activation, not just the sinusoidal shape.

However, Aceituno, Dall’Osto and Pisokas show that the sinusoidal shape is the most resilient to variations in neuronal activity which may impact the encoded information. Further experiments revealed that this resilience only occurred if neurons in the circuit were connected together in a certain pattern.

Aceituno, Dall’Osto and Pisokas then compared this circuit with experimental data from locusts and fruit flies and found that both insects exhibit the predicted connection pattern. They also discovered that animals do not have to be born with this neuronal connection pattern, but can develop it during their lifetime.

These findings provide fresh insights into how insects relay information about the direction of their head as they fly. They suggest that the structure of the neuronal circuit responsible for encoding head direction was not formed by chance but instead arose due to the evolutionary benefits it provided.

Introduction

Insects exhibit an impressive ability to navigate the world, travelling long distances to migrate, find food or reach places of interest before returning to their nests (Müller and Wehner, 1988; Menzel et al., 1996; Heinze et al., 2013; Collett, 2019), a feat that requires them to keep track of their orientation across long journeys (Mappes and Homberg, 2004; Merlin et al., 2012; Warren et al., 2019; Collett, 2019; Beetz et al., 2022). This orientation tracking is achieved by the use of visual cues as well as integrating angular velocity signals over time to maintain a heading estimate relative to a starting angle (Seelig and Jayaraman, 2015; Taube, 2007), known as heading integration.

Electrophysiological and calcium imaging studies have shown that the neural population encoding the head direction in insects has a sinusoid-shaped activation pattern (Labhart, 1988; Labhart, 2000; Loesel and Homberg, 2001; Pfeiffer et al., 2005; Pfeiffer and Homberg, 2007; Kinoshita et al., 2007; Heinze et al., 2009; Homberg et al., 2011; El Jundi et al., 2014; El Jundi et al., 2019). Furthermore, downstream neural populations also encode velocity signals as sinusoidal activations (Lyu et al., 2022).

Theoretical work has speculated that this recurring motif of sinusoidal activity patterns might be so prevalent because it enables easy elementwise vector addition, where vectors encoded as sinusoidal activity waveforms can be added together to give a sinusoidal waveform encoding the sum of the vectors (Touretzky et al., 1993; Wittmann and Schwegler, 1995; Vickerstaff and Di Paolo, 2005). This allows the encoded heading to be easily used by downstream circuitry to track the insect’s position (Mittelstaedt, 1985; Wittmann and Schwegler, 1995; Vickerstaff and Di Paolo, 2005; Haferlach et al., 2007; Wessnitzer et al., 2008; Sakura et al., 2008; Stone et al., 2017). Further studies have shown that models closely aligned with biological data can indeed implement heading integration using sinusoidal activity patterns (Pisokas et al., 2020; Turner-Evans et al., 2020), and that such circuits can be learned (Vafidis et al., 2022).

Here, we show that enabling easy vector addition cannot be the unique driving factor for the presence of sinusoidal heading encodings, as many other circuits with different activity patterns can perform vector addition in the same way. This finding led us to question whether the sinusoidal activation patterns seen in insect navigation circuits are a coincidence, or if they might offer a particular functional advantage that was selected for during evolution.

To address this question, we consider the basic principles necessary for a circuit encoding direction. Of all the circuits fulfilling these requirements, the sinusoidal activity pattern offers the best resilience to noise for the encoded information. However, obtaining this activity requires a circuit with a specific connectivity pattern between neurons. Thus, our theory predicts that the heading integration circuit will have a sinusoidal connectivity pattern. We compare our predicted circuit with connectivity data for the desert locust (Schistocerca gregaria) and fruit fly (Drosophila melanogaster) using network analysis tools, showing a strong agreement. We then ask how an insect brain might develop such a circuit, finding that a simple Hebbian learning rule is sufficient. Finally, we combine ideas from replication dynamics with our theory, which leads us to the conclusion that the eight-column structure is a consequence of basic theoretical principles, rather than an evolutionary coincidence.

Results

A theoretical circuit for heading integration

We consider a population of N ‘compass neurons’ with an activity that encodes the direction of the insect as an angular variable θ. We represent the activity of this population by a vector where each element corresponds to the activity of one neuron, a(θ)=[a1(θ),a2(θ),...,aN(θ)]. We take N=8 neurons, consistent with data from many insect species which possess an eight-column organisation, with each column encoding a different direction (Honkanen et al., 2019; Stone et al., 2017; Pisokas et al., 2020).

Each neuron’s activity is updated depending on its current firing rate and the inputs it receives, both from other neurons in the circuit and externally. We formulate this update rule as follows:

a˙(θ)=−a(θ)+ϕ[Wa(θ)+u(t)], (1)

where W is the circuit’s weight matrix, representing the connections between neurons; ϕ is the neural activation function, that converts the total neural input into an output firing rate; and u(t) is the external input that encodes the insect’s angular velocity, via the PEN population of neurons (Green et al., 2017; Turner-Evans et al., 2017; Sayre et al., 2021; Pisokas et al., 2020; Turner-Evans et al., 2020; Hulse et al., 2021).

To simplify our derivations we allow the neural activity values to be both positive and negative, interpreting these values as being relative to a baseline neural firing rate. Similarly, we allow the weights to be both positive and negative, a common simplification in computational models (Li et al., 2023; Cornford et al., 2020; Kriegeskorte and Golan, 2019). This simplification will be addressed in section ‘Comparing the predicted circuit with biological data’ where we compare our model with experimental data.

Mathematical principles for neural heading integration

A circuit capable of performing heading integration must fulfil the requirements outlined in Table 1. The first two requirements allow us to establish the family of possible path integration circuits. We then use the principle of noise minimisation to determine which circuits perform best.

Table 1. Requirements for a heading integration circuit.
graphic file with name elife-91533-inf001.jpg graphic file with name elife-91533-inf002.jpg graphic file with name elife-91533-inf003.jpg
Circular topology Rotational symmetry Noise minimisation
The activity should have the same topology as the variable it is encoding to prevent discontinuities. To encode heading, the activity should have the topology of a 1D circle. The heading integration circuit should work similarly, irrespective of the direction in which the insect travels. There should not be a bias for any direction. The circuit should minimise the noise of the neural representation so the insect can navigate as precisely as possible.

Constraints on the neural activity

The neural activity should encode the insect’s head direction with a matching topology. Because the heading is a single angular variable, the topology of the activity space should be a 1D circle.

Furthermore, the symmetry requirement implies that rotating the heading of the insect should rotate the neural activity vector without changing its shape. Concretely, whether the insect is facing north or east, the activity of the neural population as a whole should be the same, but with the identity of the neuron with each activity value being different.

We can formalise the symmetry requirement by considering a head direction, θ, and a rotation by an integer multiple, k, of the angular spacing between neurons, Δθ=2πkN. In this case, individual neuron activities follow the relation

an(θ+Δθ)=an−kmodN(θ), (2)

which enforces that the neural activity vector is circularly rotated as the head direction changes. This relation can be expressed in the Fourier domain where, by the shift property, the circular rotation becomes a multiplication by a complex exponential:

Ff[a(θ+Δθ)]=Ff[a(θ)]ei2πkfN, (3)

where i=−1 and f∈[0,...,N−1] is the index of the spatial frequency, also called the harmonic. Activity with spatial frequency f has f ‘bumps’ around the ring.

Since the complex exponential has unit norm, the magnitude of the Fourier components remains the same for any rotation, ‖F[a(θ+Δθ)]‖=‖F[a(θ)]‖∀Δθ. Therefore, the shape of the activity pattern, a≡a(0), can also be fully specified by its Fourier domain representation, F[a], and the phase of this activity profile around the network encodes the heading of the insect:

Ff[a(θ)]=Ff[a]eiθf. (4)

Taking the inverse Fourier transform with the constraint that the neural activities must be real, we get the following form for the neural activity,

an(θ)=∑f=0N−1‖Ff[a]‖cos⁡(2πfnN+θf). (5)

It should be noted that the phase offset, θf, of each cosine waveform scales with the spatial frequency. This is because higher frequency waveforms have shorter wavelengths (in terms of number of neurons), so need their phases to rotate more quickly to move at the same speed around the network.

To explain this in more detail, we consider the case where this scaling is not used and the phase offset is the same for all harmonics, shown in Figure 1 top row. For f=1 (red line in Figure 1), the waveform has one bump and a wavelength of 8 neurons, so a 180° rotation corresponds to the waveform moving 4 neurons. But for f=2 (blue line in Figure 1), the waveform has two bumps and a wavelength of 4 neurons, so a 180° rotation corresponds to moving only 2 neurons, while a 4 neuron shift would correspond to a full rotation. The fact that the waveforms for different frequencies move at different speeds through the network implies that, if multiple spatial frequencies are used to independently encode the heading, their positions would not be aligned and the combined waveform would change shape as different angles are encoded (purple line in Figure 1). This violates the rotational symmetry principle, as the activity would look significantly different when the insect is facing north compared to south.

Figure 1. Encoding heading with multiple harmonics.

Figure 1.

Each panel shows the activity profiles encoding a particular heading value. Curves f=1, f=2, and f=1+f=2 respectively denote the waveform of the first harmonic, second harmonic, and the sum of the two. The vertical dashed (f=1 peak) and dotted lines (f=2 peaks) indicate the neurons which respond maximally for the first and second harmonic, respectively. Top row: Encoding the heading as the sum of two independent harmonics causes the waveform to change shape as the insect rotates, because the waveform for each harmonic can only rotate a distance of 360∘f as the insect rotates a full revolution to ensure an unambiguous representation. Bottom row: If all harmonics are aligned to rotate at the same speed, the combined waveform shape does not change. However, this alignment implies that higher harmonic waveforms cannot be uniquely mapped back to a heading: here the f=2 encoding is the same for θ = 0° and 180°.

To solve this problem of misaligned harmonics, we return to the case specified in Equation 5 where the phase offset is scaled linearly with the spatial frequency so that all waveforms move at the same speed and rotational symmetry is ensured, which is shown in Figure 1 bottom row. For a network with N=8 neurons, a 180° rotation shifts the activity waveform by 4 neurons. This 4 neuron shift corresponds to a 48 or 180° phase offset for the f=1 waveform, which has a wavelength of 8 neurons, but a 44 or 360° phase offset for the f=2 waveform, which has a wavelength of 4 neurons. While this maintains rotational symmetry, it implies that the f=2 waveform is the same whether the heading angle 0° or 180° is encoded. As a consequence, a higher harmonic waveform (having f>1) cannot on its own specify the encoded angle. The activity in all harmonics must be considered simultaneously to decode the angle, but even then this decoding might not be unique in the presence of noise (see section ‘Ambiguities in multiple harmonics decoding with drift’). The difficulties associated with encodings utilising multiple harmonics will be further addressed in the following sections.

Constraints on heading integration circuits

The basic assumptions outlined earlier also constrain the possible heading integration circuits – such circuits should allow for neural activity with the required topology and rotational symmetry to stably exist and propagate. Together, these two principles require that the activity in the circuit should have a constant total magnitude. We consider that this constraint is enforced by the nonlinear neural activation function, ϕ, in Equation 1, as detailed in section ‘Path integration dynamics for heading and position’.

If the network activity is at the desired level, and the external input u(t) is projected onto the ring attractor such that it does not alter the total network activity, then we can consider the network dynamics to be linear at this operating point. Therefore, while within the space of possible activities that corresponds to the ring attractor, our circuit dynamics are effectively described as,

a˙(θ)=−a(θ)+Wa(θ)+u(t). (6)

The rotational symmetry principle also applies to the network. For the same shaped activity waveform to be able to stably exist at any position around the network, the network connectivity should also be rotationally symmetric. For example, the connection strength between the neurons encoding the north and north-east directions should be the same as between those encoding south and south-west. Mathematically, this imposes that the weight matrix, W, is circulant, specifically that Wn,m=Wn+k,m+k. This matrix is fully specified by its first row, called the connectivity profile and denoted ω, meaning that we can express the product of the matrix with the neural activity as

(Wa(θ))k=Wka(θ)=∑m=0N−1Wk,mam(θ)=∑m=0N−1W0,m−kam(θ)=∑m=0N−1ωm−kam(θ), (7)

which can be simplified in terms of the convolution operation,

Wa(θ)=ω∗a(θ). (8)

Considering the case where the insect is not moving, u(t)=0, and the network activity is stable, a˙(θ)=0, we can combine Equation 6 and Equation 8 to get a relation for the stable network activity

a(θ)=ω∗a(θ). (9)

In the Fourier domain, this simplifies into

Ff[a(θ)]=Ff[ω]Ff[a(θ)]. (10)

As for the activity waveform analysis, we note that the Fourier transform is taken on the neural indices, not on the temporal domain.

Here, we have N equations that have to be satisfied, since the Fourier transform of an N-dimensional vector is also N-dimensional. For each harmonic frequency f, Equation 10 has two solutions:

  • Ff[ω]=1, which implies that activity with this spatial frequency is stable in the network, and therefore that it can encode the insect’s heading.

  • Ff[a(θ)]=0, meaning that the activity in this harmonic is zero, and thus nothing can be encoded in this frequency.

Minimising noise propagation in the circuit

The only constraint on the connectivity weights given by Equation 10 is that, if a frequency is used for encoding then Ff[ω]=1. There is no restriction on the weights for the inactive harmonics – they remain free parameters.

However, non-encoding channels can still propagate noise, which would be prevented by setting Ff[ω]=0. To illustrate this, we consider white noise, denoted by ϵ, that is added to the neural activity. When this noisy activity evolves in accordance with the dynamics from Equation 8, we have

ω∗(a(θ)+ϵ)=ω∗a(θ)+ω∗ϵ, (11)

where the term ω∗ϵ corresponds to noise and should therefore be dampened. We want to minimise the strength of that noise, which is quantified by its variance

Var[ω∗ϵ]=E[‖ω∗ϵ‖2]=‖ω‖2Var[ϵ]. (12)

Hence the magnitude of the noise that passes from one time interval to the next is modulated by the magnitude of the weight vector. By Parseval’s theorem,

∑f|Ff[ω]|2=∑n|ωn|2=‖ω‖2, (13)

which implies that to minimise noise propagation in the network we should impose Ff[ω]=0 for all harmonics, f, where Ff[a(θ)]=0. We show this in simulation in Figure 2, where only the first harmonic encodes information and we vary the weights of the other harmonics. The noise is indeed minimised if the weights for all non-encoding harmonics are set to zero.

Figure 2. Increased number of harmonics introduces more noise.

Figure 2.

Increasing the number of active harmonic frequencies increases the effect of errors in the network. (A) Weight matrix profiles, ω, for networks with increasing numbers of harmonics. (B) Normally distributed noise with zero mean and standard deviation 0.3 was added to the network activity, then the network state updated until it reached steady state. Networks with fewer harmonics better filtered out noise. (C) Noise variance increases linearly as the number of active harmonics increases, as predicted by Equation 12. The sample size was n=1000 trials for each active harmonics set, and the error bars show the standard deviation over trials.

This result establishes that all non-encoding harmonics in the network should be set to 0 to minimise noise propagation, and allows us to recover the circuit connectivity

ωn=∑f∈Fcos⁡(2πnNf), (14)

where F is the set of harmonics used to encode the head direction, F={f∈[1...N−1]:‖Ff[a]‖≠0}. The choice of F therefore determines both the harmonics used for encoding the angle in the activity and the connectivity of the circuit that supports this activity.

We leverage the same logic to prove that the number of encoding channels does not affect the signal-to-noise ratio in the network. If we have c encoding channels, each with the same activity, the total activity will grow linearly with c. The noise will also grow with ‖ω‖2=c, meaning that the signal-to-noise ratio will remain constant.

We now return to the question of whether using one or multiple harmonics is better. As mentioned, the signal-to-noise ratio in the network remains constant as additional encoding channels, c, are used. But additional channels imply additional harmonics, which by Parseval’s theorem require a higher total neural activity. If the total activity in the network is limited, the signal-to-noise ratio is in fact decreased when using more than one harmonic.

SNR∝‖a‖2‖ω‖2=‖a‖2c. (15)

Additionally, as detailed in sections ‘Constraints on the neural activity’ and ‘Ambiguities in multiple harmonics decoding with drift’, circuits using multiple harmonics perform worse in high noise environments because they are not guaranteed to provide an unambiguous orientation encoding. Finally, as we will discuss in sections ‘Learning rules and development’ and ‘Convergence of Oja’s rule with multiple harmonics’, the use of multiple harmonics also complicates the circuit’s development. We therefore only select circuits that use a single harmonic for further analysis, reducing the number of possibilities to N.

Determining the optimal circuit

As we consider networks with N=8 neurons, consistent with multiple insect species (Honkanen et al., 2019; Stone et al., 2017; Pisokas et al., 2020), the possible single harmonic circuits are f={1,2,3,4,5,6,7}, where the zeroth harmonic is discarded because it only represents the baseline neural activity. This gives the following activities and weights, derived from Equation 5 and Equation 14

an(θ)=cos⁡(2πnfN+θ)ωn=cos⁡(2πfnN). (16)

The circuits for the first four harmonics are plotted in Figure 3, but not all of these circuits are valid. In particular, circuits with even spatial frequencies have multiple neurons with identical activity values because they share a common divisor with N=8, as explained in detail in section ‘Degenerate circuits’.

Figure 3. Circuits for encoding with different harmonics.

Figure 3.

We show four circuits corresponding to each of the individual harmonics f=1,2,3,4 in panels (A, B, C, and D), respectively. Excitatory synapses are marked in red and inhibitory in blue. Neurons are shown in yellow with each having a black arrow that marks the direction to which it is tuned from Equation 16. The f=1 circuit is the simplest and constitutes our baseline. For the other cases we plot the original connectivity in the upper row and the rearranged network in the lower row. We find that the f=2 circuit consists of two independent subnetworks encoding orthogonal directions, the f=3 case is identical to f=1 after permuting neuron indices, and the f=4 case results in two connected groups of neurons inhibiting each other, hence it can only encode one direction. As such, all cases either have a degenerate ring structure (f=2,4) or are equivalent to f=1 after permutation.

For f=4 there are only two unique activity values, an=±cos⁡(θ)∀n, so this circuit can only encode one dimension, not a circular topology (see Figure 3D). For f=2 and f=6 (not plotted), there are four unique activity values, allowing the angle to be properly encoded. However, these circuits are degenerate because they are composed of two independent subcircuits, each encoding one direction (see Figure 3B). Because the weights connecting the two subcircuits are all zero, the activity in each subcircuit is independent of the activity in the other, and so the overall activity cannot be constrained to have the required circular topology.

All circuits with odd harmonic frequencies are equivalent. For example, as shown in Figure 3, the connections in the circuit for f=3 are the same as those for the f=1 circuit after the neuron identities are permuted. As detailed in section ‘Equivalence under permutation’, the frequencies f={1,3,5,7} always give the same circuit because the odd frequencies are coprime with the number of neurons N=8.

Since the activities and weights of all the non-degenerate circuits f={1,3,5,7} are the same as the base harmonic f=1 up to a permutation, we choose the lowest harmonic f=1, which gives us the following activity and weights:

an(θ)=cos⁡(2πnN+θ)ωn=cos⁡(2πnN). (17)

Comparing the predicted circuit with biological data

Our theory proposes an optimally noise-resistant circuit for heading integration, and its corresponding activity. The prediction that heading should be encoded as a sinusoidal activity bump is consistent with previous theoretical models (Touretzky et al., 1993; Wittmann and Schwegler, 1995; Hartmann and Wehner, 1995; Zhang, 1996; Vickerstaff and Di Paolo, 2005; Haferlach et al., 2007; Stone et al., 2017), as well as experimental evidence in both the locust and fruit fly (Heinze et al., 2009; Turner-Evans et al., 2017). We note, however, that data from the fruit fly shows a more concentrated activity bump than what would be expected from a perfect sinusoidal profile (Seelig and Jayaraman, 2015; Turner-Evans et al., 2017), and that calcium imaging (which was used to measure the activity) can introduce biases in the activity measurements (Siegle et al., 2021; Huang et al., 2021). Thus the sinusoidal activity we model is an approximation of the true biological process rather than a perfect description.

Importantly, our theory proposes that the optimally noise-resilient heading integration circuit should have synaptic weights that follow a sinusoidal pattern, even though such weights are not necessary for producing sinusoidal activity as discussed in section ‘Minimising noise propagation in the circuit’. This is the main prediction of our theory and we sought to validate it using connectivity data from the locust and fruit fly.

However, before we can directly compare our model with biological circuits, we must address a number of modelling simplifications:

  • In the model we considered a population of 8 neurons, but in insects there are eight neural columns, each with several neuron types (EPG, PEG, PEN, Delta7). Of these we model only the EPG (known as the compass neurons) which encode the integrated head direction.

  • The synaptic connections between neurons in our model can be both positive and negative, while biological neurons follow Dale’s law, meaning that a single neuron can either have only positive or only negative synapses.

  • The neural activity in the model was centred around zero and could have both positive and negative activity (firing rates), while real neurons only have positive firing rates.

Therefore, we simplified the biological connectivity to produce an equivalent circuit that could be directly compared with our model prediction. The neural population in our theoretical model corresponds to the biological EPG neurons, as these encode the integrated heading. We considered the other 3 neuron types that are part of the compass circuit (PEG, PEN, and Delta7 – see Kakaria and de Bivort, 2017; Pisokas et al., 2020) as just implementing connections between EPG neurons in accordance with biological constraints. We counted the number of different paths between EPG neurons, accounting for the sign of the connections (whether the path passed through an inhibitory Delta7 neuron), and used the net path count as a proxy for connectivity strength. This process is explained in detail in section ‘Path counting’.

We then computed the average connectivity profile, i.e., how each neuron connected to its neighbours around the ring, and compared this profile to the closest fitting sinusoid. Because the neuron gains, absolute synaptic strength and biophysical properties of the neurons are unknown, the units of the net path count are not necessarily equivalent to our abstract connection strength. We therefore fit an arbitrarily scaled and shifted sinusoid to the connection counts:

ωm−n=βcos⁡(2π(m−n)N)+γ, (18)

where m−n is the circular distance between 2 neurons while β and γ are constants that are fit to minimise the precision-weighted mean squared error compared with the experimental connectivity profile (see section ‘Fitting weights’).

Analysing the data from Pisokas et al., 2020, we consider the shortest excitatory and inhibitory paths between EPG (also known as CL1a) neurons in the locust, which have lengths of 2 and 3, respectively. There are no direct connections of length 1, and all the paths of length ≥4 must pass through the same neuron-type multiple times. This path counting analysis for the locust is shown in Figure 4A, and the procedure is detailed in section ‘Path counting’. We find that the connectivity profile between neurons for the locust is very close to sinusoidal in shape, supporting our theoretical prediction.

Figure 4. Comparison to biological data.

Figure 4.

The biological network models of (A) the locust and (B) the fruit fly, with four distinct neural populations each were simplified to equivalent networks with one population by counting paths of lengths 1, 2, and 3 between EPG neurons (which encode the integrated heading) and using the net signed path count as a proxy for connectivity strength. The average connectivity profile for each neuron to its neighbours around the ring was compared to the sinusoidal connectivity predicted by our theory. The locust network has no standard deviation because the data in Pisokas et al., 2020, are based on light microscopy which couldn’t resolve variations between columns. Excitatory connections are shown in red and inhibitory connections in blue, while the strength of a connection is indicated by the line width.

For the fruit fly, we used data from Scheffer et al., 2020, which provides synapse counts between pairs of neurons. These synapse counts were used as a proxy for connectivity strength, a view that has been validated in previous experiments (Liu et al., 2022; Barnes et al., 2022). After identifying the neurons and connections of interest, we grouped the neurons in eight columns following the logic presented in Pisokas et al., 2020, with detailed methodology explained in section ‘Data preprocessing’. We repeated the path counting analysis for the fruit fly with synapse count data (Figure 4B), and found that while the data are noisy, the connectivity profile fits a single sinusoid pattern reasonably well. However, the high variability in the synapse counts makes our hypothesis difficult to differentiate from alternative shapes (see section ‘Fitting weights’).

Taken together, this analysis shows that our theory is consistent with experimental data – using binary connectivity data for the desert locust and synapse count data for the fruit fly.

Learning rules and development

Having validated the connectivity of our theoretical circuit by comparing it to experimental data, we ask whether our circuit lends itself to biological development. Specifically, we show that even though our circuit requires precise connection strengths, this connectivity can be developed naturally by a Hebbian learning rule. Our approach follows from previous research which has shown that simple Hebbian learning rules can lead to the emergence of circular line attractors in large neural populations (Stringer et al., 2002), and that a head direction circuit can emerge from a predictive rule (Vafidis et al., 2022). In contrast to this work, we focus only on the self-sustaining nature of the heading integration circuit in insects and show that our proposed sinusoidal connectivity profile can emerge naturally.

Because the weight matrix is circulant, its eigenvalues are equal to the Fourier spectrum of its first row, which we derived to only have one nonzero value, for f=1. The network therefore only has a single eigenvalue and so projects activity into a single dimension. This operation is similar to classical dimensionality reduction methods such as principal component analysis, which can be implemented by Hebbian-like learning rules (Dayan and Abbott, 2001). We thus analyse the effects of incorporating a modified Oja’s rule into our model, a classical variant of Hebbian learning where the synaptic strength between 2 neurons grows when both neurons are active simultaneously, and the total synaptic strength is regularised to prevent exploding weight growth,

dWn,mdt=ηdθdt(am(t)an(t)−an2(t)Wn,m), (19)

where Wn,m is the synaptic connection strength from neuron m to neuron n, am and an are the pre- and post-synaptic activities, respectively, and ηdθdt is an adaptive learning rate where the plasticity is proportional to the rotational speed, whereas in the classical Oja’s rule it would be constant.

For our analysis we assume that the insect faces all possible directions, and therefore that the neural activity goes around the full circle. We then integrate the weight updates over some long period of time,

ΔWn,m=∫dWn,mdtdt=∫dWn,mdt(dθdt)−1dθ=η∫θ=02π[am(θ)an(θ)−an(θ)2Wn,m]dθ, (20)

where θ is the integration space. Applying the activity from Equation 17, we can find the fixed point of this update rule, when ΔWn,m=0:

Wn,m=η∫θcos⁡(θ+2πnN)cos⁡(θ+2πmN)dθη∫θcos2⁡(θ+2πnN)dθ=cos⁡(2π(n−m)N). (21)

Combined with Equation 7 and Equation 17, this result means that if there is sinusoidal activity in the network, the weights will naturally converge to the optimal sinusoidal values by way of our variant of Oja’s rule. This leads to the emergence of sinusoidal activity and weights from self-consistency: initial noisy sinusoidal activity will enforce weights that are close to a sinusoid, and those weights will filter out noise to make the activity even closer to a sinusoid, which will in turn make the weights more sinusoidal. This process will iteratively make the activity and the weights converge to the solution from Equation 17.

An important point in the use of Oja’s rule is that it would tend to concentrate the activity in a single harmonic. In a linear network, the harmonics would compete during learning, leading to one single harmonic emerging and all others being suppressed, as shown in section ‘Linear neurons’. For neurons with a nonlinear activation function, secondary harmonics would emerge, but would remain small under mild assumptions, as shown in section ‘Neurons with nonlinear activations’. Oja’s rule will still cause the weights to converge to approximately sinusoidal connectivity.

The finding that the weights will converge to a sinusoidal connectivity with learning has two interesting consequences from a biological standpoint: First, our circuit can emerge even when starting with only very coarse initial weights, without the need for high precision initial connectivity. Second, this simple plasticity rule allows the system to repair or recover from perturbations in its synapses as shown by simulations in Figure 5. However, this learning rule only applies to the weights that ensure stable, self-sustaining activity in the network. The network connectivity responsible for correctly integrating angular velocity inputs (given by the PEN to EPG connections in the fly) might require more elements than a purely Hebbian rule (Stringer et al., 2002), such as the addition of a predictive component (Vafidis et al., 2022).

Figure 5. Recovery of synaptic weights with a Hebbian learning rule.

Figure 5.

The synaptic weights converge to a sinusoidal pattern under our modified Oja’s rule when the network activity is dynamic and a sinusoidal input is provided. (A) The weights start at zero and slowly converge to the prescribed sinusoidal profile, showing that this connectivity can emerge from scratch. (B) The sinusoidal weights are perturbed by noise but learning ensures that the weight profile is corrected. In both cases the network’s initial activity is corrupted with zero mean Gaussian noise. Noisy sinusoidal input is provided to rotate the activity bump around the network at a constant speed of 1/8 neurons per timestep. The simulation runs for 100 periods. Parameters: N=8, integration timestep Δt=0.01,η=0.1,‖a‖=1,σW=0.2,σa=0.2,σu=0.2.

Evolution of the eight-column circuit

Having derived and experimentally validated the theoretical circuit, we now address another question: whether there might be a reason that insect head direction circuits have an eight-column architecture (Honkanen et al., 2019; Stone et al., 2017; Pisokas et al., 2020). The derivations leading to Equation 17 are valid for other values of N, so there is no a priori reason to expect N=8.

Our reasoning follows recent studies in genetics (Johnston et al., 2022; Dingle et al., 2018), which argue that an observed organism is more likely to have resulted from a simple than a more complex genome: evolution favours simplicity. We note that powers of two are easier to generate with replication dynamics than other numbers, because they just require each cell to divide a set number of times. Other numbers require that, at some point, two cells resulting from a division must behave differently, necessitating more complex signalling mechanisms and rendering this possibility less likely to have been developed by evolution without some other driving factor. We therefore expect N to be a power of two unless required to be otherwise.

As we show in section ‘Circuits with different neuron counts’, not all numbers of neurons enable a working circuit. The circuits for N=2 and N=4 are degenerate – either producing a single dimensional encoding, or two disconnected circuits that do not enforce the required circular topology. N=8 is the smallest power of two that could result in a non-degenerate circuit. This hints at the possibility that the eight-column architecture is not a chance evolutionary artefact, but rather that it is the genetically simplest circuit capable of performing heading integration.

Discussion

In this work we derived an optimal noise-minimising circuit for encoding heading and verified that this circuit matches experimental data from insects. Furthermore, we showed that such a circuit can be developed and maintained by a biological learning rule, and proposed a mathematical argument for the eight-column structure found in insect compass circuits. In this section, we discuss the implications and limitations of these contributions, and outline potential future work.

Heading integration circuits in insects have been extensively studied, with models ranging in complexity from simplified conceptual networks (Wittmann and Schwegler, 1995; Cope et al., 2017) to sophisticated models constrained by biological data and featuring multiple neuron types (Kakaria and de Bivort, 2017; Su et al., 2017; Kim et al., 2017; Pisokas et al., 2020; Lyu et al., 2022). Previous theoretical work has argued that a sinusoidal activity encoding is such a common motif in insect navigation because it facilitates elementwise vector addition (Wittmann and Schwegler, 1995). However, this cannot be the only reason because as we show there is a whole family of circuits with different encoding patterns that enable easy vector addition. By showing that sinusoidal activity emerges from the theoretically most noise-resilient heading integration circuit, and verifying that the corresponding circuit matches experimental data, we close this explanatory gap.

We also show that our proposed circuit can be developed by a simple Hebbian-based learning rule, and that the presence of the eight-column structure can be explained from the perspective of replication dynamics. Both results align with the idea that evolution should be biased towards structures that are easier to encode in the genome (Johnston et al., 2022; Alon, 2007) and learn (Zador, 2019). To the best of our knowledge, this is the first time that such arguments have been put forward in the context of a specific circuit with a specific function.

Our work still has some unaddressed limitations, in particular regarding the topology of the activity. The use of a circular topology to encode the head direction of the insect is valid only in 2D environments. But many species, including the fruit fly, can navigate in a 3D environment. We argue that even if these insects live in a 3D environment, the third dimension (up-down) is different from the other two due to gravity and the existence of a hard boundary (the ground). Further studies would be required to investigate the full effects of 3D motion.

We could also investigate circuits that integrate position, not only heading, which would require the activity to have a 2D plane topology instead of a circle. This would be particularly relevant for foraging insects such as bees or ants, whose ability to remember their position with respect to their nest has been the subject of many experimental and computational studies (Collett, 2019; Wehner and Srinivasan, 2003). The position integrating neurons in these insects are also predicted to have sinusoidal activation patterns (Wittmann and Schwegler, 1995; Vickerstaff and Di Paolo, 2005; Stone et al., 2017).

Finally, another interesting avenue for future work is to compare the encoding of direction in insects with that of mammals, which encode heading in a fundamentally different way that uses many more neurons. This raises a critical question: why would the circuit and encoding be different if navigation follows similar principles across species? We speculate that the difference might lie in the type of navigation that the two classes of animals use. Insects often rely on a reference system that is globally anchored to a certain point or phenomenon, whether it is their nests for ants and bees, the sunlight polarisation pattern for locusts, or the milky way for dung beetles. On the other hand, mammals such as rodents typically do not use global cues but rely on local landmarks that are context-dependent and only occur in specific locations. Therefore, mammals must employ a flexible encoding that can be updated as different environments are explored. Further investigation of this possibility would require a different set of principles than those selected here.

Materials and methods

Path integration dynamics for heading and position

Here, we make more precise statements about the dynamics of the circuit. The topology of the activity is a circular line attractor, so that any perturbation falls back into a circle and the position of the activity around the circle represents an angle. In our circuit with the dynamics from Equation 1, this circular line attractor is achieved by setting

‖ϕ′[Wa]‖=1∀‖a‖=r‖ϕ′[Wa]‖<1∀‖a‖>r‖ϕ′[Wa]‖>1∀‖a‖<r (22)

where r is the radius of the attractor. Given that the dynamics are effectively linear we can apply a Fourier transform and write the original dynamics around the line attractor directly in the spatial Fourier basis,

Ff[a˙]=Ff[−a+ω∗a+u(t)], (23)

which we can expand to obtain

Ff[a˙]=−Ff[a]+Ff[ω]Ff[a]+Ff[u(t)], (24)

which only applies to the circular activity where the dynamics are linear. To incorporate the dynamics that force the activity to return to the cycle, we add a new term into the network dynamics which fulfils Equation 22 – increasing ‖Ff[a]‖ if ‖a‖<r and decreasing it if ‖a‖>r. This increase or decrease can be incorporated as a simple scaling factor on the activity decay term

Ff[a˙]=−α(r−‖a‖)Ff[a]+Ff[ω]Ff[a]+Ff[u(t)], (25)

where α(r−‖a‖) is a nonlinear smooth function with a single minimum and α(0)=1, which forces the activity to have the appropriate magnitude, ‖a‖=r.

Note that this doesn’t require the neurons to have access to a global activity magnitude signal because each neuron receives a sufficient number of inputs to locally compute the total activity in the network. See the f=1 circuit in Figure 3: each neuron receives inputs from all others except those tuned to an orthogonal direction, but the activity of these orthogonal neurons can be computed from the correlated neurons next to them. For example, neuron 1 receives input from all neurons except 3 and 7, but the activities of these neurons can be computed from the activities of neurons 2 and 4 or 6 and 8, respectively. Note also that this is not the case for degenerate circuits such as f=2 in Figure 3, which would require an activation function with access to global information to constrain the total activity.

As the activity always falls back to the circular line attractor, the heading integration is linear around the circle. This implies that any small movement of the animal or the perception of a sensory cue is first projected onto the circle, then linearly integrated. We therefore only consider how network inputs cause the activity to rotate around the network,

Ff[a˙]=−α(r−‖a‖)Ff[a]+Ff[ω]Ff[a]+Ff[u(t)]⊥a, (26)

where Ff[u(t)]⊥a is the projection of the input signal perpendicular to the current activity pattern.

In more intuitive terms, the neurons have a saturating nonlinear activation function where they modulate their gain based on the total activity in the network. If the activity in the network is above the desired level, r, the gain is reduced and the activity decreases, and when the activity of the network is less than desired level, both the gain and the activity increase. Note that in this scenario transient deviations from the line attractor, which would induce nonlinear behaviour in the circuit dynamics, are tolerable. External inputs, u(t), could transiently modify the shape of the activity, producing activity shapes deviating from what the linear model can accommodate. For example, the shape of the bump attractor could be modified through nonlinearities while the insect attains high angular velocity (Turner-Evans et al., 2017).

Such nonlinear dynamics do not conflict with the theory developed here, which only requires linearity when the activity is projected onto the circular line attractor. In our framework, the linearity of integration at the circular line attractor is not a computational assumption, but rather it emerges from the principle of symmetry.

Ambiguities in multiple harmonics decoding with drift

We consider the case where multiple harmonics are used, and their phases have drifted from each other. We only focus on angular drift, rather than noise in the full activity, because as noted in section ‘Path integration dynamics for heading and position’, any deviations in the overall activity level in the network will dissipate.

For example, we consider the harmonics f1 and f2. The activity is given by Equation 5

an(θ)=cos⁡(2πf1nN+f1θ)+cos⁡(2πf2nN+f2θ). (27)

If the phase of the second harmonic drifts by δθ,

anδθ(θ)=cos⁡(2πf1nN+f1θ)+cos⁡(2πf2nN+f2θ+δθ). (28)

We can calculate the alignment between the activity with drift and the activity without drift as a dot product of the activity vectors,

⟨a(θ),aδθ(θ)⟩‖a(θ)‖‖aδθ(θ)‖=1‖a(θ)‖2∑nan(θ)anδθ(θ)=1+cos⁡(δθ). (29)

However, there are other angles where the alignment is better. For example, we can consider an estimate angle, θ^, with its corresponding activity, a(θ^), which gives

⟨a(θ^),aδθ(θ)⟩‖a(θ^)‖‖aδθ(θ)‖=1‖a(θ)‖2∑nan(θ^)anδθ(θ)=cos⁡(θ−θ^)+cos⁡(θ−θ^+δθ). (30)

For small δθ, this is maximised when θ^=θ+δθ/2. However, since θ is circular, if the drift is π then there are two possible positions given by θ^=θ±π/2.

This implies that an encoding using multiple harmonics does not necessarily offer a unique decoding in the presence of noise.

Equivalent circuits and degeneracies

Equivalence under permutation

The activity of neurons given by Equation 5 implies that the preferred angle of neuron n is given by

φn=2πfnmodNN, (31)

where in our case N=8. Table 2 shows nfmod(N) evaluated for all neurons in the network using different harmonics. We notice that for f={1,3,5,7} all the numbers from zero to seven appear, while for f={2,6} we only get the even numbers, for f=4 we get only zero and four, and for f=8 there is only zero.

Table 2. Distribution of neural activity phases for different harmonics.

We computed fnmod8 for n={1,2,3,4,5,6,7} and f={1,2,3,4,5,6,7,8} and found that all possible phases appear for any odd number. This happens because the mod8 operation imposes an abelian group structure, namely Z/8 and any coprime with 8 will be a generator of the whole group. If we use instead f=2 or f=6 we have that we can divide N=8 and f by 2 and we get the abelian group Z/4 which has four elements. The same argument applies to f=4, leaving only two elements, and for f=8 we get a single element.

n=0 n=1 n=2 n=3 n=4 n=5 n=6 n=7 gcd(8,f)
f=1 0 1 2 3 4 5 6 7 1
f=2 0 2 4 6 0 2 4 6 2
f=3 0 3 6 1 4 7 2 5 1
f=4 0 4 0 4 0 4 0 4 4
f=5 0 5 2 7 4 1 6 3 1
f=6 0 6 4 2 0 6 4 2 2
f=7 0 7 6 5 4 3 2 1 1
f=8 0 0 0 0 0 0 0 0 8

The explanation is based on number theory. If f and N have the greatest common divisor gcd(N,f)=d, then nfmodN=0 for n=N/d. This implies that the preferred angle of neuron n=0 is the same as that of n=N/d. When N,f are coprime d=1, n goes from 0 to N−1 without repeating any value. However, when d>1, the neuron n=N/d has the same tuning as the neuron n=0, the neuron n=N/d+1 has the same tuning as the neuron n=1 and so on. In other words, the angular tuning of the neurons has a period of gcd(N,f).

This divides the possible circuits into the following groups:

  • f={1,3,5,7} which contain N=8 angular tunings with values [0,π/4,π/2,3π/4,π,5π/4,3π/2,7π/4] because every odd number is coprime with 8 and thus the gcd(N,f)=1.

  • f={2,6} which cycle through four possible directions [0,π/2,π,3π/2] because Ngcd(N,f)=4.

  • f=4 which can only represent two possible directions [0,π].

  • f=8 which can only represent the direction 0.

Degenerate circuits

Given the groupings presented in the previous subsection, we notice that not all of them allow the encoding of a full range of angles, (0°, 360°). Notably, for f=8 the neurons only encode one angle, and for f=4 only two complementary angles are encoded, 0 and π. This means that we cannot represent a full circle, because we need two different dimensions to do so, but in both of these cases we can only encode one.

For f=2,6 we obtain two groups of neurons, and in each group there are 2 neurons that encode two opposing directions, thus it is possible to cover a full circle. However, the circuit is degenerate, as shown in Figure 3. In this case there are no connections between even and odd neurons. Thus, we have two groups of neurons that are disconnected, and each group encodes only one direction (either north-south or east-west). While the encoding could work in principle, the circuit is decoupled, meaning that there is nothing in this circuit that prevents the activity from having activities outside the circular topology: as the two circuits are disconnected, a given value of activity in one group does not restrict the activity in the other.

Circuits with different neuron counts

We evaluate the viability of circuits with other values of N. From findings in the the previous section, we note that choosing N to be a prime number implies that all frequencies will be coprime with N, and thus that all the neurons will have a different tuning.

For N=2, the two angles are 0,π, in which case the circuit can only encode one dimension and thus cannot encode a full circle, as was the case for N=8,f=4 in section ‘Degenerate circuits’.

For N=4, if f=2 the circuit can encode only the angles 0,π and we have the same case as for N=2. But if f=1 or f=3, the neurons are tuned to the angles 0,π/2,π,3π/2 which can encode a circle. However, by looking at the connectivity matrix from Equation 16, we find that neurons 1, 3 are connected to one another, but not to 2, 4, as was the case for N=8,f=2 in section ‘Degenerate circuits’. This implies that the circuit does not enforce a circular topology, and thus it does not work.

Notice that we could think of another structure where each neuron encodes a different direction. Intuitively, we would have a north-south neuron and an east-west neuron, as we would have in Cartesian coordinates. However, this would have the same problem as N=4, where the 2 neurons would not interact and thus the topology would be wrong. Additionally, when the insect heads north, the north-south neuron would be very active, while when it heads south it would be very inactive. This means that the circuit as a whole would have a different firing rate depending on the direction, breaking the symmetry assumption.

Path counting

We counted the number of different paths between EPG neurons, accounting for the sign of the connections (whether the path passed through an inhibitory 7 neuron), and used the net path count as a proxy for connectivity strength. The results of this analysis are shown in section ‘Comparing the predicted circuit with biological data’, but we will detail the process here using the locust network from Pisokas et al., 2020, as an example, shown in Figure 6.

Figure 6. Path counting.

Figure 6.

(A) The full locust connectivity network from Pisokas et al., 2020, and (B) the connections with path lengths 2 and 3 from EPG1 to all other EPG neurons in the network. Because the network is rotationally symmetric these path counts generalise to all EPG neurons as shown in Table 3.

We consider the shortest excitatory and inhibitory pathways between EPG neurons, which have lengths of 2 and 3 respectively. There are no direct paths between EPG neurons in the locust circuit. In this case there are two paths of length 2 that implement self-excitatory connections for EPG1:

  • EPG1→PEG1→EPG1

  • EPG1→PEN1→EPG1

And there is one connection of path length 2 that connects EPG1 to each of its nearest neighbours:

  • EPG1→PEN1→EPG2

  • EPG1→PEN1→EPG8

For inhibitory connections there are four paths of length 3 that connect EPG1 to the neuron on the opposite side of the ring, EPG5. These are:

  • EPG1→Delta75→PEN5→EPG5

  • EPG1→Delta75→PEG5→EPG5

  • EPG1→Delta74→PEN4→EPG5

  • EPG1→Delta76→PEN6→EPG5

There are three connections of path length 3 connecting EPG1 to EPG4:

  • EPG1→Delta74→PEN4→EPG4

  • EPG1→Delta74→PEG4→EPG4

  • EPG1→Delta75→PEN5→EPG4

Finally, there is one path of length 3 connecting EPG1 to the neuron perpendicular to it around the ring, EPG3:

  • EPG1→Delta74→PEN4→EPG3

We then add these connections together to obtain the net path count profile for the network. Because the network is rotationally symmetric, the connections from EPG1 are the same as the connections from EPG2 but with the neurons indices incremented by 1. The generalised profile is shown in Table 3.

Table 3. Net path count profile between EPG neurons in the locust circuit.

EPGn→ n−4 n−3 n−2 n−1 n n+1 n+2 n+3
Excitatory path count 0 0 0 1 2 1 0 0
Inhibitory path count 4 3 1 0 0 0 1 3
Net path count –4 -3 –1 1 2 1 –1 –3

Data preprocessing

The following section details our data preprocessing to produce a central complex circuit for the fruit fly similar to that in Pisokas et al., 2020, using synaptic counts from the fruit fly connectome dataset (Scheffer et al., 2020). Full details are shown in our available code.

We first identified the 6 neuron types which corresponded to the neurons of interest in the central complex (Table 4).

Table 4. Neuron types and their numbers in the fruit fly connectome dataset (Scheffer et al., 2020).

Neuron class Number
PEN_a(PEN1) 20 neurons
PEN_b(PEN2) 22 neurons
PEG 18 neurons
EPG 46 neurons
EPGt 4 neurons
Delta7 (Δ7) 42 neurons

We grouped the two PEN and two EPG populations together for further analysis.

From the connectome data we created a connectivity matrix (Figure 7) containing the number of synapses between all pairs of neurons of the above-mentioned types. This contained 129,473 synapses between 152 neurons in total.

Figure 7. The connectivity matrix for the fruit fly containing all 152 neurons.

Figure 7.

On the horizontal axis are the names of the pre-synaptic neurons while on the vertical axis the names of the post-synaptic neurons. Neurons of each cell type are ordered by the glomerulus they innervate and arbitrarily within glomerulus.

Next, neurons in the same glomerulus were grouped together. The EPG neurons were divided between 18 glomeruli, L1-L9 and R1-R9. The PEN neurons were also divided between 16 glomeruli, L2-L9 and R2-R9. The PEG neurons were divided into 18 glomeruli with only 1 neuron in each, L1-L9 and R1-R9. The Delta7 neurons had 10 unique sub-types (Table 5) which were grouped into eight glomeruli based on their left glomerulus index – i.e., L4R5_R and L4R6_R were grouped in L4.

Table 5. List of the Delta7 neuron sub-types in the fruit fly connectome dataset (Scheffer et al., 2020).

These differ in the glomeruli their pre- and post-synaptic terminals innervate. We are referring to those altogether as Delta7 neurons in the present account.

Delta7 neuron sub-types Glomerulus group
Delta7(PB15)_L1L9R8_R Delta7 L1
Delta7(PB15)_L2R7_R Delta7 L2
Delta7(PB15)_L3R6_R Delta7 L3
Delta7(PB15)_L4R5_R Delta7 L4
Delta7(PB15)_L4R6_R Delta7 L4
Delta7(PB15)_L5R4_L Delta7 L5
Delta7(PB15)_L6R3_L Delta7 L6
Delta7(PB15)_L6R4_L Delta7 L6
Delta7(PB15)_L7R2_L Delta7 L7
Delta7(PB15)_L7R3_L Delta7 L7
Delta7(PB15)_L8R1R9_L Delta7 L8

After this grouping we had a connectivity matrix of 60 neurons in total (Figure 8).

Figure 8. The connectivity matrix for the fruit fly neurons grouped by innervated glomerulus so containing 60 groups.

Figure 8.

On the horizontal axis are the names of the pre-synaptic neurons while on the vertical axis the names of the post-synaptic neurons. Neuron groups are ordered by the glomerulus they innervate.

For the EPG, PEN, and PEG neurons we then grouped glomeruli mirrored in the two hemispheres together – i.e., L1 and R1 were grouped into glomerulus 1. This resulted in a connectivity matrix of 34 neurons (Figure 9).

Figure 9. The connectivity matrix for the fruit fly neurons grouped by glomerulus and aggregated from both hemispheres, so containing 34 groups.

Figure 9.

On the horizontal axis are the names of the pre-synaptic neuron groups while on the vertical axis are the names of the post-synaptic neuron groups. Neuron groups are ordered by the glomerulus they innervate.

Finally, as in Pisokas et al., 2020, we grouped the PEG9 and PEG1 neurons and EPG9 and EPG1 neurons together. The former because they both output to the same ellipsoid body segment, and the latter because they both receive common input. This resulted in a connectivity matrix with 32 neurons (Figure 10) which we used for the analysis in Figure 4 as this network had the eightfold rotational symmetry compatible with our theoretical model.

Figure 10. The connectivity matrix for the fruit fly neurons grouped by glomerulus and aggregated from both hemispheres, with PEG9 and PEG1 neurons and EPG9 and EGP1 neurons grouped, so containing 32 groups in total.

Figure 10.

On the horizontal axis are the names of the pre-synaptic neuron groups while on the vertical axis the names of the post-synaptic neuron groups. Neuron groups are ordered by the glomerulus they innervate.

Fitting weights

Having calculated the paths or synaptic strengths between EPG neurons in the network, we next computed the average connectivity profile for the network – how each EPG neuron connected to its neighbours a certain distance around the ring. We then compared this connectivity profile to the closest fitting sinusoid to quantify to what degree our prediction of sinusoidal weights was consistent with biological data.

We use the vector

ω^d=βcos⁡(2πdN)+γ, (32)

where d=((m−n)+4mod8)−4∈[−4...3] is the signed circular distance from neuron m to neuron n.

In the networks from Pisokas et al., 2020, the weights are rotationally symmetric, so we minimise the mean squared error between the sinusoidal profile and the biological connectivity profile,

β∗,γ∗=argminβ,γ1N∑d=−N/2N/2−1(ω^d(β,γ)−ωd)2, (33)

by using least squares.

The network derived from the synaptic count data in Scheffer et al., 2020, is not rotationally symmetric so each value in the average connectivity profile, ωd, has a corresponding standard deviation, σd. In this case we minimise the precision-weighted mean squared error, which emphasises fitting connectivity profile values that are more consistently seen in the network:

β∗,γ∗=argminβ,γ1N∑d=−N/2N/2−1(ω^d(β,γ)−ωdσd)2. (34)

The result of fitting sinusoidal profiles to the data is shown in section ‘Comparing the predicted circuit with biological data’. Since the fit for the fruit fly is not as clear as for the locust, we also compared the observed weights in the fruit fly with Gaussian and von Mises curves. Since both the Gaussian and von Mises distributions also have a parameter specifying their width, this requires fitting an extra parameter. For the Gaussian we have

βge−n2σg+γg, (35)

where βg,σg,γg are parameters to fit. For the von Mises distribution we have

βveκvcos⁡(n)+γv, (36)

where βv,κv,γv are parameters to fit. For both the Gaussian and von Mises, we find a good agreement with the weights in Figure 11, and a lower root mean square error (RMSE) than with any combination of harmonics. However, we note that our sinusoidal model has two parameters instead of three, so to make a fair comparison we use the corrected Akaike information criterion (AICc) (Burnham and Anderson, 2004), which is given by

AICc=2p−2ln⁡(L)+2p2+2pN−p−1=2p+2NRMSE2+2p2+2pN−p−1, (37)

Figure 11. Gaussian and von Mises distributions provide a better fit than the weight profile with sinusoidal weights of frequency 1, but the former two distributions have an extra model parameter.

Figure 11.

When fixing the width parameters of these distributions to match the sinusoid, all three distributions provide a very similar fit. Note that the –4 and 4 neuron indices are the same and just duplicated for visualisation purposes.

where p is the number of distribution parameters, N the number of samples, and ln⁡(L) is the log-likelihood, which in this case is the sum of squared errors, ln⁡(L)=−NRMSE2. We find that the lowest AICc (corresponding to the best model) corresponds to the harmonic f=1 (Table 6).

Table 6. Quality of fit for different possible weight structures.

The root mean square error (RMSE) is weighted by the variance attached to each connection (in units of standard deviations). The corrected Akaike information criterion (AICc) is also shown for the weight profiles in Figure 11. The best fit after correcting for model size is the Gaussian with fixed standard deviation, but it is very closely matched by the von Mises with fixed kappa and f=1.

Curve RMSE AICc
f=1 0.3213 8.05
Gaussian 0.1941 12.60
von Mises 0.1854 12.55
Gaussian (fixed stddev) 0.3142 7.98
von Mises (fixed kappa) 0.3178 8.02

As a complementary approach to evaluate the shape of the distribution, we first fit the Gaussian and von Mises distributions to the best fit f=1 curve. We then freeze the width parameters of the distributions (σg for the Gaussian and κv for the von Mises) and only optimise the amplitude and vertical offset parameters (β and γ) to fit the data. This approach limits the number of free parameters for the Gaussian and von Mises distributions to two, to match the sinusoid. The results are shown in Figure 11 and Table 6. Both the fixed-width Gaussian and von Mises distributions are a slightly better fit to the data than the sinusoid, but the differences between the three curves are very small.

In simplifying the fruit fly connectome data, we assumed all synapses of different types were of equal weight, as no data to the contrary were available. Different synapse types having different strengths could introduce nonlinear distortions between our net synaptic path count and the true synaptic strength, which could in turn make the data a better or worse fit for a sinusoidal compared to a Gaussian profile. As such, we don’t consider the 2% relative difference in RMSE between the f=1 sinusoid and fixed-width Gaussian and von Mises distributions to be conclusive.

Overall, we find that the cosine weights that emerge from our derivations are a very close match for the locust, but less precise for the fly, where other functions fit slightly better. Given the limitations in using the currently available data to provide an exact estimate of synaptic strength (for the locust), and due to the high variability of the synaptic count (for the fruit fly), we consider that our theory is compatible with the observed data.

Convergence of Oja’s rule with multiple harmonics

Linear neurons

Integrating our modified Oja’s learning rule updates (Equation 19) over all angles in the position space gives us the following:

Δω=a∗a−‖a‖2ω, (38)

which we can transform into the Fourier domain:

Ff[Δω]=Ff[a]2−‖a‖2Ff[ω]. (39)

The steady-state solution when the weight update is 0 is:

Ff[ω]=Ff[a]2‖a‖2. (40)

By Parseval’s theorem, ‖a‖2=∑f‖Ff[a]‖2 so the Fourier spectrum of the steady-state weights is just the normalised Fourier spectrum of the input:

Ff[ω]=Ff[a]2∑f‖Ff[a]‖2. (41)

From this we can see that the stable L1 norm of F[ω] is 1,

∑f|Ff[ω]|=1∑f‖Ff[a]‖2∑f|Ff[a]2|=1. (42)

If we combine this result with Equation 10, we find that in the case of a single encoding frequency, Ff∗[a]>0, Oja’s rule will result in a single stable harmonic with Ff∗[ω]=1 because ∑fFf[a]2=Ff∗[a]2.

If Oja’s rule has a normalising factor added to account for the number of encoding harmonics used, |F|,

Δω=a∗a−1|F|‖a‖2ω, (43)

then the steady-state solution for the weights becomes

Ff[ω]=|F|Ff[a]2∑fFf[a]2, (44)

where the L1 norm of ω=|F|. In this case multiple harmonics could develop stable values of Ff[ω]=1, but only if the activity magnitudes for these harmonics are identical. If any perturbation affects the activities, the harmonic which happens to have the larger activity will begin to dominate the other by the dynamics of Equation 43, until only one remains.

Therefore, the only case where our learning rule results in a stable solution robust to perturbations is when only one harmonic is used.

Neurons with nonlinear activations

An analysis similar to the previous case applies when the firing rate of the neurons has a nonlinear activation. For a given activity profile, Equation 41 still applies. Thus, for an activity profile a, it will generate the weight profile

ω=1‖a‖2∑f|Ff[a]|2, (45)

where we set ‖ω‖=1 for convenience of notation. Note that the squaring process will induce a weight distribution in which the larger harmonic will be enhanced more than the rest.

Having obtained the weights, the equation for the activity profile can be solved through the self-consistency setting in which u(t)=0 and the activity is maintained,

an(θ)=ϕ(∑m=0Nωman−m(θ)), (46)

where ϕ is the nonlinear activation function. Given the rotational symmetry from our assumptions, it is enough to solve for an=an(0), which gives us a set of N/2 equations which can then be combined with Equation 45, which gives us the following equation to solve

an=ϕ(∑m=0N(∑f=1NFf[a]2‖a‖2cos⁡(2π(n−m)N))an−m)=ϕ(1‖a‖2∑m=0N(∑f=1N[∑k=0Nakcos⁡(2πkfN)]2cos⁡(2π(n−m)N))an−m). (47)

Since an=a−nmodN, we obtain N/2 equations for N/2 values of an.

Note that there is no closed form solution in general, but some generic properties can be inferred. For example, as long as we have a single bump of activity, F1[a]>|Ff[a]|, ∀f>1, therefore F1[ω]>Ff[ω], ∀f>1. More specifically,

Ff[ω]=|Ff[a]|2|F1[a]|2F1[ω]. (48)

Figure 12 shows the results of the same simulation as section ‘Learning rules and development’, but using neurons with a nonlinear (tanh) activation function, and distorting the network input to be a more square wave-like sinusoid. As predicted theoretically, our rule still reinforces the dominant spatial frequency in the network, causing the weights to converge to the sinusoidal profile our theory predicts.

Figure 12. Recovery of synaptic weights with a Hebbian learning rule.

Figure 12.

The synaptic weights converge to a sinusoidal pattern under Oja’s rule when the neurons have a nonlinear (tanh) activation function and a distorted (more square wave-like) sinusoidal input is provided. (A) The weights start at zero and slowly converge to the prescribed sinusoidal profile, showing that this connectivity can emerge from scratch. (B) The sinusoidal weights are perturbed by noise but learning ensures that the weight profile is corrected. (C) The distorted sinusoidal input (orange) compared to a sinusoid profile (blue). Noise was added to the initial activity, weights, and input with the same parameters as in Figure 5, the only difference being that these simulations were run for 2500 periods.

Acknowledgements

We would like to thank Benjamin F Grewe for his support and helpful comments.

Funding Statement

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Contributor Information

Pau Vilimelis Aceituno, Email: pau@ini.uzh.ch.

Ioannis Pisokas, Email: pisokasi@janelia.hhmi.org.

Laura L Colgin, University of Texas at Austin, United States.

Laura L Colgin, University of Texas at Austin, United States.

Funding Information

This paper was supported by the following grants:

  • Royal Society of Edinburgh Saltire Early Career Fellowship to Ioannis Pisokas.

  • Swiss National Science Foundation Project Grant 182539 to Pau Vilimelis Aceituno.

Additional information

Competing interests

No competing interests declared.

Author contributions

Conceptualization, Formal analysis, Supervision, Validation, Investigation, Methodology, Writing – original draft, Project administration, Writing – review and editing.

Software, Formal analysis, Validation, Investigation, Visualization, Methodology, Writing – original draft, Writing – review and editing.

Conceptualization, Formal analysis, Supervision, Validation, Investigation, Methodology, Writing – original draft, Project administration, Writing – review and editing.

Additional files

MDAR checklist

Data availability

The current manuscript is a computational study, so no data have been generated for this manuscript. All modelling and analysis code is available at GitHub (copy archived at Dall'Osto, 2024).

The following previously published dataset was used:

Xu CS, Scheffer L, Plaza S, Januszewski M, Lu Z, Takemura SY, Hayworth K, Shinomiya K, Maitin-Shepard J, Bogovic J, Hubbard P, Kainmueller D, Katz W, Li PH, Neubarth N, Schlegel P, Neace ER, Knecht CJ, Alvarado CX, Bailey D, Ballinger S, Borycz JA, Canino B, Cook M, Duclos O, Eubanks B, Finley S, Forknall N, Francis A, Hopkins GP, Joyce EE, Kim S, Kirk NA, Kovalyak J, Lauchie SA, Lohff A, Maldonado C, Manley EA, McLin S, Mooney C, Ndama M, Ogundeyi O, Okeoma N, Ordish C, Padilla N, Patrick C, Phillips EE, Phillips EM, Rampally N, Ribeiro C, Robertson MK, Rymer JT, Ryan SM, Sammons M, Scott AK, Scott AL, Shinomiya A, Smith C, Smith NL, Sobeski MA, Suleiman A, Takemura S, Talebi R, Tarnogorska D, Tenshaw E, Tokhi T, Walsh JJ, Horne JA, Parekh R, Rivlin PK, Jayaraman V, Meinertzhagen I, Rubin GM, Jain V. 2020. Data for A Connectome of the Adult Drosophila Central Brain v1.0. Janelia Research Campus.

References

  1. Alon U. Simplicity in biology. Nature. 2007;446:497. doi: 10.1038/446497a. [DOI] [PubMed] [Google Scholar]
  2. Barnes CL, Bonnéry D, Cardona A. Synaptic counts approximate synaptic contact area in Drosophila. PLOS ONE. 2022;17:e0266064. doi: 10.1371/journal.pone.0266064. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Beetz MJ, Kraus C, Franzke M, Dreyer D, Strube-Bloss MF, Rössler W, Warrant EJ, Merlin C, El Jundi B. Flight-induced compass representation in the monarch butterfly heading network. Current Biology. 2022;32:338–349. doi: 10.1016/j.cub.2021.11.009. [DOI] [PubMed] [Google Scholar]
  4. Burnham KP, Anderson DR. In: Model Selection and Multimodel Inference. Burnham KP, editor. Springer; 2004. A practical information-theoretic approach; pp. 1–488. [DOI] [Google Scholar]
  5. Collett TS. Path integration: how details of the honeybee waggle dance and the foraging strategies of desert ants might help in understanding its mechanisms. The Journal of Experimental Biology. 2019;222:jeb205187. doi: 10.1242/jeb.205187. [DOI] [PubMed] [Google Scholar]
  6. Cope AJ, Sabo C, Vasilaki E, Barron AB, Marshall JAR. A computational model of the integration of landmarks and motion in the insect central complex. PLOS ONE. 2017;12:e0172325. doi: 10.1371/journal.pone.0172325. [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Cornford J, Kalajdzievski D, Leite M, Lamarquette A, Kullmann DM, Richards B. Learning to Live with Dale’s Principle: Anns with Separate Excitatory and Inhibitory Units. bioRxiv. 2020 doi: 10.1101/2020.11.02.364968. [DOI]
  8. Dall'Osto D. Insect-navigation-sinusoidal-optimality. swh:1:rev:0890b606d28f33bfbeffbc0d2aa594a91733b63dSoftware Heritage. 2024 https://archive.softwareheritage.org/swh:1:dir:929999f4015d082bef382f73c325ee23a9809c8d;origin=https://github.com/Dominic-DallOsto/insect-navigation-sinusoidal-optimality;visit=swh:1:snp:f692bc59d87e9dfd12afe3980a933288d1e9a64c;anchor=swh:1:rev:0890b606d28f33bfbeffbc0d2aa594a91733b63d
  9. Dayan P, Abbott LF. Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems. Massachusetts Institute of Technology Press; 2001. [Google Scholar]
  10. Dingle K, Camargo CQ, Louis AA. Input-output maps are strongly biased towards simple outputs. Nature Communications. 2018;9:761. doi: 10.1038/s41467-018-03101-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. El Jundi B, Pfeiffer K, Heinze S, Homberg U. Integration of polarization and chromatic cues in the insect sky compass. Journal of Comparative Physiology. A, Neuroethology, Sensory, Neural, and Behavioral Physiology. 2014;200:575–589. doi: 10.1007/s00359-014-0890-6. [DOI] [PubMed] [Google Scholar]
  12. El Jundi B, Baird E, Byrne MJ, Dacke M. The brain behind straight-line orientation in dung beetles. The Journal of Experimental Biology. 2019;222:jeb192450. doi: 10.1242/jeb.192450. [DOI] [PubMed] [Google Scholar]
  13. Green J, Adachi A, Shah KK, Hirokawa JD, Magani PS, Maimon G. A neural circuit architecture for angular integration in Drosophila. Nature. 2017;546:101–106. doi: 10.1038/nature22343. [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Haferlach T, Wessnitzer J, Mangan M, Webb B. Evolving a neural model of insect path integration. Adaptive Behavior. 2007;15:273–287. doi: 10.1177/1059712307082080. [DOI] [Google Scholar]
  15. Hartmann G, Wehner R. The ant's path integration system: a neural architecture. Biological Cybernetics. 1995;73:483–497. doi: 10.1007/s004220050204. [DOI] [Google Scholar]
  16. Heinze S, Gotthardt S, Homberg U. Transformation of polarized light information in the central complex of the locust. The Journal of Neuroscience. 2009;29:11783–11793. doi: 10.1523/JNEUROSCI.1870-09.2009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  17. Heinze S, Florman J, Asokaraj S, El Jundi B, Reppert SM. Anatomical basis of sun compass navigation II: the neuronal composition of the central complex of the monarch butterfly. The Journal of Comparative Neurology. 2013;521:267–298. doi: 10.1002/cne.23214. [DOI] [PubMed] [Google Scholar]
  18. Homberg U, Heinze S, Pfeiffer K, Kinoshita M, el Jundi B. Central neural coding of sky polarization in insects. Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences. 2011;366:680–687. doi: 10.1098/rstb.2010.0199. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Honkanen A, Adden A, da Silva Freitas J, Heinze S. The insect central complex and the neural basis of navigational strategies. The Journal of Experimental Biology. 2019;222:jeb188854. doi: 10.1242/jeb.188854. [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Huang L, Ledochowitsch P, Knoblich U, Lecoq J, Murphy GJ, Reid RC, de Vries SE, Koch C, Zeng H, Buice MA, Waters J, Li L. Relationship between simultaneously recorded spiking activity and fluorescence signal in GCaMP6 transgenic mice. eLife. 2021;10:e51675. doi: 10.7554/eLife.51675. [DOI] [PMC free article] [PubMed] [Google Scholar]
  21. Hulse BK, Haberkern H, Franconville R, Turner-Evans D, Takemura S-Y, Wolff T, Noorman M, Dreher M, Dan C, Parekh R, Hermundstad AM, Rubin GM, Jayaraman V. A connectome of the Drosophila central complex reveals network motifs suitable for flexible navigation and context-dependent action selection. eLife. 2021;10:e66039. doi: 10.7554/eLife.66039. [DOI] [PMC free article] [PubMed] [Google Scholar]
  22. Johnston IG, Dingle K, Greenbury SF, Camargo CQ, Doye JPK, Ahnert SE, Louis AA. Symmetry and simplicity spontaneously emerge from the algorithmic nature of evolution. PNAS. 2022;119:e2113883119. doi: 10.1073/pnas.2113883119. [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Kakaria KS, de Bivort BL. Ring attractor dynamics emerge from a spiking model of the entire protocerebral bridge. Frontiers in Behavioral Neuroscience. 2017;11:8. doi: 10.3389/fnbeh.2017.00008. [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Kim SS, Rouault H, Druckmann S. Ring attractor dynamics in the Drosophila central brain. Science. 2017;356:849–853. doi: 10.1126/science.aal4835. [DOI] [PubMed] [Google Scholar]
  25. Kinoshita M, Pfeiffer K, Homberg U. Spectral properties of identified polarized-light sensitive interneurons in the brain of the desert locust Schistocerca gregaria. The Journal of Experimental Biology. 2007;210:1350–1361. doi: 10.1242/jeb.02744. [DOI] [PubMed] [Google Scholar]
  26. Kriegeskorte N, Golan T. Neural network models and deep learning. Current Biology. 2019;29:R231–R236. doi: 10.1016/j.cub.2019.02.034. [DOI] [PubMed] [Google Scholar]
  27. Labhart T. Polarization-opponent interneurons in the insect visual system. Nature. 1988;331:435–437. doi: 10.1038/331435a0. [DOI] [Google Scholar]
  28. Labhart T. Polarization-sensitive interneurons in the optic lobe of the desert ant Cataglyphis bicolor. Die Naturwissenschaften. 2000;87:133–136. doi: 10.1007/s001140050691. [DOI] [PubMed] [Google Scholar]
  29. Li P, Cornford J, Ghosh A, Richards B. Learning Better with Dale’s Law: A Spectral Perspective. bioRxiv. 2023 doi: 10.1101/2023.06.28.546924. [DOI]
  30. Liu TX, Davoudian PA, Lizbinski KM, Jeanne JM. Connectomic features underlying diverse synaptic connection strengths and subcellular computation. Current Biology. 2022;32:559–569. doi: 10.1016/j.cub.2021.11.056. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Loesel R, Homberg U. Anatomy and physiology of neurons with processes in the accessory medulla of the cockroach Leucophaea maderae. The Journal of Comparative Neurology. 2001;439:193–207. doi: 10.1002/cne.1342. [DOI] [PubMed] [Google Scholar]
  32. Lyu C, Abbott LF, Maimon G. Building an allocentric travelling direction signal via vector computation. Nature. 2022;601:92–97. doi: 10.1038/s41586-021-04067-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Mappes M, Homberg U. Behavioral analysis of polarization vision in tethered flying locusts. Journal of Comparative Physiology. A, Neuroethology, Sensory, Neural, and Behavioral Physiology. 2004;190:61–68. doi: 10.1007/s00359-003-0473-4. [DOI] [PubMed] [Google Scholar]
  34. Menzel R, Geiger K, Chittka L, Joerges J, Kunze J, Müller U. The knowledge base of bee navigation. Journal of Experimental Biology. 1996;199:141–146. doi: 10.1242/jeb.199.1.141. [DOI] [PubMed] [Google Scholar]
  35. Merlin C, Heinze S, Reppert SM. Unraveling navigational strategies in migratory insects. Current Opinion in Neurobiology. 2012;22:353–361. doi: 10.1016/j.conb.2011.11.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  36. Mittelstaedt H. In: Neurobiology of Arachnids. Barth FG, editor. Springer; 1985. Analytical cybernetics of spider navigation; pp. 298–316. [DOI] [Google Scholar]
  37. Müller M, Wehner R. Path integration in desert ants, Cataglyphis fortis. PNAS. 1988;85:5287–5290. doi: 10.1073/pnas.85.14.5287. [DOI] [PMC free article] [PubMed] [Google Scholar]
  38. Pfeiffer K, Kinoshita M, Homberg U. Polarization-sensitive and light-sensitive neurons in two parallel pathways passing through the anterior optic tubercle in the locust brain. Journal of Neurophysiology. 2005;94:3903–3915. doi: 10.1152/jn.00276.2005. [DOI] [PubMed] [Google Scholar]
  39. Pfeiffer K, Homberg U. Coding of azimuthal directions via time-compensated combination of celestial compass cues. Current Biology. 2007;17:960–965. doi: 10.1016/j.cub.2007.04.059. [DOI] [PubMed] [Google Scholar]
  40. Pisokas I, Heinze S, Webb B. The head direction circuit of two insect species. eLife. 2020;9:e53985. doi: 10.7554/eLife.53985. [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Sakura M, Lambrinos D, Labhart T. Polarized skylight navigation in insects: model and electrophysiology of e-vector coding by neurons in the central complex. Journal of Neurophysiology. 2008;99:667–682. doi: 10.1152/jn.00784.2007. [DOI] [PubMed] [Google Scholar]
  42. Sayre ME, Templin R, Chavez J, Kempenaers J, Heinze S. A projectome of the bumblebee central complex. eLife. 2021;10:e68911. doi: 10.7554/eLife.68911. [DOI] [PMC free article] [PubMed] [Google Scholar]
  43. Scheffer LK, Xu CS, Januszewski M, Lu Z, Takemura S-Y, Hayworth KJ, Huang GB, Shinomiya K, Maitlin-Shepard J, Berg S, Clements J, Hubbard PM, Katz WT, Umayam L, Zhao T, Ackerman D, Blakely T, Bogovic J, Dolafi T, Kainmueller D, Kawase T, Khairy KA, Leavitt L, Li PH, Lindsey L, Neubarth N, Olbris DJ, Otsuna H, Trautman ET, Ito M, Bates AS, Goldammer J, Wolff T, Svirskas R, Schlegel P, Neace E, Knecht CJ, Alvarado CX, Bailey DA, Ballinger S, Borycz JA, Canino BS, Cheatham N, Cook M, Dreher M, Duclos O, Eubanks B, Fairbanks K, Finley S, Forknall N, Francis A, Hopkins GP, Joyce EM, Kim S, Kirk NA, Kovalyak J, Lauchie SA, Lohff A, Maldonado C, Manley EA, McLin S, Mooney C, Ndama M, Ogundeyi O, Okeoma N, Ordish C, Padilla N, Patrick CM, Paterson T, Phillips EE, Phillips EM, Rampally N, Ribeiro C, Robertson MK, Rymer JT, Ryan SM, Sammons M, Scott AK, Scott AL, Shinomiya A, Smith C, Smith K, Smith NL, Sobeski MA, Suleiman A, Swift J, Takemura S, Talebi I, Tarnogorska D, Tenshaw E, Tokhi T, Walsh JJ, Yang T, Horne JA, Li F, Parekh R, Rivlin PK, Jayaraman V, Costa M, Jefferis GS, Ito K, Saalfeld S, George R, Meinertzhagen IA, Rubin GM, Hess HF, Jain V, Plaza SM. A connectome and analysis of the adult Drosophila central brain. eLife. 2020;9:e57443. doi: 10.7554/eLife.57443. [DOI] [PMC free article] [PubMed] [Google Scholar]
  44. Seelig JD, Jayaraman V. Neural dynamics for landmark orientation and angular path integration. Nature. 2015;521:186–191. doi: 10.1038/nature14446. [DOI] [PMC free article] [PubMed] [Google Scholar]
  45. Siegle JH, Ledochowitsch P, Jia X, Millman DJ, Ocker GK, Caldejon S, Casal L, Cho A, Denman DJ, Durand S, Groblewski PA, Heller G, Kato I, Kivikas S, Lecoq J, Nayan C, Ngo K, Nicovich PR, North K, Ramirez TK, Swapp J, Waughman X, Williford A, Olsen SR, Koch C, Buice MA, de Vries SE. Reconciling functional differences in populations of neurons recorded with two-photon imaging and electrophysiology. eLife. 2021;10:e69068. doi: 10.7554/eLife.69068. [DOI] [PMC free article] [PubMed] [Google Scholar]
  46. Stone T, Webb B, Adden A, Weddig NB, Honkanen A, Templin R, Wcislo W, Scimeca L, Warrant E, Heinze S. An anatomically constrained model for path integration in the bee brain. Current Biology. 2017;27:3069–3085. doi: 10.1016/j.cub.2017.08.052. [DOI] [PMC free article] [PubMed] [Google Scholar]
  47. Stringer SM, Trappenberg TP, Rolls ET, de Araujo IET. Self-organizing continuous attractor networks and path integration: one-dimensional models of head direction cells. Network. 2002;13:217–242. doi: 10.1080/net.13.2.217.242. [DOI] [PubMed] [Google Scholar]
  48. Su T-S, Lee W-J, Huang Y-C, Wang C-T, Lo C-C. Coupled symmetric and asymmetric circuits underlying spatial orientation in fruit flies. Nature Communications. 2017;8:139. doi: 10.1038/s41467-017-00191-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  49. Taube JS. The head direction signal: origins and sensory-motor integration. Annual Review of Neuroscience. 2007;30:181–207. doi: 10.1146/annurev.neuro.29.051605.112854. [DOI] [PubMed] [Google Scholar]
  50. Touretzky DS, Redish AD, Wan HS. Neural representation of space using sinusoidal arrays. Neural Computation. 1993;5:869–884. doi: 10.1162/neco.1993.5.6.869. [DOI] [Google Scholar]
  51. Turner-Evans D, Wegener S, Rouault H, Franconville R, Wolff T, Seelig JD, Druckmann S, Jayaraman V. Angular velocity integration in a fly heading circuit. eLife. 2017;6:e23496. doi: 10.7554/eLife.23496. [DOI] [PMC free article] [PubMed] [Google Scholar]
  52. Turner-Evans DB, Jensen KT, Ali S, Paterson T, Sheridan A, Ray RP, Wolff T, Lauritzen JS, Rubin GM, Bock DD, Jayaraman V. The neuroanatomical ultrastructure and function of a biological ring attractor. Neuron. 2020;108:145–163. doi: 10.1016/j.neuron.2020.08.006. [DOI] [PMC free article] [PubMed] [Google Scholar]
  53. Vafidis P, Owald D, D’Albis T, Kempter R. Learning accurate path integration in ring attractor models of the head direction system. eLife. 2022;11:e69841. doi: 10.7554/eLife.69841. [DOI] [PMC free article] [PubMed] [Google Scholar]
  54. Vickerstaff RJ, Di Paolo EA. Evolving neural models of path integration. The Journal of Experimental Biology. 2005;208:3349–3366. doi: 10.1242/jeb.01772. [DOI] [PubMed] [Google Scholar]
  55. Warren TLT, Giraldo YMY, Dickinson MMH. Celestial navigation in Drosophila. Journal of Experimental Biology. 2019;222:jeb186148. doi: 10.1242/jeb.186148. [DOI] [PMC free article] [PubMed] [Google Scholar]
  56. Wehner R, Srinivasan MV. In: The Neurobiology of Spatial Behaviour. Jeffery K, editor. Oxford University Press; 2003. Path integration in insects; pp. 9–30. [DOI] [Google Scholar]
  57. Wessnitzer J, Haferlach T, Mangan M, Webb B. Path integration using a model of e-vector orientation coding in the insect brain: Reply to vickerstaff and di paolo. Adaptive Behavior. 2008;16:277–280. doi: 10.1177/1059712308094947. [DOI] [Google Scholar]
  58. Wittmann T, Schwegler H. Path integration — a network model. Biological Cybernetics. 1995;73:569–575. doi: 10.1007/BF00199549. [DOI] [Google Scholar]
  59. Zador AM. A critique of pure learning and what artificial neural networks can learn from animal brains. Nature Communications. 2019;10:3770. doi: 10.1038/s41467-019-11786-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  60. Zhang K. Representation of spatial orientation by the intrinsic dynamics of the head-direction cell ensemble: a theory. The Journal of Neuroscience. 1996;16:2112–2126. doi: 10.1523/JNEUROSCI.16-06-02112.1996. [DOI] [PMC free article] [PubMed] [Google Scholar]

Editor's evaluation

Laura L Colgin 1

This important work suggests that the observed cosine-like activity in the head direction circuit of insects not only subserves vector addition but also minimizes noise in the representation. The authors provide solid evidence using the locust and fruit fly connectomes. The work raises important theoretical questions about the organization of the navigation system and will be of interest to theoretical and experimental researchers studying navigation.

Decision letter

Editor: Laura L Colgin1
Reviewed by: Pantelis Vafidis2

Our editorial process produces two outputs: (i) public reviews designed to be posted alongside the preprint for the benefit of readers; (ii) feedback on the manuscript for the authors, including requests for revisions, shown below. We also include an acceptance summary that explains what the editors found interesting or important about the work.

Decision letter after peer review:

Thank you for submitting your article "The insect compass system: From theory to circuitry" for consideration by eLife. Your article has been reviewed by 1 peer reviewer, and the evaluation has been overseen by a Reviewing Editor and Laura Colgin as the Senior Editor.

The reviewer and the Senior Editor have discussed your submission, and the Senior Editor has drafted this to help you prepare a revised submission.

Thank you for your patience. It was difficult to find reviewers for your manuscript. Then, one of the reviewers did not submit their review and did not respond to emails over the course of multiple months. In fairness to you, we decided to move forward with the decision on the basis of one review.

Essential revisions (for the authors):

Reviewer #2 (Recommendations for the authors):

– L. 186 "..these extra encoding channels require a higher total neural activity…" A sentence explaining why this is the case would be helpful to the reader. For example, this might be because we require a localized bump of activity.

– L. 18 "finding a remarkable agreement between our theory and experimental evidence", L. 267 "We therefore confirm our prediction…" I believe the language here should be toned down (see weaknesses point 2).

– Some explanation of how eq. 23 is derived would be beneficial.

­– Methods section 3.2 is instructive but a sentence explaining the choice to model the impact of noise as a phase drift δθ would be beneficial. ­

– L. 427 the degeneracy argument holds if the weights between the two sets of neurons are zero. Another argument against this circuit is that it has half the spatial resolution.

– L. 297-9 This statement seems a bit harsh. Picking up the dominant frequency would still be a great result.

– L. 342-4 The idea to learn the HD system by simple Hebbian learning rules has been proposed before by Stringer et al. 2002, and potentially others. The authors should cite this work.

eLife. 2024 May 30;13:e91533. doi: 10.7554/eLife.91533.sa2

Author response


Essential revisions (for the authors):

– L. 186 "..these extra encoding channels require a higher total neural activity…" A sentence explaining why this is the case would be helpful to the reader. For example, this might be because we require a localized bump of activity.

We added the appropriate explanation (lines 184-188).

“As mentioned, the signal-to-noise ratio in the network remains constant as additional encoding channels, c, are used. But additional channels imply additional harmonics, which by Parseval's theorem require a higher total neural activity.”

– L. 18 "finding a remarkable agreement between our theory and experimental evidence", L. 267 "We therefore confirm our prediction…" I believe the language here should be toned down (see weaknesses point 2).

We modified the text accordingly, and now state that our theory is consistent with the data (line 15 and lines 268-274).

“We repeated the path counting analysis for the fruit fly with synapse count data (Figure 4, B), and found that while the data are noisy, the connectivity profile fits a single sinusoid pattern reasonably well. However, the high variability in the synapse counts makes our hypothesis difficult to differentiate from alternative shapes (see Section 4.6).

Taken together, this analysis shows that our theory is consistent with experimental data – using connectivity-level data for the desert locust and synapse-count data for the fruit fly.”

– Some explanation of how eq. 23 is derived would be beneficial.

We added an explanation (lines 396-399)

“To incorporate the dynamics that force the activity to return to the cycle, we add a new term into the network dynamics which fulfils Eq. 22 – increasing ‖F_f[a]‖ if ‖a‖< r and decreasing it if ‖a‖> r. This increase or decrease can be incorporated as a simple scaling factor on the activity decay term”

– Methods section 3.2 is instructive but a sentence explaining the choice to model the impact of noise as a phase drift δθ would be beneficial.

We added a sentence explaining that given the circular line attractor dynamics – which emerge from our initial assumptions – any perturbation would eventually be equivalent to a phase drift (lines 422-423).

“We only focus on angular drift, rather than noise in the full activity, because as noted in Section 4.1, any deviations in the overall activity level in the network will dissipate.”

– L. 427 the degeneracy argument holds if the weights between the two sets of neurons are zero. Another argument against this circuit is that it has half the spatial resolution.

We agree with the statement about the degeneracy, and note that the zero weights would also emerge from a learning rule if the neurons are uncorrelated with zero correlations. The notion of spatial resolution is perhaps slightly confusing here. But in terms of “decoding accuracy” – i.e. how much the represented angle is corrupted by the addition of zero mean noise to each neuron’s activity – the circuits are equivalent. Even though the f=2 circuit only represents half the number of directions as the f=1 circuit, each direction has half the noise variance because the two neurons’ activities can be averaged.

– L. 297-9 This statement seems a bit harsh. Picking up the dominant frequency would still be a great result.

The dominant frequency is indeed amplified with respect to the others. We emphasised this point (lines 307-312).

“An important point in the use of Oja’s rule is that it would tend to concentrate the activity in a single harmonic. In a linear network, the harmonics would compete during learning, leading to one single harmonic emerging and all others being suppressed, as shown in Section 4.7.1. For neurons with a nonlinear activation function, secondary harmonics would emerge, but would remain small under mild assumptions, as shown in Section 4.7.2. Oja’s rule will still cause the weights to converge to approximately sinusoidal connectivity.”

– L. 342-4 The idea to learn the HD system by simple Hebbian learning rules has been proposed before by Stringer et al. 2002, and potentially others. The authors should cite this work..

We have added this reference (see response to major point 3).

Associated Data

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

    Data Citations

    1. Xu CS, Scheffer L, Plaza S, Januszewski M, Lu Z, Takemura SY, Hayworth K, Shinomiya K, Maitin-Shepard J, Bogovic J, Hubbard P, Kainmueller D, Katz W, Li PH, Neubarth N, Schlegel P, Neace ER, Knecht CJ, Alvarado CX, Bailey D, Ballinger S, Borycz JA, Canino B, Cook M, Duclos O, Eubanks B, Finley S, Forknall N, Francis A, Hopkins GP, Joyce EE, Kim S, Kirk NA, Kovalyak J, Lauchie SA, Lohff A, Maldonado C, Manley EA, McLin S, Mooney C, Ndama M, Ogundeyi O, Okeoma N, Ordish C, Padilla N, Patrick C, Phillips EE, Phillips EM, Rampally N, Ribeiro C, Robertson MK, Rymer JT, Ryan SM, Sammons M, Scott AK, Scott AL, Shinomiya A, Smith C, Smith NL, Sobeski MA, Suleiman A, Takemura S, Talebi R, Tarnogorska D, Tenshaw E, Tokhi T, Walsh JJ, Horne JA, Parekh R, Rivlin PK, Jayaraman V, Meinertzhagen I, Rubin GM, Jain V. 2020. Data for A Connectome of the Adult Drosophila Central Brain v1.0. Janelia Research Campus. [DOI]

    Supplementary Materials

    MDAR checklist

    Data Availability Statement

    The current manuscript is a computational study, so no data have been generated for this manuscript. All modelling and analysis code is available at GitHub (copy archived at Dall'Osto, 2024).

    The following previously published dataset was used:

    Xu CS, Scheffer L, Plaza S, Januszewski M, Lu Z, Takemura SY, Hayworth K, Shinomiya K, Maitin-Shepard J, Bogovic J, Hubbard P, Kainmueller D, Katz W, Li PH, Neubarth N, Schlegel P, Neace ER, Knecht CJ, Alvarado CX, Bailey D, Ballinger S, Borycz JA, Canino B, Cook M, Duclos O, Eubanks B, Finley S, Forknall N, Francis A, Hopkins GP, Joyce EE, Kim S, Kirk NA, Kovalyak J, Lauchie SA, Lohff A, Maldonado C, Manley EA, McLin S, Mooney C, Ndama M, Ogundeyi O, Okeoma N, Ordish C, Padilla N, Patrick C, Phillips EE, Phillips EM, Rampally N, Ribeiro C, Robertson MK, Rymer JT, Ryan SM, Sammons M, Scott AK, Scott AL, Shinomiya A, Smith C, Smith NL, Sobeski MA, Suleiman A, Takemura S, Talebi R, Tarnogorska D, Tenshaw E, Tokhi T, Walsh JJ, Horne JA, Parekh R, Rivlin PK, Jayaraman V, Meinertzhagen I, Rubin GM, Jain V. 2020. Data for A Connectome of the Adult Drosophila Central Brain v1.0. Janelia Research Campus.


    Articles from eLife are provided here courtesy of eLife Sciences Publications, Ltd

    RESOURCES