Ants integrate proprioception as well as visual context and efference copies to make robust predictions Authors: Océane Dauzere-Peres, Antoine Wystrach Published: 2024 ABSTRACT AbstractForward models are mechanisms enabling an agent to predict the sensory outcomes of its actions. They can be implemented through efference copies: copies of motor signals inhibiting the expected sensory stimulation, literally canceling the perceptual outcome of the predicted action. In insects, efference copies are known to modulate optic flow detection for flight control in flies. Here we investigate whether forward models account for the detection of optic flow in walking ants, and how the latter is integrated for locomotion control. We mounted Cataglyphis velox ants in a virtual reality setup and manipulated the relationship between the ants’ movements and the optic flow perceived. Our results show that ants compute predictions of the optic flow expected according to their own movements. However, the prediction is not solely based on efference copies, but involves proprioceptive feedbacks and is fine-tuned by the panorama’s visual structure. Mismatches between prediction and perception are computed for each eye, and error signals are integrated to adjust locomotion through the modulation of internal oscillators. Our work reveals that insects’ forward models are non-trivial and compute predictions based on multimodal information.Subject terms: Navigation, Central pattern generators, Motion detection, Animal behaviour Introduction In 1950 von Holst and Mittelstaedt as well as Sperry found out that surgically rotating the eyes of fish or the whole head of flies by 180 degrees induced the animal to display continuous body rotations in the same direction1 (English translation in ref. 2, Chapter 7)3. To account for these results, they came up with a same concept named, respectively, efference copies and corollary discharges. These are copies of the signal sent to the motor centers that feedback to inhibit the detection of sensory information in order to subtract the part due to the movement expected. Efference copies are simple form of so-called ‘forward models’, which aim at predicting the future of a current system4,5. They enables animals to distinguish exafferences, which are external sensory stimulations, from reafferences, which are self-induced sensory stimulations due to one’s own actions. Efference copies have been demonstrated both behaviorally and neurobiologically in different animals for different contexts6. For example, male crickets use them to differentiate their own chirps from the chirps of other males7, and electric fish effectively suppress the sensory input that should result from their own electrical production8. The same mechanisms are also responsible for the suppression of the perception of motion during saccadic eye movements in humans, so that the world appears stationary during those saccades9. In contrast, the perceived world appears to move when pressing our eye gently with a finger, due to the lack of efference copy in this situation. In the context of the visuomotor control of locomotion, rotational optic flow, which is defined as the perceived visual rotation of the scene around the observer, is important to stabilize one’s course during navigation. It has been shown that fruit flies can predict the amount of optic flow they should receive according to their own self-generated movements10,11. Using electrophysiological recordings, these studies demonstrated that visual cells responding to horizontal optic flow (the Horizontal System (HS) north cells) are effectively inhibited proportionally to the body rotation produced by the fly. As a result, these cells respond to mismatches between the optic flow predicted and the optic flow actually detected, a so-called ‘prediction error’. Nevertheless, the existence of such forward models in other insect species, as well as whether proprioceptive feedback is also used to compute the prediction error and the impact of the visual context on the computation of predicted optic flow remains largely unknown 4. Horizontal optic flow is generated during locomotion when the individual is turning. Many insects, including ants12–14, perform such turns continuously while moving, through the display of lateral oscillations, or zig-zagging15–18. These oscillations are produced intrinsically by a neural oscillator located in pre-motor areas18–22. The horizontal optic flow generated by such oscillatory movements appears to regulate their amplitude10,12,23, but which mechanisms underlie this regulation, and whether efference copies or other mechanisms are involved, remain entirely unknown. To our knowledge, no demonstration of the existence of visual efference copies has been found in ants. Here we tackle this question with Cataglyphis velox ants. These solitarily foraging desert ants are expert navigators that do not use pheromone trails but rely strongly on vision for guidance24–28, making them good candidates for using visual predictions. We use a virtual reality setup to decouple the ants’ movements from the optic flow they received, and record the ants’ responses in various altered visuomotor situations. Our results reveal that ants form robust predictions of the optic flow they should expect by integrating feedforwards, feedbacks as well as innate information about the structure of the world. Results Ants’ intrinsic oscillations are modulated by the optic flow perceived We first investigated how ants responded to optic flow by manipulating the visuomotor relationship in our VR system. When in the dark, ants displayed regular oscillations between left and right turns (Fig. 1a), revealing the presence of an internal oscillator, even in the absence of visual stimuli, generating those oscillations at a frequency of approximately 0.3 Hz (Mean ± SE = 0.298 ± 0.012 Hz, Supplementary Fig. 1). When ants were subjected to a panorama moving with a positive gain, and thus received self-generated optic flow, oscillations were still present (Fig. 1a), confirming the persistent and continuous activity of the endogenous oscillator. However, changing the gain from 1 (the natural visuomotor relationship) to 3 and 5 led the ant to increase the frequency of their oscillations (Supplementary Fig. 1) and turn at significantly slower angular speeds (LMM: χ52 = 598, P < 0.001, Fig. 1b). This demonstrates that optic flow impacts the expression of oscillations, and thus the oscillator, with stronger visual motion feedback inducing the ants to stop their current turn and switch to the opposite direction. Ants with a gain of 0 behave similarly than when they are with a negative gain. a Evolution of the angular velocity signal and the associated trajectories for an individual ant across gain −1 (inverted visual feedback), gain 0 (still image), gain 1 (natural visual feedback) and when surrounded by black. Signals show 40 s extracted from each condition. Lighter curves correspond to the raw signal while the darker ones correspond to the smoothed signal. Trajectories shown correspond to the gray boxes on the signal and last 12 s. The blue parts correspond to right turns whereas the green parts correspond to left turns. b, c Mean ± SEM of the individuals’ average absolute angular velocity (b) and proportion of ants’ oscillations blocked above or under 0 deg/s (without switching direction) (c) of ants in gains −1, 0, 1, 3, 5 and surrounded by black. b top-right inset: mean oscillation cycles of ants in gain 0 (red curve) or surrounded by black (black curve). Data based on 22 ants tested in the VR with both eyes uncovered. P-values were obtained using Wald chi-square tests with LMMs (b) or GLMMs (c), see statistical analysis section for more information. Pairs of groups not sharing a letter account for a significant difference in pairwise comparisons using the sequential Bonferroni correction after Holm55; see the Source data file for the exact P-values. Each point corresponds to the response of an individual ant while the lines connect the responses of the same ant across the different conditions. Source data are provided as a Source Data file. Interestingly, with a gain of –1, that is, with the world rotating in the opposite (i.e., wrong) direction in response to the ants’ movements, ants often got stuck turning in the same direction for abnormally long periods of time spanning over several oscillation cycles (Fig. 1a). Regular oscillations in angular velocity still persisted, but were shifted towards positive or negative values, meaning that ants regularly alternated between turning fast and slow in the same direction (Fig. 1a, gain –1), and that the intrinsic oscillator was still influencing their behavior. There was also a significant effect of the gain on the proportion of “blocked” oscillations of the ant (defined as an oscillation in angular speed without a reversal in turning direction, see Supplementary Fig. 2) (GLMM for proportional data: χ52 = 144, P < 0.001, pairwise comparisons Fig. 1c). This reveals that optic flow in the wrong direction led to a prolongation of the current turn and/or an inhibition of the opposite turn. In short, the faster ants turn in one direction the stronger the world rotates in the wrong direction, thus motivating the ants to continue to turn in that direction, and hence getting stuck turning continuously in one direction. Ants compute predictions of the optic flow expected, which are silenced in the dark We tested if ants computed prediction errors by subjecting them to a gain of 0, that is, with a static panorama. Indeed, if the optic flow detected directly controls the oscillations, the oscillator should run freely without any external influence in the absence of optic flow and thus produce mostly “neat”, unblocked oscillations. Alternatively, if ants are forming predictions, the oscillator should run freely only when there is no prediction error, that is, when the perceived optic flow corresponds to the one predicted by the ants’ movements (when ants are tested with a positive gain). As a corollary, given the subtraction of the predicted optic flow, a gain of 0 (static panorama) should produce similar behaviors as a negative gain, that is, an increased proportion of blocked oscillations. Inversely, if ants did not produce predictions, there would be no reason to expect a difference between their locomotion (in terms of blocked oscillation or angular speed) in the dark and in gain 0, since neither provides rotational motion. Remarkably, even though they received no optic flow, ants tested with a gain of 0 (static panorama) turned in the same direction for prolonged periods of time (Fig. 1a), showing as many blocked oscillations as with a negative gain of –1 and significantly more than with a positive gain of 1 (or above) (Pairwise comparisons Fig. 1c). This demonstrates that their oscillations are not modulated by the perceived optic flow – in which case ants should have produced “neat” oscillations in gain 0 – but are modulated by the expected optic flow. In other words, ants form a prediction error and use it to control their oscillations. Although both gain 0 and gain −1 should generate negative prediction errors, the much higher angular velocities observed for gain −1 (Fig. 1b) are expected: in gain 0, the prediction error generated is equal to the ant’s movement, whereas in gain −1, the prediction errors should be at least twice as big since, in addition to the ant’s movement, there is the perception of optic flow in the wrong direction (which is itself proportional to the ant’s movement). Furthermore, because of the nature of the control system, higher prediction errors favor stronger turns and should thus produce even stronger prediction errors. The dynamics of the blocked oscillations when ants are exposed to a static panorama cannot be explained by the ants simply trying to steer towards or away from specific features, or trying to align their current heading with an internal goal heading. Indeed, ants displayed frequent and stochastic alternations of their blocking direction, which matches with neither such hypotheses (Supplementary Fig. 2, Supplementary Note 1). Also, ants mounted in a way enabling them to physically rotate their body axis on the trackball – and thus align with any potential feature or goal heading – still performed more blocked oscillations (expressed here literally as looping behaviors) when exposed to horizontal bars (which does not produce strong optic flow as the ant turns) than vertical bars (which do produce strong optic flow as the ant turn) (Supplementary Fig. 3). Together, this confirms that blocked oscillations (looping behavior) results from optic flow, and not an attempt of the ants to align with an external feature or internal heading representation. Interestingly, contrary to ants exposed to a static panorama in gain 0, ants in the dark displayed regular oscillations, even though there was no optic flow in both cases. The frequency (Supplementary Fig. 1), average absolute angular velocity and proportion of blocked oscillations in the dark were significantly closer to the ones in gains 1 and 3, compared to the ones in gain 0 (Pairwise comparisons Fig. 1b, c, Supplementary Fig. 1). This evidence reinforces the idea that ants must use prediction errors computed from optic flow predictions, and reveals that these must be silenced when in the dark. A direct prediction of those conclusions is that, at the individual level, ants rotating faster should expect more optic flow, and thus form bigger prediction errors when they are exposed to a static panorama (gain 0). On the other hand, in the dark, regardless of its angular speed an ant should not compute any prediction error. The data confirms this prediction: the proportion of blocked oscillations, which is a direct indicator of prediction errors, significantly increased with the ant’s average angular speed when tested with a gain 0, but not in the dark (GLMM for proportional data: interaction: χ12 = 11.6, P < 0.001, post-hoc statistics Fig. 2), the latter showing that this correlation is not simply caused by a biophysical or mathematical relationship between the two measurements (i.e., ‘angular velocity’ and ‘proportion of blocked oscillations’). Ants turning faster get more blocked turning in a same direction when exposed to a fixed panorama. Proportion of blocked oscillations of ants in relation to their mean absolute angular velocity and the visual context. Pooled data based on: 22 ants from the gain alteration series with both eyes uncovered (series 1), 24 ants from the visual structure alteration series (series 2) and 24 ants from the weight of the ball alteration series (series 3). P-values were obtained using Wald chi-square tests with GLMM, see statistical analysis section for more information. There is a positive significant correlation only when ants are exposed to a static panorama (GLMM for proportional data: χ12 = 24.5, P < 0.001 red curve corresponds to the regression line) but not when ants are surrounded by black (GLMM for proportional data: χ12 = 2.28, P = 0.131). Source data are provided as a Source Data file. Functionally, the capacity to silence the prediction while surrounded by black seems ecologically relevant: it would certainly be disadvantageous for ants to expect to receive optic flow — and thus start turning continuously in one direction — when they are inside their nest or foraging in the absence of light. Perception of light thus appears as a necessary condition for the expression of the optic flow prediction. Ants’ heads were not fixed to prevent a drastic drop in motivation to navigate. Head movements provide a closed-loop visual reafference and thus might slightly bias the overall gain towards 1 when occurring. This may have ‘lowered’ the effect of our visual feedback manipulations, thus making our results conservative. The fact that ants displayed more blocked oscillations in gain 0 than in the dark confirms that head movements are not sufficient to catch up with the optic flow expected. Moreover, ants’ average forward speed was rather stable across conditions, except for a slight drop in gain −1 (Supplementary Fig. 4), which can be expected given the physical constraints and functional advantage of slowing down when turning at high speed. Modulation of the optic flow prediction depends on the visual context Since ants do not expect to receive optic flow in the dark (previous section), we wondered what visual information is used to silence the optic flow prediction normally produced. Is it just the presence/absence of visual input, or can ants predict the optic flow expected based on the structure of the visual surroundings? To test this, we exposed ants to various static visual panoramas (gain = 0) that either should (a natural-like panorama or vertical bars) or should not (homogeneous white or horizontal bars) produce horizontal optic flow when the ant is rotating. In all conditions without optic flow, ants displayed a significantly much higher proportion of blocked oscillations (a clear signature of prediction errors) than in the dark or when the panorama was rotating accordingly to the ants’ movements (GLMM for proportional data: χ52 = 137, P < 0.001, pairwise comparisons Fig. 3b, see Supplementary Fig. 5 to visualize their trajectories). This shows that in the dark, the optic flow prediction is fully canceled due to a lack of luminosity and not because the ants were able to compute the predicted optic flow by taking into account the visual structure surrounding them. The visual structure surrounding ants impacts their oscillatory behavior. a, b Mean ± SEM of the individuals' average absolute angular velocity (a) and proportion of oscillations blocked (see Supplementary Fig. 2) (b) of ants exposed to different static visual structures (gain 0) as well as a panorama in gain 2.5. Data based on n = 24 ants tested in the VR. Each point corresponds to the response of an individual ant while the lines connect the responses of the same ant across the different conditions. P-values were obtained using Wald chi-square tests with LMMs (a) or GLMMs (b), see statistical analysis section for more information. Pairs of groups not sharing a letter account for a significant difference in pairwise comparisons using the sequential Bonferroni correction after Holm55; see the Source data file for the exact P-values. c Reconstructed trajectories of an ant tested in the different visual conditions. Source data are provided as a Source Data file. However, ants’ angular speed reveals that they did turn significantly quicker when facing static visual structures that should (‘vertical bars’ or ‘panorama’ conditions) versus should not (‘white’ or ‘horizontal bars’ conditions) produce optic flow (LMM: χ52 = 284, P < 0.001, pairwise comparisons Fig. 3a). Interestingly, this signature is analogous to what we observed between ants exposed to a panorama with a gain of –1 versus 0 (Fig. 1b, c), and we know that the prediction error is greater with a gain of –1 than a gain of 0. Therefore, this suggests that the prediction error is bigger when vertical edges are present (in ‘vertical bars’ and ‘panorama’ conditions). In addition, the fact that for both parameters (mean angular velocity and proportion of blocked oscillations, pairwise comparisons Fig. 3a, b), there are no significant differences between the horizontal bars and the homogeneous white conditions, or between the panorama and the vertical bars conditions, implies that the detection of horizontal edges is clearly less important than vertical edges, if at all, for the production of optic flow predictions, and thus prediction errors. Works in flies suggest that Lobula Plate Tangential Cells (LPTC), such as HS cells, are “velocity consistent” rather than pattern or “amount of edges dependent”, for natural panoramas at least29,30 (see however31,32 for response to different artificial gratings). Thus, as long as there are edges extending vertically (and thus rotational optic flow), HS cells activity should be nearly invariant across scenery with different patterns’ characteristics. This is why, in open-loop, we don’t expect the ants’ predictions to vary so strongly with the number of vertical edges, as observed indeed in a subsequent analysis (Supplementary Fig. 6). However, a singular large vertical bar triggered lower absolute angular velocity, and thus likely less optic flow expectation, than multiple vertical bars did (Supplementary Fig. 6). Overall, results show that ants do pay attention to the structure of the panorama in a functional way, with slightly higher optic flow predictions in the presence of multiple vertical edges, which indeed should produce horizontal optic flow when rotating. However, the mere presence of light (with or without horizontal edges) is already sufficient for the ant to expect optic flow, albeit less than with vertical edges. Efference copies or proprioceptive feedback? The use of efference copies implies that the nature of the signal used to compute the prediction is a copy of the motor command. An alternative hypothesis, although non-mutually exclusive, is that ants could use proprioceptive feedback about the turn actually performed to derive their prediction of the optic flow expected. In human sensorimotor control, both those mechanisms exist5. Having ants walk on a trackball allows us to manipulate their proprioceptive feedback. Since ants mounted on the trackball need more strength to rotate a heavier ball, we manipulated the relationship between the magnitude of the motor command sent and the extent of the resulting turn, which should be faithfully detected through proprioception, by testing ants with two balls of different weights. The heavy ball was 1.93 times heavier than the light one. Thus, given the same motor strength, ants should walk and turn approximately 2 times quicker (a 93% increase) with the lighter ball33. Indeed, ants’ absolute angular velocities when walking on the lighter ball significantly increased compared to when they walked on the heavier ball both in the dark and when exposed to a static panorama (LMM: χ12 = 4.79, P = 0.029, Fig. 4a). The size of this effect was not significantly different when ants were in the dark or exposed to a static panorama (there was no significant interaction of this visual context with the weight of the ball: LMM: χ12 = 0.175, P = 0.676). However, this increase in speed was less than 20% (β ± SE = 16.4 ± 7,50 deg/s), much less than the 93% increase expected. This shows that ants produced more force, and thus stronger motor signals, in the heavy ball condition, which enabled us to form the following predictions. On the one hand, if ants used proprioceptive feedback to compute their prediction, the significant increase in angular speed during the turns performed with the lighter ball means that their prediction errors (when exposed to a static panorama) should also be more important with the lighter ball. On the other hand, if ants used only efference copies of motor commands instead, the prediction errors (when exposed to a static panorama) should, in contrast, increase (or at least not decrease) with the heavier ball, given that ants produced stronger motor signal in this condition. Finally, in both cases, the weight of the ball should have no effect on the prediction error generated in the dark, since predictions are silenced in this condition (see previous sections). Ants walking on a lighter ball turn faster and get more blocked turning in one direction. Mean ± SEM of the individuals’ average absolute angular velocity (a) and the proportion of ants’ oscillations blocked (b) of ants walking on a heavier or lighter polystyrene ball depending on the visual context (exposed to a fixed panorama or to homogeneous black). Data based on 24 ants tested in the VR with n = 21 tested with the lighter ball and n = 19 tested with the heavier ball. Each point corresponds to the response of an individual ant while the lines connect the responses of the same ant across the different conditions. P-values were obtained using Wald chi-square tests with LMMs (a) or GLMMs (b); see statistical analysis section for more information. Pairwise comparison testing between the heavier and the lighter ball inside both visual context conditions was carried out only for the proportion of blocked oscillations since the interaction between both factors was not significant for the average absolute angular speed. Because the contrasts used here are orthogonal no correction was used. Source data are provided as a Source Data file. To test this, we used here again the proportion of blocked oscillations to quantify the prediction errors generated by the ants. There was a significant interaction between the weight of the ball and the visual condition on the proportion of blocked oscillations (GLMM for proportional data: χ12 = 5.15, P = 0.023, Fig. 4b). As expected, there was no significant effect of the weight of the ball in the dark. When exposed to a static panorama, however, ants displayed significantly more blocked oscillations when walking on the lighter ball (pairwise comparisons Fig. 4b). This indicates that their prediction errors, and therefore their predictions, were larger when walking on the lighter ball even though they used less force to turn on it. Those results strongly suggest that ants are using proprioceptive feedback to generate predictions about the optic flow they expect. However, they do not reject the possibility that they are also using efference copies of motor information. In fact, other data indicates that ants integrate both sources of information. As we discussed previously, ants’ oscillations when surrounded by black are not modulated by optic flow prediction errors; in other words, oscillations in the dark should be similar to when the visual panorama produces optic flow matching exactly the one expected by the ants’ movements (i.e., with a gain of 1). Interestingly, ants’ oscillations’ characteristics (i.e., absolute angular velocity and proportion of blocked oscillations) when surrounded by black and exposed to a panorama with a gain of 1 did not match. Instead, ants’ behavior in the dark matched significantly better with a gain between 1 and 3, closer to 3 than to 1 (Fig. 1b, c). With a gain of 1, our VR setup generated a rotation of the scenery corresponding exactly to the rotation of the ball, that is, matching the turns physically produced by the ant, so it appears surprising that an optic flow 3 times stronger would be closer to the optic flow ants expect to receive if they used purely proprioceptive feedback. We can, however, explain this difference by assuming that ants also used a motor efference copy. Ants mounted on the trackball need more strength to rotate the ball than they would normally to rotate their body on solid ground, around a factor of 100–3000 according to Dahmen et al., 201733. With an efference copy of the motor command, the expected optic flow will thus be over-estimated compared to the actual rotation of the ball. With a gain of 1, the panorama should therefore rotate slower than what the ant is predicting, leading to the mismatch observed with oscillations in the dark, and explaining why a gain more important than 1 is necessary for optic flow to match the ants’ predictions. An additional ‘proprioceptive-to-motor’ loop The fact that oscillations in the dark matched best with a gain around 2.5 could result from several possibilities. Assuming, conservatively, that the ball requires at least 100 times the power needed for the ant to rotate normally33, the prediction derived from a motor efference copy would match with a gain of 100, while the prediction derived from proprioceptive feedback would fit a gain of 1. The resulting gain of 2.5 could be explained by having proprioceptive feedback information being much more weighted than motor efference copies when computing the prediction errors. This explanation alone, however, is unlikely. Indeed, the fact that ants on the ball in the dark do perform oscillations with amplitudes that are roughly comparable to what is observed on the ground, and definitely not 100 times smaller, shows that a regulation of the turns’ amplitude based on proprioception is also taking place independently of vision. This control loop is certainly regulating the strength actually needed to reach the desired amplitude, as informed by proprioception, and we can envision several ways how this could be implemented (Fig. 5). In addition to forward models, one of these possible implementations (the “calibration model”) does use the idea of “direct policy learning” recently formulated in human sensorimotor adaptation34. Nevertheless, the difference in angular velocity observed with balls of different weights (Fig. 4a) shows that this control loop does not compensate exactly for the difference in strength needed to reach a same amplitude. Such a gap suggests that the ants’ prediction still overestimates the movement that will be performed on the ball, and hence the efference copy must also overestimate the expected optic flow, which explains why the apparent absence of prediction errors occurs for gain >1, here around 2.5. Visuomotor control of ant’s oscillations. The prediction error is computed as the difference between the optic flow perceived and the one predicted. The perceived optic flow in the VR is a direct result of the ant’s movement multiplied by the gain we set up for our experiment. The prediction error then impacts the oscillations by increasing the current turn if the perceived optic flow is lower than expected, and inhibiting it if the opposite is true. a Reactive model. The predicted optic flow is computed using both a motor efference copy and proprioceptive feedback. A local loop, independent of vision, regulates the strength of the motor commands according to the proprioceptive feedback. b Calibration model. The predicted optic flow is solely based on a motor efference copy but the gain of this efference copy is calibrated by a proprioceptive forward model minimizing the proprioception prediction errors. In addition, the proprioception prediction errors also calibrate the gain of the motor command to keep the initially desired turn amplitude. Summation of the prediction errors We next wondered how optic flow information from both eyes is combined before modulating the oscillations. To do so we exposed one of the ant compound eyes to the dark by covering it with paint. There was a significant interaction between the gain and the number of eyes uncovered (1 or 2) on both the proportion of blocked oscillations (GLMM: χ52 = 31.5, P < 0.001, Fig. 6b) and their absolute angular velocity (LMM: χ52 = 89.6, P < 0.001, Fig. 6a). While the amplitude of monocular ants’ oscillations and their probability to get blocked were reduced in gain −1 and 0, this probability increased in gain 5 (pairwise comparisons Fig. 6a, b). In other words, covering one of the ant’s eyes (either the left or the right one) significantly reduced the effects of gain alteration compared to their default behavior in the dark. Gain –1 and 0 normally produce negative prediction errors leading to bigger turns than in the dark. Conversely, gain 5 produces positive prediction errors leading to smaller turns than in the dark. In both cases, the behavioral effects of the prediction errors were reduced with one eye covered. These results show that the prediction errors stemming from both eyes are integrated when modulating the oscillator. Covering an eye simply led to no prediction error for this eye (as observed in the dark), and thus a reduced overall prediction error. Note that if the prediction error of the covered eye was ignored, or if only the most important prediction errors between the two eyes were being used, we should not observe those behavioral effects. This also explains why there was no significant effect of covering the ants’ eye when no prediction errors were expected (between gain 1 and 3). Therefore, the prediction is calibrated to receive information from both eyes, which under normal conditions send similar redundant information, making it both more robust and more accurate. Covering one of the ants’ eyes decreases the effect of gain modulation compared to when they are in the dark. Impact of the number of eyes uncovered on the average absolute angular velocity (a) and the proportion of oscillation blocked above or under 0 deg/s (not changing direction) (b) of ants depending on the gain in closed-loop. Bar plots show the mean ± SEM. Each point corresponds to the responses of an individual ant while the lines connect the responses of the same ant across the different conditions. P-values were obtained using Wald chi-square tests with LMMs (a) or GLMMs (b), because the contrasts used here for multiple comparisons are orthogonal no correction was used; see statistical analysis section for more information. Data based on 27 ants tested in the VR including n = 25 with one eye covered and n = 22 with both eyes uncovered. c Mean oscillation cycles of ants with both eyes uncovered or with one eye covered in gain 0, gain 5 and surrounded by black. Curves with lighter shades correspond to the average oscillations of individual ants, while the dark ones are averaged at the population level. Source data are provided as a Source Data file. Discussion In insects, the Lateral Accessory Lobes (LAL) are pre-motor areas responsible for the generation and control of oscillations or other steering mechanisms such as phototaxis12,18,20–22. Some studies have highlighted the importance of optic flow in regulating the oscillations10,12,23. Here we demonstrated that, at least in ants, what modulates the LAL is not directly the optic flow detected, but the prediction errors resulting from the difference between what was expected and what was perceived. Interestingly, regular oscillations persisted across all our manipulations but were expressed with various amplitudes and frequencies, showing that prediction error signals are sent to the LAL and modulate the intrinsic oscillators rather than bypass it. This corroborates the idea that such intrinsic oscillations are an ancestral feature in insects that has been outsourced for various tasks through the control of various sensory modalities15–18,21,22. In addition, there seems to be a summation of the prediction errors from both eyes. Cataglyphis ants’ brains actually have a neural track, called the Inferior Optic Commissure (IOC) crossing the hemispheres to connect both left and right optic lobes. The IOC also projects to the ventrolateral neuropils, which are known to possess wide-field optic flow detector cells in flies35. This may indicate that the prediction errors are computed in each eye and then summed upstream from the LAL. Our results highlight common points but also differences with the way flies deal with optic flow. Like for our ants, electrophysiological recording in fruit flies showed that the strength of the efference copy depended on the structure of their visual surrounding: the magnitude of the efference copy sent for the same movement was weaker when exposed to a homogeneous gray screen compared to a moving grating10. However, when the grating was moving it hyperpolarized or depolarized the cells, which may impact the net effect of the efference copy. This suggests that modulation of the predicted optic flow produced by the visual structure is ancestral to both ants and flies. However, contrary to ants in the dark, the expression of the efference copy signals in flying flies is not silenced when blinded through artificially prolonged depolarizing afterpotential (PDA) causing R1–6 opsin to photoconvert to a persistently active state10, even if it remains doubtful that flies would get blocked turning into circles when in the dark (see for example36 for flies walking in the dark and37 for flies flying in the dark). Also, we showed that optic flow prediction errors in ants are based at least in part on proprioceptive feedback, and not purely on motor efference copies. In insects, connections from proprioreceptors to leg motor neurons and their role in locomotion control have been largely demonstrated38–41, but we show here that proprioceptive feedbacks also send connections to the brain to participate in the visual predictions. While efference copies are faster because they are produced before the movement and thus probably important for fast flight control, proprioceptive feedback signals may be more reliable and therefore weighted more when walking than flying, and thus perhaps weighted more in ants than in flies. Works on walking flies have shown that motor feedback from leg movements has an impact on the activities of HS cells (i.e., cells responding to horizontal motion detection), although these detailed modulations seem different than the ones shown here in ants, and not related to a visual prediction42,43. Contrary to efference copies, proprioceptive feedback does not produce a stricto sensus “prediction” since the signal must arrive with a delay, after that the corresponding optic flow has been perceived. However, because this time lag is likely under 30 ms44 while an oscillation spans over several seconds, proprioceptive feedback can certainly still be used, in addition to motor efference copies, in the estimation of the currently expected optic flow (Fig. 5a, Reactive model). Alternatively, proprioception could participate in the prediction of the optic flow indirectly, by calibrating the gain of the motor efference copy according to the mismatch (error) between the motor command effected and the proprioceptive feedback (Fig. 5b, Calibration model). Note that both ‘reactive’ and ‘calibration’ models are not mutually exclusive (Fig. 5). Finally, it is interesting to note that when exposed to a negative gain for prolonged periods of time (around 8 sessions of 4 min), fruit flies learned to reverse their movements in order to stabilize the panorama in front of them45,46. This may be an adaptation for flight control, where stabilizing the perceived panorama is crucial. Whether our ants are also capable of recalibrating their optic flow prediction errors across time, and how such plasticity is neurally implemented in insects remains to be seen, and would form an interesting agenda for future research. Methods Studied species and housing conditions All the experiments were done using C. velox desert ants. Those ants can measure up to 12 mm47, which facilitates manipulations such as covering their eyes and putting them in virtual reality. Colonies comprising one or more queens, workers and larvae were collected in Seville (Spain) in 2020 and brought to the CRCA in Toulouse. These colonies were kept in vertical nests made by digging galleries and chambers in aerated concrete. The nests were kept in the dark in an air-conditioned room under controlled conditions (temperature 24–30 °C and humidity 15–40%) and the foraging area was exposed to a 12/12 h day/night luminosity cycle. Nests were connected by a transparent tube to a 40 × 30 cm foraging arena covered by sand and exposed to a heating lamp following the 12/12 cycle. In this arena workers always had access to water as well as sugar water (40% sugar for 60% water). In addition, pieces of mealworms were dropped in the arena 3 times per week. Experimental setup: virtual world and data acquisition We used a virtual reality (VR) setup made up of a trackball system surrounded by a 360° cylindrical LED screen (Fig. 7a). The trackball enabled a tethered ant to walk on a polystyrene ball floating on a cushion of air compensating its movement33. Ants received a dot of magnetic paint on their thorax and were mounted on the trackball in a given body orientation using a holder with a micro-magnet. The trackball was placed on a lifting platform enabling to raise the mounted ants within the VR screen. The VR cylindrical screen (50 cm diameter and 76 cm high) was composed of 73728 RGB LEDs, offering a resolution of 0.94 deg/pixels, which is higher than Cataglyphis ants’ eyes resolution (>2 deg/pixels48). The scenery projected on the screen was controlled online by a computer using custom codes implemented in a Unity® 2020.1 environment. The movements of the ants were recorded by two sensors pointing at the ball and were sent back to the computer to update the scenery depending on the parameters chosen. In addition, each time the visual condition was modified during a trial, the software recorded the timestamp of this event. A camera placed on the top of the VR setup recorded the ant from above and enabled us to check whether the ant was always attached properly. Virtual reality experimental setup. a Pictures of the virtual reality arena and the trackball. b Operating mode of the virtual reality (c) Placement of the paint on ants before getting tested in the virtual reality. In all experiments, we chose to display a black and white panorama mimicking the natural habitat of C. velox and producing realistic optic flow information. In some experiments, the screen could display uniform black or white, as well as vertical or horizontal strips. The VR enabled us to manipulate the relationship between the rotational movements performed by the ants and the visual rotation of the scenery. For all of the experiments in this study, we only focused on the rotational component and got rid of the influence of translational movements: in other words, the scenery around them could only rotate but not change. We chose to do that to ensure that all ants were exposed to horizontal optic flow of the same magnitude. In some conditions, the VR system was set in ‘closed-loop’: the ants’ movement affected the movement of the panorama on the screen, and we could manipulate this relationship through a parameter called “gain” (Fig. 7b). A gain of 1 means that the rotation of the scenery on the screen matches exactly with the ball’s rotational movement produced by the ants, mimicking what happens in the real world. A gain of 5 means that the scenery rotates 5 times faster; and a gain of –1 means that the scenery rotates at the correct speed but in the opposite direction to what it normally should according to the ant’s movements. In other conditions, the VR system was set in ‘open-loop’: the ants were exposed to a fixed image with a chosen structure, and their movements had no impact on the visual feedback, which is equivalent to a gain of 0. Experimental protocol We conducted several series of experiments. In all experiments, tested ants were randomly picked from the foraging area and marked individually using a color code composed of a dot of paint on their thorax and two dots on their abdomen. Magnetic pain was also applied on the middle of their thorax to enable to mount them on the trackball (Fig. 7c). The painted ants were then placed for 2 min in a small pot to let the paint dry, and were mounted on the trackball with the platform on the lowest position. The screen of the VR was first turned black while the platform was raised to immerse the ant in the VR setup; the screen was then switched on and the trackball movements were recorded. Once the trial was over the ant was placed back in its nest. For the first series of experiments, another dot of paint was either applied on their left eye (LE), right eye (RE), or above their left eye (2E) for the sham group (Fig. 7c). At the end of the trial, the painted eye cap was then removed before releasing the ant back to its nest. Individually marked ants could be picked up from the nest multiple times to be tested in the different conditions (LE, RE and 2E) in a randomized order. In total 27 different ants were tested in closed-loop under six conditions successively without leaving the VR: they were tested with a gain equal to –1, 0, 1, 3, 5 and with the screen filled with black, in a pseudo-randomized order. Each condition lasted for 90 s and the screen was filled with black for 15 s between two conditions. When the gain was equal to 0, to prevent any bias across ants, the fixed panorama was rotated so that all the ants perceived it from the same orientation, whatever their absolute orientation on the trackball. To do so, the ant’s body orientation was measured using the camera, and the panorama orientation was adjusted during the 15 s of darkness preceding the gain 0 condition. For the second series of experiments, 24 different ants (which were not used in the first series) were tested successively without leaving the VR in 6 visual conditions: one in closed-loop with a gain of 2.5 and a realistic panorama, and five in open-loop (i.e., a gain of 0) with different visual structures: horizontal bars, vertical bars, homogeneous white, homogeneous black, and the realistic panorama. The ants were exposed to all the conditions in a pseudo-randomized order. In the horizontal and vertical bars conditions we controlled for the overall luminosity by ensuring that the proportion of black vs. white LEDs remained constant and equal. For the third series of experiments ants were first tested in the VR randomly with a lighter polystyrene ball of 229 mg or with a heavier polystyrene ball of 442 mg. Individually marked ants could be picked up again from the nest later to be tested with the other ball they were not first tested with. In total, 24 different ants (not used in the first two series) were exposed, for each ball condition, to the dark and to a fixed panorama (i.e. gain 0) successively without leaving the VR in a randomized order. Each visual context condition lasted for 90 s and the screen was filled with black for 15 s between the two. Data transformation All statistical analyses were done using R v. 4.4.149 whereas the transformation of the raw data acquired by the system into exploitable variables and their visualization was done with Python v. 3.12.4. For all the trials of each ant, we used a custom Python code to process the raw data collected from the sensors: we transformed it into understandable measures and split it between the different tested conditions using the timestamps of the start and the end of the different visual conditions tested. That way, the virtual trajectory as well as the angular velocity across time (negative when going right and positive when going left) were extracted. To decrease the natural noise of the recording system (recording at Mean ± SD = 45.3 ± 1.88 fps), the raw angular velocity was resampled to have a data point every 33 μs (30 fps) and smoothed by running twice an average filter with a sliding window of 20 frames long. We isolated oscillations by extracting local extremums on this smoothed signal: one oscillation was defined as a succession of 3 extremums, that is, the alternation of an increase and a decrease phase in the angular velocity signal (no matter the order), each with a minimum amplitude of 3 deg/s. To compute mean oscillation cycles as shown in Figs. 1b, 6 and Supplementary Fig. 1 we flagged each time the signal crossed the mean angular velocity of the ant in the given condition during a decrease phase. We then extracted portions of the signal of ±80 frames before and after each flag (large enough to contain a full oscillation cycle) and aligned these portions of the signal so that all flags = t0. Individual mean cycles were obtained by averaging all portions of an individual. Population mean cycles were obtained by averaging all the individuals’ mean cycles for a given condition. We called ‘blocked oscillation’ an oscillation that does not contain a reversal in turning direction (the angular velocity signal does not cross 0 deg/sec), whereas a ‘normal oscillation’ is composed of 2 reversals in turning direction (one during the increase and one during the decrease phase). (Supplementary Fig. 2). In the end, we obtained for each experiment a table file containing for every ant the different variables we were interested in, averaged in each condition, we then used those data for statistical analysis. Statistical analysis Two response variables were computed for each condition in every trial for all ants: the average absolute angular velocity (corresponding to how quickly an ant turned no matter the direction) and the proportion of detected oscillations that were defined as “blocked” because they didn’t involve switching direction. Analyses were done using linear mixed-effect models (LMMs) or generalized linear mixed-effect models (GLMMs) based on restricted maximum likelihood estimates with the R package lme450. In all the models, the identity of the ant was included as a random factor to account for repeated measurements, as well as the identity of the trial when ants were tested in the VR more than once. For all the models, the normal distribution of residuals as well as the homogeneity of variances was verified by visually checking, respectively, QQplots and the residuals versus the fitted values51. For the GLMMs we checked for overdispersion using the function check_overdispersion of the R package performance52; if overdispersion was detected we added observation-level random effects as a way to deal with this overdispersion53. P-values were calculated by type II or type III (if interactions were included and significant) Wald chi-square tests using analysis-of-variance tables from the function Anova of the R package car54 and compared to a significance level of 0.05. Pairwise comparisons on significant (G)LMMs were done by using the same test with the same model on subsets of the data including only the groups to compare to test our hypotheses. When the groups of the tested comparison were involved in more than one such comparison (making the contrast non-orthogonal), we used the sequential Bonferroni correction after Holm55 according to the number of comparisons we were interested in, with an uncorrected significance level of 0.05. We decided to regroup the two conditions “right eye covered” and “left eye covered” into a single condition “one eye covered”, after checking there was no significant difference between covering the right or the left eye on the response variables tested (see Supplementary Fig. 7). The values associated with the resulting condition “one eye” were obtained by calculating for each ant the average between their values with the left eye covered and the right eye covered; if the ant only got tested with one of the two possible eyes covered, the value associated was kept for the “one eye” condition. To facilitate the understanding of the study, the results of those models will be split up: the comparisons between the different groups will be reported in different corresponding sections. Series 1: Alteration of the gain We tested for the effect of the gain (factor with 6 levels: –1, 0, 1, 3, 5 and surrounded by black) and the number of eyes uncovered (factor with 2 levels: 1 eye or 2 eyes) as well as the interaction between the two factors on the proportion of ants’ oscillations that were “blocked” in one direction and their average absolute angular velocity. We used a LMM for the absolute angular velocities with the log transformation, and a GLMM for proportional data with the binomial distribution and the link function logit for the proportion of blocked oscillations. Since the interaction was significant for both models, we chose to look at all the pairwise comparisons between the groups with 2 eyes and at the comparisons between 1 versus 2 eyes inside each gain group. Series 2: Alteration of the visual structure We tested for the effect of the type of visual structure ants were exposed to (factor with 6 levels: fixed horizontal bars, verticals bars, homogeneous white, homogeneous black, static panorama and a panorama in closed loop (gain of 2.5)) on their average absolute angular velocities and the proportion of their oscillations which were blocked. We used a LMM for the absolute angular velocities with the log transformation, and a GLMM for proportional data with the binomial distribution and the link function logit for the proportion of blocked oscillations. Series 3: Alteration of the weight of the ball We tested for the effects of the weight of the polystyrene ball (factor with 2 levels: heavy or light) and the visual context (factor with 2 levels: in the dark or exposed to a fixed panorama) as well as the interaction between the two factors on ants’ average absolute angular velocities and the proportion of their oscillations which were blocked. We used a LMM for the absolute angular velocities, and a GLMM for proportional data with the binomial distribution and the link function logit for the proportion of blocked oscillations. Since the interaction was significant for both models, we chose to look at the pairwise comparisons between light versus heavy ball inside both visual context groups. Series 1, 2 and 3 Since all our experimental series contained both the dark and static panorama (gain 0) conditions, we pooled together these two conditions and added a random factor in the statistical model to account for potential effects of the experimental series of origin. We then tested the correlation between ants’ proportion of blocked oscillations (response variable) and the average absolute angular velocity (predictor variable) by taking into account the visual context (factor with 2 levels: surrounded by black or surrounded by a static panorama) and the interaction between the two factors with a GLMM for proportional data with the binomial distribution and the link function logit. Since the interaction between the visual context and the average absolute angular velocity was significant we carried out post-hoc analysis by testing the effect of the average absolute angular velocity separately on both groups. In addition, since the span of angular velocities was different for ants in the dark or in gain 0 we replicated the same analysis by removing the data points above 200 deg/s to check that the significance of the interaction remained (GLMM: χ12 = 9.17, P = 0.002). Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Supplementary information Supplementary Information Reporting Summary Transparent Peer Review file Source data Source data Acknowledgements We are grateful to Stéphane Chameron and Filipe Pinto Teixeira for their feedbacks and Ken Cheng for his comments on the manuscript. We thank Léo Clement, Sebastian Schwarz and Blandine Mahot Castaing for collecting the data used in Supplementary Fig. 3 and helping with the collection and maintenance of the ant colonies, as well as Florent Le Moël for the development of the VR set-up. Funder: European Research Council, Grant reference number: EMERG-ANT 759817, Author: A.W. Author contributions O.D.P.: Conception and design of experiment, data collection, analysis and interpretation of data, drafting and revising the article. A.W.: Conception and design of experiment, analysis and interpretation of data, drafting and revising the article, supervision of project. Peer review Peer review information Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available. Data availability The processed as well as the raw data are available at https://github.com/antnavteam/ant_visual_prediction.git56. Source data are provided with this paper. Code availability The codes used in this study to process the raw data and visualize them are available at https://github.com/antnavteam/ant_visual_prediction.git56. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Supplementary information The online version contains supplementary material available at 10.1038/s41467-024-53856-4. References Associated Data Supplementary Materials Supplementary Information Reporting Summary Transparent Peer Review file Source data Data Availability Statement The processed as well as the raw data are available at https://github.com/antnavteam/ant_visual_prediction.git56. Source data are provided with this paper. The codes used in this study to process the raw data and visualize them are available at https://github.com/antnavteam/ant_visual_prediction.git56.