Skip to main content
Proceedings of the National Academy of Sciences of the United States of America logoLink to Proceedings of the National Academy of Sciences of the United States of America
. 2026 May 29;123(22):e2603690123. doi: 10.1073/pnas.2603690123

Path integration in complex number space

Paul Craddock a,1, Yannick Miossec a, Youcef Bouchekioua b,1
PMCID: PMC13229285  PMID: 42213748

Abstract

Desert ants and foraging rodents return home along surprisingly direct paths after meandering outward journeys. Traditional path integration models explain this through cumulative vector addition, yet struggle to account for the neurobiological mechanisms underlying this computation. Here we show that animal navigation emerges naturally when trajectories are represented in complex number space. We propose that head direction (HD) cells provide allocentric reference frame rotations, bilateral brainstem neurons (Chx10) control motion magnitudes within each frame, and left–right alternating theta sweeps in entorhinal–hippocampal maps continuously sample these bilateral activation states. Frame rotations at directional changes map to multiplication by unit complex numbers, converting egocentric motor commands into allocentric position tracking. This framework offers a neurobiologically grounded mathematics of navigation.

Keywords: path integration, complex numbers, spatial navigation, head direction cells


When a foraging animal winds through its environment and then returns home via a nearly straight path (1–5), what process guides this behavior? Classical path integration theory proposes that the brain continuously sums displacement vectors, maintaining a “home vector” pointing back to the nest (6–9). Yet this elegant abstraction leaves crucial questions unanswered: How do neurons perform vector addition? Most fundamentally, what neural architecture could implement such integration?

Recent discoveries reveal part of the answer. Cregg and colleagues demonstrated that bilateral Chx10 glutamatergic brainstem neurons in mice control left and right turning through differential activation (10, 11). Simultaneously, head direction (HD) cells maintain stable allocentric directional information through attractor network dynamics (12–14). Yet a critical challenge remains: bilateral motor commands are inherently egocentric (i.e., they specify turning relative to the animal’s current heading) while successful homing requires allocentric information about position relative to the nest.

We propose that trajectories are naturally described in complex number space, where perpendicular bilateral activation levels form the real and imaginary components of a motion vector z (Fig. 1A). At each moment, z = R + i.L, where R and L represent right and left Chx10 neural activation magnitudes. Crucially, HD cells provide the frame rotation mechanism. As the animal’s head turns, HD cell population activity rotates through its attractor network, updating the allocentric directional reference. This rotation converts egocentric motor commands into allocentric displacement, accumulating into a running position estimate (Fig. 1C). This rotation, mathematically equivalent to multiplication by a unit complex number, redefines the relationship between egocentric motor commands and allocentric displacement. We represent this rotation by the variable I, which tracks cumulative directional changes. Specifically, each computational step in the framework maps to a known neural substrate: the HD cell attractor dynamics implement the rotation operator I; the bilateral Chx10 activation levels encode the motion vector z; and the left–right alternating theta sweeps (~8 Hz) in the entorhinal–hippocampal circuit (15) provide the temporal scaffolding at which bilateral activation states are continuously sampled and updated.

Fig. 1.

A four-panel figure: A, bilateral activation graph; B, L R frame rotations; C, integration table; and D, path integration model flowchart.

Complex number representation of path integration. (A) Bilateral Chx10 activation represented in complex number space. Right (R) and left (L) neural activation magnitudes form the real and imaginary components of the position vector z = R + i.L. The example shows z = 1.5 + 2i, corresponding to R = 1.5 and L = 2 cumulative activations. (B) State diagram showing how the heading variable I transforms with turning. I ∈ {1, i, −1, −i} represents the current allocentric heading, where I = 1 corresponds to facing North, I = i to East, I = −1 to South, and I = −i to West. Left turns multiply I by i (counterclockwise transitions), while Right turns multiply by −i (clockwise transitions). Within each state box, the L and R arrows indicate the orientation of the egocentric reference frame (leftward and rightward directions, respectively) relative to allocentric coordinates; these arrows show how the same egocentric step maps to different allocentric displacements depending on heading. (C) Demonstration of step-by-step accumulation. Each row shows: the turn direction, the resulting heading I, the rotation of the unit egocentric step z1 = 1 + 1i into allocentric coordinates (In × z1), and the cumulative position update zn+1 = zn + (In × z1) + zΔ, where zΔ represents stochastic bilateral activation variations. (D) Algorithm flowchart. Top (solid boxes): outward journey loop; 1) update heading I upon turning, 2) rotate the egocentric step to allocentric coordinates, 3) accumulate into position z. Bottom (dashed boxes): homeward journey loop; 4) apply proportional inhibition to reduce z toward zero, 5) execute physical movement toward nest, 6) check if home is reached (z ≈ 0). The homing formula zn+1 where Ln=Ln-1-(Ln-1Ln-1+Rn-1) and Rn=Rn-1-(Rn-1Ln-1+Rn-1), plus environmental perturbation (i.e., ε ∈ [−0.5, +0.5]) represents the principle that proportional reduction of both L and R components drives the animal homeward without requiring explicit direction computation.

Each turn creates a new local frame and updates I, multiplied by i or −i depending on turn direction (Fig. 1B). The ±i multiplication represents a 90° rotation of the local neural reference frame, not a literal body turn. Continuous turning within each frame is implemented through zΔ, the stochastic bilateral activation variations determining actual trajectory curvature. Importantly, this formulation requires no memory of a chain of turning angles: directionality is encoded moment-to-moment in the bilateral ratio of Chx10 activation, and the trajectory direction at any instant emerges from the continuous interaction of left and right activation levels rather than from any stored sequence of discrete steps.

The most striking prediction emerges during homing. Traditional vector models require the animal to compute and follow the inverse of its outward trajectory. Our framework suggests something simpler: bilateral simultaneous inhibition of both L and R with proportional adjustment (Fig. 1D, steps 4 to 6). The animal need not “remember” its outward path as a sequence of vectors. The bilateral Chx10 activation levels themselves constitute the integrated information. Homing is therefore best understood as a homeostatic process: the proportional reduction of the bilateral activation vector z toward zero drives the animal back to its starting position without requiring explicit direction computation, high cognitive load, or any representation of the outward path.

Interactive simulations implementing this framework (Fig. 1D) demonstrate that random bilateral activation patterns naturally generate realistic foraging trajectories. During each outward step, random frame rotation (±i) combined with stochastic Chx10 magnitude variations produces meandering paths matching empirical observations. Upon initiating the return phase, bilateral Chx10 inhibition produces direct homeward trajectories (Fig. 2 A and B), with a mean angular error of 10.8° (n = 1,000; Fig. 2C).

Fig. 2.

A four-panel figure. A and B: outbound and homeward paths. C: absolute angular and PI error histogram. D: arithmetic and trigonometric bar graph.

Quantitative properties of the complex number PI model. (A) Foraging and homing trajectory of a single Cataglyphis fortis desert ant (adapted from ref. 2, Fig. 1). N, nest; F, food location. (B) Output of the PI simulation (100 computational steps). Each point represents a computed position update at a frame rotation event; the plotted path represents the cumulative state of the PI computation, not a rendering of the animal physical trajectory (see text). N, nest; F, food. (C) Distribution of homing angular errors (n = 1,000 simulated trials, 20 steps each). Bracket shows cross-species PI error range from L-shaped paradigms (ref. 5, Fig. 3). (D) Computational cost per step across three PI model classes.

Fig. 2A shows an empirical C. fortis trajectory (2) alongside the PI simulation output (Fig. 2B); the plotted path represents computed position updates at frame rotation events, not a rendering of the physical trajectory. We note that Chx10 neurons have been characterized in mice (10, 11); the present framework predicts that functionally equivalent bilateral circuits should be identifiable in navigating insects. Quantitative fitting to empirical datasets constitutes an important direction for future work.

This framework makes specific testable predictions: i) during navigation, HD cell rotation should temporally precede corresponding changes in allocentric trajectory; ii) Chx10 bilateral activation ratios should predict trajectory curvature; iii) disrupting theta rhythm alternation should impair path integration accuracy; iv) during homing, HD cells should maintain stable orientation while Chx10 shows bilateral inhibition.

Materials and Methods

Simulation and analysis code are available at: https://github.com/YuYuB/Path_Integration_Simulation_Dr.Craddock_2026. Trajectories were generated using complex number operations. Each outward step involved: 1) random frame rotation In = In−1 · (±i) with equal probability; 2) magnitude variation zΔ where turning left yielded real component a ∈ [0, 0.5] and imaginary component b ∈ [0.5, 1], while turning right yielded a ∈ [0.5, 1] and b ∈ [0, 0.5]; 3) resultant zn = (In × z1) + zΔ. Homing applied bilateral simultaneous inhibition: both components decreased proportionally until their sum falls below 1 according to Ln=Ln-1-(Ln-1Ln-1+Rn-1) and Rn=Rn-1-(Rn-1Ln-1+Rn-1), plus environmental perturbation ε ∈ [−0.5, +0.5].

AI-assisted software was used to assist with generating simulation code (Claude, Anthropic) and editing the manuscript text (Claude, Anthropic; ChatGPT, OpenAI). All scientific concepts, theoretical framework, experimental design, data interpretation, and conclusions presented in this work are solely the intellectual contributions of the authors. The authors reviewed, verified, and take full responsibility for all content, including any AI-assisted outputs.

Acknowledgments

We thank Toma Uchimoto for helpful comments and discussion.

Author contributions

P.C., Y.M., and Y.B. designed research; P.C. wrote the simulation code; and P.C., Y.M., and Y.B. wrote the paper.

Competing interests

The authors declare no competing interest.

Contributor Information

Paul Craddock, Email: paul.craddock@univ-lille.fr.

Youcef Bouchekioua, Email: youcef.bouchekioua@keio.jp.

Data, Materials, and Software Availability

Codes data have been deposited in https://github.com/YuYuB/Path_Integration_Simulation_Dr.Craddock_2026 (https://doi.org/10.5281/zenodo.19262464). Previously published data were used for this work (2).

References

  • 1.Wehner R., Srinivasan M. V., “Path integration in insects” in The Neurobiology of Spatial Behaviour, Jeffery K. J., Ed. (Oxford University Press, 2003), pp. 9–30. [Google Scholar]
  • 2.Müller M., Wehner R., Path integration in desert ants. Cataglyphis fortis. Proc. Natl. Acad. Sci. U.S.A. 85, 5287–5290 (1988). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Mittelstaedt M.-L., Mittelstaedt H., Homing by path integration in a mammal. Naturwissenschaften 67, 566–567 (1980). [Google Scholar]
  • 4.Etienne A. S., Maurer R., Séguinot V., Path integration in mammals and its interaction with visual landmarks. J. Exp. Biol. 199, 201–209 (1996). [DOI] [PubMed] [Google Scholar]
  • 5.Etienne A. S., Jeffery K. J., Path integration in mammals. Hippocampus 14, 180–192 (2004). [DOI] [PubMed] [Google Scholar]
  • 6.McNaughton B. L., Battaglia F. P., Jensen O., Moser E. I., Moser M.-B., Path integration and the neural basis of the “cognitive map”. Nat. Rev. Neurosci. 7, 663–678 (2006). [DOI] [PubMed] [Google Scholar]
  • 7.Bouchekioua Y., et al. , Spatial inference without a cognitive map: The role of higher-order path integration. Biol. Rev. 96, 52–65 (2021). [DOI] [PubMed] [Google Scholar]
  • 8.Savelli F., Knierim J. J., Origin and role of path integration in the cognitive representations of the hippocampus. J. Exp. Biol. 222, jeb188912 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Chrastil E. R., Sherrill K. R., Hasselmo M. E., Stern C. E., Path integration and the neural basis of spatial orientation. Nat. Neurosci. 22, 1574–1583 (2019). [Google Scholar]
  • 10.Cregg J. M., et al. , Brainstem neurons that command mammalian locomotor asymmetries. Nat. Neurosci. 23, 730–740 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Cregg J. M., et al. , Basal ganglia-spinal cord pathway that commands locomotor gait asymmetries in mice. Nat. Neurosci. 27, 716–727 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Taube J. S., Muller R. U., Ranck J. B., Head-direction cells recorded from the postsubiculum in freely moving rats. J. Neurosci. 10, 420–435 (1990). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Taube J. S., The head direction signal: Origins and sensory-motor integration. Annu. Rev. Neurosci. 27, 465–496 (2007). [DOI] [PubMed] [Google Scholar]
  • 14.Knierim J. J., Zhang K., Attractor dynamics of spatially correlated neural activity in the limbic system. Annu. Rev. Neurosci. 35, 267–285 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Vollan A. Z., Gardner R. J., Moser M.-B., Moser E. I., Left-right-alternating theta sweeps in entorhinal-hippocampal maps of space. Nature 639, 995–1005 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

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

Data Availability Statement

Codes data have been deposited in https://github.com/YuYuB/Path_Integration_Simulation_Dr.Craddock_2026 (https://doi.org/10.5281/zenodo.19262464). Previously published data were used for this work (2).


Articles from Proceedings of the National Academy of Sciences of the United States of America are provided here courtesy of National Academy of Sciences

RESOURCES