Finding the way home

How do bats find a direction—and stay with it?

Using tracking data collected by Goldshtein et al. (2024), Acoustic cognitive map-based navigation in echolocating bats, we modeled the flights of Kuhl’s pipistrelle bats to ask how sensory information shapes navigation. By comparing each step with the direction to its destination, we asked how much of a flight was directed and how consistently the bat held its course.

From flight paths to directedness

Track the flight

Evenly spaced steps

Measure the direction

Goal θ

Angle to the roost or lake

Exploration and travel

Directed travelvon Mises
ExplorationUniform

Across this flight

Posterior directedness

ExplorationDirected travel

How strongly this heading favors directed travel, relative to this bat’s usual mix.

Exploration and directed travel

The map and plots follow the same bat. Gold marks show where a sustained stretch of travel toward the roost or lake may begin; their spread shows uncertainty about where it starts.

Loading flights…

Sensory treatment

Treatments build from left to right. Echolocation remained available in every group.

Destination

The flight path

Recorded trajectories
Posterior directedness
UndirectedEqual evidenceDirected
  • Movement
  • Goal direction
  • Tracking gap
  • Start probability
  • Median start
  • 90% start interval

Movement relative to the goal

Movement components and their sum
Steps colored by directednessCombined densityDirected componentUndirected component90% posterior interval

Posterior directedness

Smoothing softens jumps while giving recent steps more weight. Persistence is the number of consecutive goalward steps above the threshold.

Mean directedness90% posterior intervalEqual evidenceStart median + 90% intervalStart probability

Start within the trackAt a recording boundaryNo sustained bout
Inspect this step

Recorded heading —

Relative bearing—0° = toward the reference
Posterior directedness—Adjusted for baseline · 0.5 = equal evidence
Log predictive density—log of posterior mean density · nats

Inspect onset estimates
Median candidate start—
No qualifying bout—Fraction of all posterior draws
Boundary-limited starts—Fraction of all draws; onset may predate recording or lie within a gap

Compare onset estimates across bats

Positions are ordered along each recorded track. Medians and central 90% intervals condition on a qualifying draw; the other columns use all 8,000 draws. No qualifying bout does not establish absence of homing.
BatTreatmentGoalMedian [90% interval]No boutBoundary-limited
How onset uncertainty is calculated

Within each posterior draw, we normalize the posterior component odds by the bat’s baseline component odds. This ratio is BF = fD(θ) / fU(θ). We calculate posterior directedness as BF / (1 + BF) within each draw before averaging. The map, circular plot, and flight history all use the mixture fit. It is an equal-prior evidence score, not the fitted per-step probability of directed flight.

The directedness slider ranges from 0.50 to 0.95 in steps of 0.01; persistence ranges from 1 to 20 consecutive headings. Within each joint parameter draw, we first calculate an exponentially weighted mean of posterior directedness over the current and preceding steps in the selected smoothing window, then locate the beginning of the first run whose averaged directedness strictly exceeds the threshold and meets the persistence length. A window of one step turns smoothing off and exactly reproduces the original results. The most recent step has the greatest weight, so the curve follows changes with less delay than an equal-weight average. Windows include up to 20 steps, use fewer steps at the start of a segment, and reset at missing positions or tracking gaps. They never include future steps. A gap-crossing heading remains unsmoothed for inspection and is excluded from the transition rule. Smoothing averages the adjusted scores, not bearings, raw component probabilities, or interval endpoints. The mean and 90% interval are summarized only after averaging within each of the 8,000 joint draws. The map, polar dots, and history use the same selected window. Smoothing can delay or change a candidate start, and its window is a sensitivity setting, not a fitted parameter. Every heading must also point within ±90° of the local goal reference. We keep the same draw across the entire trajectory, preserving posterior dependence across steps; we do not sample pointwise intervals independently. Gaps and missing or nonqualifying headings reset the run.

The distribution of these 8,000 draw-wise starts propagates parameter uncertainty through the complete onset rule. Gold bars show its unconditional probability mass. The map’s gold halos show where that mass lies; the ring and shaded interval show the median and central 90% interval among qualifying draws. The equal-tail interval can span several separated modes: the full distribution shows whether one location or several are plausible. We report no-bout draws separately rather than forcing them to an endpoint. Starts at a recording or gap boundary are flagged because their true onset is unobserved.

This is posterior uncertainty in a retrospective threshold-based candidate, not a fitted posterior over a behavioral decision time. The mixture has a constant weight within each bat and no temporal switching process. A change-point or hidden Markov model would be needed to model switching explicitly. The smoothing window, threshold, and run length are sensitivity settings, not inferred parameters; the interval does not include uncertainty from choosing those settings, tracking error, or an omitted temporal process. Qualifying bouts may end later. Lake-directed flight is an approach to the lake, not homing to the roost.

Normalizing by the baseline odds accounts for each bat’s overall tendency for directed movement. Fitted direction and consistency still differ across bats. The fitted directed mean can differ from zero, and the component densities were learned from the same trajectories. These are descriptive posterior summaries.

Inspect the model

p(θ) = w · VM(θ | μ, κ) + (1 − w) / 2π
Orientation · μ
—
Precision · κ
—
Directed weight · w
—

Median and central 90% posterior interval for the selected bat. Larger κ means a narrower peak. Weight describes prevalence among sampled headings, approximately along distance traveled.

The model diagram follows the selected heading. Its mixture bar shows the posterior mean directed weight and central 90% interval; the purple and gray widths show the mean contributions of the two components. The circular heading key shows posterior mean directedness at each angle before along-flight smoothing, with the selected heading marked. It compares the two component densities with equal starting odds within each posterior draw, accounting for this bat’s overall mixture weight. It is not calculated from the mean density curves. Its colors describe individual angles; the map, observed polar dots, and history show the chosen recency-weighted trailing average instead. The small component curves are posterior mean, unweighted densities on a shared scale; their arrow groups are schematic. The main polar PDF shows the weighted components and their combined uncertainty. The mixture describes heading patterns, not observed behavioral states.

The circular density uses this bat’s full flight. Density is measured outward from the inner circle, which marks zero density; the peripheral dots show observed headings, colored by their posterior mean directedness. The weighted directed and undirected component densities sum to the combined curve. The shaded band describes uncertainty in that combined density.

What changes when sensory cues change?

We let sensory treatment affect direction, consistency, and the prevalence of directed movement, while allowing bats within a group to differ. The intervals show how clearly the data distinguish these features across treatments.

Direction

Where headings cluster

Consistency

How tightly they cluster

Directed movement

How prevalent it is

Dots mark posterior medians; lines span 90% intervals. Wider intervals indicate greater uncertainty. Treatments build from eyes covered to magnetic disruption and then blocked smell.

Inspect treatment estimates
Posterior medians [5th, 95th percentile]. Treatment predictions set individual effects to zero; they do not average over new bats. All destinations contribute to each treatment effect.
TreatmentBats / headingsμ (degrees)κw
Study design and model assumptions

The ATLAS tracking tables contain 28,350 raw positions for 67 retained bats. Resampling produces 5,072 positions; 4,942 headings have the quantities required for fitting. The analysis uses full usable tracks, without restricting the data to a behavior-defined homing phase. Map coordinates use UTM zone 36N; the north arrow and scale bar show orientation and distance. Dashed links mark tracking gaps, not reconstructed flight paths. The flight-history axis orders recorded positions, approximately 60 m apart within segments rather than equally spaced in time.

Each bearing is the backward movement difference at a sampled position, relative to the local destination reference. The roost is a point; the lake uses the negative gradient of a harmonic field around its shoreline. A recorded destination supplies a reference, not a direct observation of the bat’s intention.

Tracking jumps greater than 600 m or time gaps greater than 120 seconds split resampling segments. The original fitted table can nevertheless include bearings across gaps because heading differences were taken within each bat. This explorer preserves those observations, marks them explicitly, and never draws a solid trajectory across a gap.

The mixture model includes treatment and individual effects. Distance is not a predictor in these fitted formulas. Repeated headings are conditionally independent in the likelihood; individual effects do not explicitly model remaining serial dependence. Bats contribute unequal numbers of headings.

Sampling qualification. Posterior summaries use 8,000 draws across four chains. Sampling diagnostics are incomplete, so convergence has not been fully verified; the analysis documentation describes this limitation.

The pointwise density bands use all retained posterior draws. Directed-component probability is the posterior mean of the directed component’s conditional probability for the selected heading. Predictive density is a density per radian, not the probability of an exact angle; its logarithm can be positive. The map and flight history both show baseline-adjusted posterior directedness from the mixture, using the same fixed 0–1 scale. The circular plot uses that same scale for each observed step.

Study and analysis

The explorer uses the model specification and analysis in unwrap, and the tracking data and model fits in unwrap-data.

The map, headings, and model summaries come from the study’s tracking data. The linked analysis describes how we transformed the trajectories and fitted the circular models.

Reference

Goldshtein, A., Chen, X., Amichai, E., Boonman, A., Harten, L., Yinon, O., Orchan, Y., Nathan, R., Toledo, S., Couzin, I. D., & Yovel, Y. (2024). Acoustic cognitive map-based navigation in echolocating bats. Science, 386(6721), 561–567. doi:10.1126/science.adn6269