Path integration is the ability to maintain an estimate of displacement from a starting point by accumulating self-motion cues. In desert ants and bees, this is the primary homing mechanism. In Drosophila, the CPU4 neurons in the central complex are believed to perform this computation.

The CPU4 Model

Eight neurons with preferred directions spaced evenly around the circle. Each neuron integrates the component of velocity along its preferred direction:

  • Input: heading (from ring attractor) and speed (constant in our model)
  • Accumulation: half-wave rectified projection of velocity onto preferred direction
  • Memory leak: optional exponential decay parameter λ that causes old displacements to fade
  • Decoding: population vector gives the home direction; its magnitude gives the distance

The Memory Leak Trade-Off

A perfect integrator (λ = 0) remembers everything but accumulates drift errors on long journeys. A leaky integrator (λ > 0) forgets old displacements, creating a “horizon” beyond which the bug cannot navigate home. This trade-off generates a phase diagram: for each noise level, there is an optimal exploration duration beyond which homing fails.


Source: modules/mayajiva/experiment/path_integration.py (86 lines), src/core/path_integration.hpp (73 lines)