Correction to: Nature Machine Intelligence https://doi.org/10.1038/s42256-025-01085-9, published online 11 August 2025.

In the version of this article initially published, in Fig. 1a–c and Fig. 2a, symbols representing T cell receptors appeared instead as symbols for B cell receptors (single stroke ‘Y’ shapes). The figures are now amended in the HTML and PDF versions of the article.