Correction to: Nature https://doi.org/10.1038/s41586-024-07187-5 Published online 20 March 2024

In the published version of this article, we mistakenly provided the wrong memory transcriptional signature in Extended Data Fig. 3a and Supplementary Table 3. We have corrected this inadvertent mistake, providing additional clarity on the generation of the memory transcriptional signature in the Methods “Pathway analysis” and Code availability sections.

To improve clarity, Supplementary Table 2 has been revised to include descriptions of significant peaks. In Extended Data Fig. 3j, the graphs for CD4+ T cells and IFN-γ cells were mistakenly swapped, and Extended Data Fig. 6d included incorrect signal intensity (a.u.) data. The cluster colors in Extended Data Fig. 9d have also been corrected.

Additionally, typographical errors in the figure legends have been addressed: Fig. 5i and Extended Data Fig. 10a legends should have stated n = 9 sections in control; Extended Data Fig. 3e should have stated n = 8–12 per group; and Extended Data Fig. 6c should have stated n = 3–4 per group. The errors have been corrected in the HTML and PDF versions of the article.