Correction to: Nature Neuroscience https://doi.org/10.1038/s41593-024-01703-6. Published online 19 July 2024.

In the version of this article initially published, labels for direction pairs in Fig. 5g,h, now reading “Adj-virtual,” appeared originally as “Adj-vertical”; in the “Co-representation of multiple trajectories during sleep” section, the definition of C50 has been corrected to read “the number of tracks required when 50% of the frames become significant” (where “frames” replaces “tracks”). The errors are amended in the HTML and PDF versions of the article.