a, According to the toroidal representation, pitch is computed in a world reference frame (allocentric) and not in body reference frame (egocentric). In the upright position, the two reference frames are indistinguishable. For example, when a bat pitches its head towards the moon (positive allocentric pitch) it also raises its head away from its chest (positive egocentric pitch). However, in the inverted position, allocentric head pitch is flipped with respect to the egocentric one. When the bat is upside-down and looks towards the moon (positive allocentric pitch), it now brings the head towards the chest (negative egocentric pitch). To test which of these reference frames is most consistent with our neural data, we computed the correlation between the pitch 1D tuning curves of the upright sessions versus the inverted session, in the two reference frames (for the experiments in setup number 1). Correlation of pitch tuning-curves between the upright and inverted positions was higher when the inverted session was plotted in allocentric coordinates (n = 42 (21 cells × 2) upright sessions; we included in the analysis only cells that were significantly tuned to pitch). *P < 0.05. b, A toroidal representation implies that pitch has a continuous representation, where every pitch angle corresponds to a unique orientation along a 360° ring of possible pitch angles (see Fig. 3d, red ring). This implies that if a neuron is active mostly at extreme pitch angles during the upright session (‘extreme-pitch’ neuron), it is likely to be active also at the contiguous pitch in the inverted session. Shown here are examples of two pitch cells with tuning to non-zero pitch angles in the upright session (cell 1, positive pitch; cell 2, negative pitch). 1D tuning to pitch is plotted for the average neuronal activity of the cell during the two upright sessions (‘upright’, left), and for the inverted session (‘inverted’, right). Note that the two cells exhibit contiguous firing in the inverted and upright sessions. c–e, The toroidal model generates a prediction, that such a continuity between the upright and the inverted session (as shown in b), should occur for cells tuned to ‘extreme pitch’ (see example in d), but not for cells tuned to horizontal pitch (example in c). More specifically, in the toroidal model, neurons with preferred pitch at around 0°, an angle at which the head of an upright bat is parallel to the ground (‘horizontal pitch’ cells), are not expected to fire when the bat is inverted with its head being parallel to the ground, because these two situations are topologically distinct in the toroidal but not in the spherical representation (Fig. 3d vs 3c and Extended Data Fig. 7d vs 7b). In contrast, neurons tuned to an extreme pitch angle in the upright position, are likely to fire to some extent also in the contiguous part of the inverted session, as the ‘patch of activity’ on the ‘external side’ of the torus (which corresponds to upright position) is likely to extend also onto the ‘inner side’ of the torus (corresponding to inverted position). Therefore, according to the toroidal (but not the spherical) model, the correlations between the upright and inverted sessions for cells tuned to ‘extreme pitch’ are expected to be higher than for cells tuned to ‘horizontal pitch’. This prediction was tested here, and was indeed confirmed (see below). c, Upper panel, schematic representation of an azimuth × pitch cell, exhibiting pitch tuning to 0° (a ‘horizontal pitch’ neuron). Lower panel, example of an actual neuron exhibiting pitch tuning to 0°, similar to the schematic. Note that in both the schematic and in the real neuron, no directional field is present in the inverted session (that is, no firing on the inner (grey) part of the toroidal manifold), as predicted above. d, Upper panel, schematic representation of an azimuth × pitch cell, tuned to positive pitch (an extreme pitch neuron). Lower panel, example of an actual neuron exhibiting tuning to positive pitch, similar to the schematic. In this case, the activity of the neuron in the upright session is in fact correlated with its activity in the inverted session, as predicted above. e, Differences in 2D correlations between the upright and inverted session, for all the pitch-tuned neurons recorded in setup number 1 (both pure and conjunctive), computed similarly to the correlation analysis in Extended Data Fig. 7k (see Methods). This correlation was significantly larger for pitch cells that were tuned to extreme pitch (pitch ≤ –35° or pitch ≥ + 35°; ‘extreme pitch’, n = 22 cells × sessions), compared to pitch cells tuned approximately to zero pitch (between −35° and +35°; ‘horizontal pitch’, n = 20 cells × sessions). Error bars, mean ± s.e.m.; ***P < 0.001.