Correction to: Nature Neurosciencehttps://doi.org/10.1038/s41593-024-01806-0, published online 3 December 2024. In the version of this article initially published, the given name and surname of Gonçalo Castelo-Branco were interchanged, while Omer Ali Bayraktar’s surname was missing “Ali”; the names are now amended in the HTML and PDF versions of the article.